business Home page almost completed

This commit is contained in:
vignesh 2022-05-16 01:10:15 +05:30
parent db41677cbb
commit 70e4627c67
9 changed files with 303 additions and 45 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 544 B

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 442 B

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 721 B

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 409 KiB

View File

@ -1,5 +1,8 @@
import 'dart:ffi';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:dotted_border/dotted_border.dart'; import 'package:openclosenew/businessempty.dart';
import 'package:flutter_switch/flutter_switch.dart';
class businesshome extends StatefulWidget { class businesshome extends StatefulWidget {
const businesshome({Key? key}) : super(key: key); const businesshome({Key? key}) : super(key: key);
@ -9,6 +12,10 @@ class businesshome extends StatefulWidget {
} }
class _businesshomeState extends State<businesshome> { class _businesshomeState extends State<businesshome> {
bool status = true;
static const Color newColor = Colors.black;
int _selectedIndex = 0; int _selectedIndex = 0;
static const TextStyle optionStyle = TextStyle( static const TextStyle optionStyle = TextStyle(
fontFamily: 'Manrope', fontFamily: 'Manrope',
@ -98,19 +105,18 @@ class _businesshomeState extends State<businesshome> {
), ),
), ),
Spacer(), Spacer(),
SingleChildScrollView( Container(
scrollDirection: Axis.horizontal, height: 100,
child: Container( child: ListView(
margin: const EdgeInsets.symmetric(vertical: 20, horizontal: 20), scrollDirection: Axis.horizontal,
child: FittedBox( children: [
fit: BoxFit.fill, Padding(
alignment: Alignment.topCenter, padding: const EdgeInsets.only(left: 22),
child: Row( child: InkWell(
children: [ onTap: () {},
Container( child: Container(
width: 350, width: 320,
margin: EdgeInsets.only(right: 10), margin: EdgeInsets.only(right: 10),
height: 100,
decoration: BoxDecoration( decoration: BoxDecoration(
image: const DecorationImage( image: const DecorationImage(
alignment: Alignment.centerRight, alignment: Alignment.centerRight,
@ -160,19 +166,27 @@ class _businesshomeState extends State<businesshome> {
), ),
), ),
), ),
Container( ),
width: 350, ),
Padding(
padding: const EdgeInsets.only(left: 10),
child: InkWell(
onTap: () {},
child: Container(
width: 320,
margin: EdgeInsets.only(right: 10), margin: EdgeInsets.only(right: 10),
height: 100,
decoration: BoxDecoration( decoration: BoxDecoration(
image: const DecorationImage( image: const DecorationImage(
alignment: Alignment.centerRight, alignment: Alignment.centerRight,
image: AssetImage('assets/images/status.png'), image: AssetImage('assets/images/status.png'),
), ),
color: Color(0xFF09CD99), color: Color(0xFF09CD99),
borderRadius: BorderRadius.all(Radius.circular(5))), borderRadius: BorderRadius.all(
Radius.circular(5),
),
),
child: Padding( child: Padding(
padding: const EdgeInsets.all(12), padding: const EdgeInsets.all(14),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
@ -187,7 +201,7 @@ class _businesshomeState extends State<businesshome> {
), ),
), ),
Text( Text(
"42", "43",
style: TextStyle( style: TextStyle(
fontFamily: 'Manrope', fontFamily: 'Manrope',
fontStyle: FontStyle.normal, fontStyle: FontStyle.normal,
@ -210,19 +224,27 @@ class _businesshomeState extends State<businesshome> {
), ),
), ),
), ),
Container( ),
width: 350, ),
Padding(
padding: const EdgeInsets.only(left: 10),
child: InkWell(
onTap: () {},
child: Container(
width: 320,
margin: EdgeInsets.only(right: 10), margin: EdgeInsets.only(right: 10),
height: 100,
decoration: BoxDecoration( decoration: BoxDecoration(
image: const DecorationImage( image: const DecorationImage(
alignment: Alignment.centerRight, alignment: Alignment.centerRight,
image: AssetImage('assets/images/status.png'), image: AssetImage('assets/images/status.png'),
), ),
color: Color(0xFF09CD99), color: Color(0xFF09CD99),
borderRadius: BorderRadius.all(Radius.circular(5))), borderRadius: BorderRadius.all(
Radius.circular(5),
),
),
child: Padding( child: Padding(
padding: const EdgeInsets.all(12), padding: const EdgeInsets.all(14),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
@ -237,7 +259,7 @@ class _businesshomeState extends State<businesshome> {
), ),
), ),
Text( Text(
"42", "44",
style: TextStyle( style: TextStyle(
fontFamily: 'Manrope', fontFamily: 'Manrope',
fontStyle: FontStyle.normal, fontStyle: FontStyle.normal,
@ -260,9 +282,237 @@ class _businesshomeState extends State<businesshome> {
), ),
), ),
), ),
], ),
),
],
),
),
Spacer(),
Row(
children: [
Padding(
padding: const EdgeInsets.only(left: 24),
child: Text(
'My Businesses',
style: TextStyle(
fontSize: 16,
fontFamily: 'Manrope',
fontStyle: FontStyle.normal,
fontWeight: FontWeight.w600,
),
), ),
), ),
Spacer(),
Padding(
padding: const EdgeInsets.only(right: 15),
child: TextButton.icon(
icon: Icon(
Icons.add,
color: Color(0xFF09CD99),
),
label: Text(
"Add Business",
style: TextStyle(
fontFamily: 'Manrope',
fontStyle: FontStyle.normal,
fontWeight: FontWeight.w600,
fontSize: 12,
color: Color(0xFF09CD99),
),
),
onPressed: () {},
),
),
],
),
Container(
height: 420,
child: ListView(
scrollDirection: Axis.vertical,
children: [
Padding(
padding: const EdgeInsets.only(left: 24),
child: InkWell(
onTap: () {},
child: Container(
width: 165,
height: 200,
margin: EdgeInsets.only(right: 20),
decoration: BoxDecoration(
color: newColor,
image: const DecorationImage(
image: AssetImage('assets/images/bg.png'),
fit: BoxFit.fitHeight,
),
borderRadius: BorderRadius.all(
Radius.circular(5),
),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Row(
children: [
Padding(
padding: const EdgeInsets.only(
left: 15,
top: 100,
),
child: RichText(
text: TextSpan(
text: "Barbeque Nation ",
style: TextStyle(
fontFamily: 'Manrope',
fontStyle: FontStyle.normal,
fontWeight: FontWeight.w600,
fontSize: 18,
color: Colors.white,
),
children: [
TextSpan(
text: "42 ",
style: TextStyle(
fontFamily: 'Manrope',
fontStyle: FontStyle.normal,
fontWeight: FontWeight.w400,
fontSize: 15,
color: Color(0xFFFFBE3F),
),
),
WidgetSpan(
child: Icon(
Icons.star,
color: Color(0xFFFFBE3F),
size: 18,
),
),
],
),
),
),
Padding(
padding:
const EdgeInsets.only(top: 100, left: 3),
child: FlutterSwitch(
width: 105,
height: 40,
valueFontSize: 15,
toggleSize: 25,
value: status,
borderRadius: 30.0,
padding: 8.0,
showOnOff: true,
onToggle: (val) {
setState(() {
status = val;
});
},
activeText: "OPEN",
activeTextColor: Colors.white,
activeTextFontWeight: FontWeight.w600,
activeColor: Color(0xFF09CD99),
inactiveText: "CLOSED",
inactiveTextColor: Colors.white,
inactiveTextFontWeight: FontWeight.w600,
inactiveColor: Color(0xFFFF4B4C),
),
),
],
),
Padding(
padding: const EdgeInsets.only(
left: 10,
),
child: RichText(
text: TextSpan(
children: [
WidgetSpan(
child: Icon(
Icons.location_on_outlined,
color: Colors.white,
size: 20,
),
),
TextSpan(
text: "Town Hall, Coimbatore",
style: TextStyle(
fontFamily: 'Manrope',
fontStyle: FontStyle.normal,
fontWeight: FontWeight.w400,
fontSize: 14,
color: Colors.white,
),
),
],
),
),
),
],
),
),
),
),
Padding(
padding: const EdgeInsets.only(left: 22),
child: InkWell(
onTap: () {},
child: Container(
width: 160,
height: 200,
margin: EdgeInsets.only(right: 10, top: 10),
decoration: BoxDecoration(
image: const DecorationImage(
alignment: Alignment.centerRight,
image: AssetImage('assets/images/status.png'),
),
color: Color(0xFF09CD99),
borderRadius: BorderRadius.all(
Radius.circular(5),
),
),
child: Padding(
padding: const EdgeInsets.all(14),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Today",
style: TextStyle(
fontFamily: 'Manrope',
fontStyle: FontStyle.normal,
fontWeight: FontWeight.w400,
fontSize: 14,
color: Colors.white,
),
),
Text(
"42",
style: TextStyle(
fontFamily: 'Manrope',
fontStyle: FontStyle.normal,
fontWeight: FontWeight.w400,
fontSize: 26,
color: Colors.white,
),
),
Text(
"Visitors viewed Barbeque Nation",
style: TextStyle(
fontFamily: 'Manrope',
fontStyle: FontStyle.normal,
fontWeight: FontWeight.w400,
fontSize: 12,
color: Colors.white,
),
),
],
),
),
),
),
),
],
), ),
), ),
Spacer(), Spacer(),

