business details screen started
This commit is contained in:
parent
9abcd2cde9
commit
3299bc4217
@ -1,8 +1,8 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:openclosenew/businessempty.dart';
|
|
||||||
import 'package:flutter_switch/flutter_switch.dart';
|
import 'package:flutter_switch/flutter_switch.dart';
|
||||||
|
|
||||||
import '07_addbusiness.dart';
|
import '07_addbusiness.dart';
|
||||||
|
import 'businessdetail.dart';
|
||||||
|
|
||||||
class businesshome extends StatefulWidget {
|
class businesshome extends StatefulWidget {
|
||||||
const businesshome({Key? key}) : super(key: key);
|
const businesshome({Key? key}) : super(key: key);
|
||||||
@ -15,6 +15,7 @@ class _businesshomeState extends State<businesshome> {
|
|||||||
bool status = false;
|
bool status = false;
|
||||||
bool status1 = false;
|
bool status1 = false;
|
||||||
bool status2 = false;
|
bool status2 = false;
|
||||||
|
Color _imageColor = Color.fromRGBO(2989, 5870, 1140, 1);
|
||||||
|
|
||||||
int _selectedIndex = 0;
|
int _selectedIndex = 0;
|
||||||
static const TextStyle optionStyle = TextStyle(
|
static const TextStyle optionStyle = TextStyle(
|
||||||
@ -354,7 +355,10 @@ class _businesshomeState extends State<businesshome> {
|
|||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(left: 15),
|
padding: const EdgeInsets.only(left: 15),
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () {},
|
onTap: () {
|
||||||
|
Navigator.push(context,
|
||||||
|
MaterialPageRoute(builder: (_) => businessdetail()));
|
||||||
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 170,
|
width: 170,
|
||||||
height: 200,
|
height: 200,
|
||||||
@ -364,6 +368,7 @@ class _businesshomeState extends State<businesshome> {
|
|||||||
image: AssetImage('assets/images/bg.png'),
|
image: AssetImage('assets/images/bg.png'),
|
||||||
fit: BoxFit.fitHeight,
|
fit: BoxFit.fitHeight,
|
||||||
),
|
),
|
||||||
|
color: _imageColor,
|
||||||
borderRadius: BorderRadius.all(
|
borderRadius: BorderRadius.all(
|
||||||
Radius.circular(5),
|
Radius.circular(5),
|
||||||
),
|
),
|
||||||
@ -427,6 +432,13 @@ class _businesshomeState extends State<businesshome> {
|
|||||||
onToggle: (val) {
|
onToggle: (val) {
|
||||||
setState(() {
|
setState(() {
|
||||||
status = val;
|
status = val;
|
||||||
|
if (val) {
|
||||||
|
_imageColor =
|
||||||
|
Color.fromRGBO(22, 27, 34, 1);
|
||||||
|
} else {
|
||||||
|
_imageColor =
|
||||||
|
Color.fromRGBO(36, 41, 46, 1);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
activeText: "OPEN",
|
activeText: "OPEN",
|
||||||
|
88
openclosenew/lib/businessdetail.dart
Normal file
88
openclosenew/lib/businessdetail.dart
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_switch/flutter_switch.dart';
|
||||||
|
|
||||||
|
class businessdetail extends StatefulWidget {
|
||||||
|
const businessdetail({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<businessdetail> createState() => _businessdetailState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _businessdetailState extends State<businessdetail> {
|
||||||
|
bool status = false;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
backgroundColor: Colors.white,
|
||||||
|
body: Column(
|
||||||
|
children: [
|
||||||
|
Spacer(),
|
||||||
|
SafeArea(
|
||||||
|
child: Center(
|
||||||
|
child: Container(
|
||||||
|
height: 200,
|
||||||
|
width: 320,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
image: const DecorationImage(
|
||||||
|
image: AssetImage('assets/images/bg.png'),
|
||||||
|
fit: BoxFit.fitHeight,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.all(
|
||||||
|
Radius.circular(5),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.only(left: 24, top: 10, right: 10),
|
||||||
|
child: Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
FloatingActionButton(
|
||||||
|
child: Icon(
|
||||||
|
Icons.arrow_back,
|
||||||
|
size: 24,
|
||||||
|
color: Color(0xFF3D3D3D),
|
||||||
|
),
|
||||||
|
backgroundColor: Colors.white,
|
||||||
|
onPressed: () {},
|
||||||
|
),
|
||||||
|
Spacer(),
|
||||||
|
FlutterSwitch(
|
||||||
|
width: 110,
|
||||||
|
height: 60,
|
||||||
|
valueFontSize: 15,
|
||||||
|
toggleSize: 25,
|
||||||
|
value: status,
|
||||||
|
borderRadius: 30.0,
|
||||||
|
padding: 8.0,
|
||||||
|
showOnOff: true,
|
||||||
|
onToggle: (val) {
|
||||||
|
setState(() {
|
||||||
|
status = val;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
activeText: "OPEN",
|
||||||
|
activeSwitchBorder:
|
||||||
|
Border.all(color: Colors.white, width: 12),
|
||||||
|
inactiveSwitchBorder:
|
||||||
|
Border.all(color: Colors.white, width: 12),
|
||||||
|
activeTextColor: Colors.white,
|
||||||
|
activeTextFontWeight: FontWeight.w600,
|
||||||
|
activeColor: Color(0xFF09CD99),
|
||||||
|
inactiveText: "CLOSED",
|
||||||
|
inactiveTextColor: Colors.white,
|
||||||
|
inactiveTextFontWeight: FontWeight.w600,
|
||||||
|
inactiveColor: Color(0xFFFF4B4C),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Spacer(),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
@ -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.16.0"
|
version: "1.15.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.3.0"
|
version: "1.2.0"
|
||||||
ffi:
|
ffi:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -239,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.4"
|
version: "0.6.3"
|
||||||
libphonenumber:
|
libphonenumber:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -288,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.4"
|
version: "0.1.3"
|
||||||
meta:
|
meta:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -302,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.1"
|
version: "1.8.0"
|
||||||
path_drawing:
|
path_drawing:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -468,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.2"
|
version: "1.8.1"
|
||||||
stack_trace:
|
stack_trace:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -503,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.9"
|
version: "0.4.8"
|
||||||
typed_data:
|
typed_data:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -524,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.2"
|
version: "2.1.1"
|
||||||
win32:
|
win32:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -554,5 +554,5 @@ packages:
|
|||||||
source: hosted
|
source: hosted
|
||||||
version: "3.1.0"
|
version: "3.1.0"
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=2.17.0-0 <3.0.0"
|
dart: ">=2.16.2 <3.0.0"
|
||||||
flutter: ">=2.10.0-0"
|
flutter: ">=2.10.0-0"
|
||||||
|
Loading…
Reference in New Issue
Block a user