business home switch button updated

This commit is contained in:
vignesh 2022-05-17 23:28:13 +05:30
parent 3299bc4217
commit b15062c31a
2 changed files with 302 additions and 288 deletions

View File

@ -323,7 +323,7 @@ class _addbusinessState extends State<addbusiness> {
),
),
SizedBox(
height: 50,
height: 33,
),
MaterialButton(
height: 50,

View File

@ -12,10 +12,9 @@ class businesshome extends StatefulWidget {
}
class _businesshomeState extends State<businesshome> {
bool status = false;
bool status1 = false;
bool status2 = false;
Color _imageColor = Color.fromRGBO(2989, 5870, 1140, 1);
bool status = true;
bool status1 = true;
bool status2 = true;
int _selectedIndex = 0;
static const TextStyle optionStyle = TextStyle(
@ -244,7 +243,7 @@ class _businesshomeState extends State<businesshome> {
child: InkWell(
onTap: () {},
child: Container(
width: 330,
width: 350,
margin: EdgeInsets.only(right: 10),
decoration: BoxDecoration(
image: const DecorationImage(
@ -348,7 +347,7 @@ class _businesshomeState extends State<businesshome> {
],
),
Container(
height: 420,
height: 400,
child: ListView(
scrollDirection: Axis.vertical,
children: [
@ -360,30 +359,35 @@ class _businesshomeState extends State<businesshome> {
MaterialPageRoute(builder: (_) => businessdetail()));
},
child: Container(
width: 170,
height: 200,
height: 180,
margin: EdgeInsets.only(right: 15),
decoration: BoxDecoration(
image: const DecorationImage(
image: AssetImage('assets/images/bg.png'),
fit: BoxFit.fitHeight,
borderRadius: BorderRadius.all(Radius.circular(5)),
),
color: _imageColor,
borderRadius: BorderRadius.all(
Radius.circular(5),
foregroundDecoration: BoxDecoration(
color: status ? null : Colors.grey,
backgroundBlendMode:
status ? null : BlendMode.saturation,
),
child: Stack(
children: [
Image.asset(
'assets/images/bg.png',
height: 250,
),
child: Column(
Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Row(
children: [
Padding(
padding: const EdgeInsets.only(
left: 15,
top: 100,
),
left: 15, right: 10, top: 75),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.only(),
child: RichText(
text: TextSpan(
text: "Barbeque Nation ",
@ -417,10 +421,7 @@ class _businesshomeState extends State<businesshome> {
),
),
Spacer(),
Padding(
padding: const EdgeInsets.only(
top: 100, left: 3, right: 3),
child: FlutterSwitch(
FlutterSwitch(
width: 105,
height: 40,
valueFontSize: 15,
@ -432,13 +433,6 @@ class _businesshomeState extends State<businesshome> {
onToggle: (val) {
setState(() {
status = val;
if (val) {
_imageColor =
Color.fromRGBO(22, 27, 34, 1);
} else {
_imageColor =
Color.fromRGBO(36, 41, 46, 1);
}
});
},
activeText: "OPEN",
@ -450,9 +444,9 @@ class _businesshomeState extends State<businesshome> {
inactiveTextFontWeight: FontWeight.w600,
inactiveColor: Color(0xFFFF4B4C),
),
),
],
),
),
Padding(
padding: const EdgeInsets.only(
left: 10,
@ -483,37 +477,49 @@ class _businesshomeState extends State<businesshome> {
),
],
),
],
),
),
),
),
Spacer(),
Padding(
padding: const EdgeInsets.only(left: 15, top: 10),
padding: const EdgeInsets.only(left: 15),
child: InkWell(
onTap: () {},
onTap: () {
Navigator.push(context,
MaterialPageRoute(builder: (_) => businessdetail()));
},
child: Container(
width: 170,
height: 200,
margin: EdgeInsets.only(right: 15),
height: 185,
margin: EdgeInsets.only(right: 15, top: 10),
decoration: BoxDecoration(
image: const DecorationImage(
image: AssetImage('assets/images/bg.png'),
fit: BoxFit.fitHeight,
borderRadius: BorderRadius.all(Radius.circular(5)),
),
borderRadius: BorderRadius.all(
Radius.circular(5),
foregroundDecoration: BoxDecoration(
color: status1 ? null : Colors.grey,
backgroundBlendMode:
status1 ? null : BlendMode.saturation,
),
child: Stack(
children: [
Image.asset(
'assets/images/bg.png',
height: 250,
),
child: Column(
Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Row(
children: [
Padding(
padding: const EdgeInsets.only(
left: 15,
top: 100,
),
left: 15, right: 10, top: 75),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.only(),
child: RichText(
text: TextSpan(
text: "Barbeque Nation ",
@ -547,10 +553,7 @@ class _businesshomeState extends State<businesshome> {
),
),
Spacer(),
Padding(
padding: const EdgeInsets.only(
top: 100, left: 3, right: 3),
child: FlutterSwitch(
FlutterSwitch(
width: 105,
height: 40,
valueFontSize: 15,
@ -573,9 +576,9 @@ class _businesshomeState extends State<businesshome> {
inactiveTextFontWeight: FontWeight.w600,
inactiveColor: Color(0xFFFF4B4C),
),
),
],
),
),
Padding(
padding: const EdgeInsets.only(
left: 10,
@ -606,37 +609,49 @@ class _businesshomeState extends State<businesshome> {
),
],
),
],
),
),
),
),
Spacer(),
Padding(
padding: const EdgeInsets.only(left: 15, top: 10),
padding: const EdgeInsets.only(left: 15),
child: InkWell(
onTap: () {},
onTap: () {
Navigator.push(context,
MaterialPageRoute(builder: (_) => businessdetail()));
},
child: Container(
width: 170,
height: 200,
margin: EdgeInsets.only(right: 15),
height: 180,
margin: EdgeInsets.only(right: 15, top: 10),
decoration: BoxDecoration(
image: const DecorationImage(
image: AssetImage('assets/images/bg.png'),
fit: BoxFit.fitHeight,
borderRadius: BorderRadius.all(Radius.circular(5)),
),
borderRadius: BorderRadius.all(
Radius.circular(5),
foregroundDecoration: BoxDecoration(
color: status2 ? null : Colors.grey,
backgroundBlendMode:
status2 ? null : BlendMode.saturation,
),
child: Stack(
children: [
Image.asset(
'assets/images/bg.png',
height: 250,
),
child: Column(
Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Row(
children: [
Padding(
padding: const EdgeInsets.only(
left: 15,
top: 100,
),
left: 15, right: 10, top: 75),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.only(),
child: RichText(
text: TextSpan(
text: "Barbeque Nation ",
@ -670,10 +685,7 @@ class _businesshomeState extends State<businesshome> {
),
),
Spacer(),
Padding(
padding: const EdgeInsets.only(
top: 100, left: 3, right: 3),
child: FlutterSwitch(
FlutterSwitch(
width: 105,
height: 40,
valueFontSize: 15,
@ -696,9 +708,9 @@ class _businesshomeState extends State<businesshome> {
inactiveTextFontWeight: FontWeight.w600,
inactiveColor: Color(0xFFFF4B4C),
),
),
],
),
),
Padding(
padding: const EdgeInsets.only(
left: 10,
@ -729,6 +741,8 @@ class _businesshomeState extends State<businesshome> {
),
],
),
],
),
),
),
),