View File

@ -56,7 +56,7 @@ packages:
name: collection name: collection
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.15.0" version: "1.16.0"
cross_file: cross_file:
dependency: transitive dependency: transitive
description: description:
@ -98,7 +98,7 @@ packages:
name: fake_async name: fake_async
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.2.0" version: "1.3.0"
ffi: ffi:
dependency: transitive dependency: transitive
description: description:
@ -139,6 +139,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.6" version: "2.0.6"
flutter_switch:
dependency: "direct main"
description:
name: flutter_switch
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.2"
flutter_test: flutter_test:
dependency: "direct dev" dependency: "direct dev"
description: flutter description: flutter
@ -232,7 +239,7 @@ packages:
name: js name: js
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.6.3" version: "0.6.4"
libphonenumber: libphonenumber:
dependency: transitive dependency: transitive
description: description:
@ -281,7 +288,7 @@ packages:
name: material_color_utilities name: material_color_utilities
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.1.3" version: "0.1.4"
meta: meta:
dependency: transitive dependency: transitive
description: description:
@ -295,7 +302,7 @@ packages:
name: path name: path
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.8.0" version: "1.8.1"
path_drawing: path_drawing:
dependency: transitive dependency: transitive
description: description:
@ -461,7 +468,7 @@ packages:
name: source_span name: source_span
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.8.1" version: "1.8.2"
stack_trace: stack_trace:
dependency: transitive dependency: transitive
description: description:
@ -496,7 +503,7 @@ packages:
name: test_api name: test_api
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.4.8" version: "0.4.9"
typed_data: typed_data:
dependency: transitive dependency: transitive
description: description:
@ -517,7 +524,7 @@ packages:
name: vector_math name: vector_math
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.1" version: "2.1.2"
win32: win32:
dependency: transitive dependency: transitive
description: description:
@ -547,5 +554,5 @@ packages:
source: hosted source: hosted
version: "3.1.0" version: "3.1.0"
sdks: sdks:
dart: ">=2.16.2 <3.0.0" dart: ">=2.17.0-0 <3.0.0"
flutter: ">=2.10.0-0" flutter: ">=2.10.0-0"

View File

@ -31,6 +31,7 @@ dependencies:
sdk: flutter sdk: flutter
snippet_coder_utils: ^1.0.8 snippet_coder_utils: ^1.0.8
dotted_border: ^2.0.0+2 dotted_border: ^2.0.0+2
flutter_switch: ^0.3.2
# The following adds the Cupertino Icons fonts to your application. # The following adds the Cupertino Icons fonts to your application.