diff --git a/openclosenew/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/openclosenew/android/app/src/main/res/mipmap-hdpi/ic_launcher.png index db77bb4..0246c6f 100644 Binary files a/openclosenew/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and b/openclosenew/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/openclosenew/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/openclosenew/android/app/src/main/res/mipmap-mdpi/ic_launcher.png index 17987b7..59d7d49 100644 Binary files a/openclosenew/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and b/openclosenew/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/openclosenew/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/openclosenew/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png index 09d4391..f5f1c5e 100644 Binary files a/openclosenew/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and b/openclosenew/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/openclosenew/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/openclosenew/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png index d5f1c8d..02a8bf8 100644 Binary files a/openclosenew/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and b/openclosenew/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/openclosenew/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/openclosenew/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png index 4d6372e..d74cf0f 100644 Binary files a/openclosenew/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and b/openclosenew/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/openclosenew/assets/images/bg.png b/openclosenew/assets/images/bg.png new file mode 100644 index 0000000..8ff0601 Binary files /dev/null and b/openclosenew/assets/images/bg.png differ diff --git a/openclosenew/lib/11_busiesshome.dart b/openclosenew/lib/11_busiesshome.dart index afbb84c..5b4dcfe 100644 --- a/openclosenew/lib/11_busiesshome.dart +++ b/openclosenew/lib/11_busiesshome.dart @@ -1,5 +1,8 @@ +import 'dart:ffi'; + 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 { const businesshome({Key? key}) : super(key: key); @@ -9,6 +12,10 @@ class businesshome extends StatefulWidget { } class _businesshomeState extends State { + bool status = true; + + static const Color newColor = Colors.black; + int _selectedIndex = 0; static const TextStyle optionStyle = TextStyle( fontFamily: 'Manrope', @@ -98,19 +105,18 @@ class _businesshomeState extends State { ), ), Spacer(), - SingleChildScrollView( - scrollDirection: Axis.horizontal, - child: Container( - margin: const EdgeInsets.symmetric(vertical: 20, horizontal: 20), - child: FittedBox( - fit: BoxFit.fill, - alignment: Alignment.topCenter, - child: Row( - children: [ - Container( - width: 350, + Container( + height: 100, + child: ListView( + scrollDirection: Axis.horizontal, + children: [ + Padding( + padding: const EdgeInsets.only(left: 22), + child: InkWell( + onTap: () {}, + child: Container( + width: 320, margin: EdgeInsets.only(right: 10), - height: 100, decoration: BoxDecoration( image: const DecorationImage( alignment: Alignment.centerRight, @@ -160,19 +166,27 @@ class _businesshomeState extends State { ), ), ), - Container( - width: 350, + ), + ), + Padding( + padding: const EdgeInsets.only(left: 10), + child: InkWell( + onTap: () {}, + child: Container( + width: 320, margin: EdgeInsets.only(right: 10), - height: 100, decoration: BoxDecoration( - image: const DecorationImage( - alignment: Alignment.centerRight, - image: AssetImage('assets/images/status.png'), - ), - color: Color(0xFF09CD99), - borderRadius: BorderRadius.all(Radius.circular(5))), + 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(12), + padding: const EdgeInsets.all(14), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -187,7 +201,7 @@ class _businesshomeState extends State { ), ), Text( - "42", + "43", style: TextStyle( fontFamily: 'Manrope', fontStyle: FontStyle.normal, @@ -210,19 +224,27 @@ class _businesshomeState extends State { ), ), ), - Container( - width: 350, + ), + ), + Padding( + padding: const EdgeInsets.only(left: 10), + child: InkWell( + onTap: () {}, + child: Container( + width: 320, margin: EdgeInsets.only(right: 10), - height: 100, decoration: BoxDecoration( - image: const DecorationImage( - alignment: Alignment.centerRight, - image: AssetImage('assets/images/status.png'), - ), - color: Color(0xFF09CD99), - borderRadius: BorderRadius.all(Radius.circular(5))), + 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(12), + padding: const EdgeInsets.all(14), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -237,7 +259,7 @@ class _businesshomeState extends State { ), ), Text( - "42", + "44", style: TextStyle( fontFamily: 'Manrope', fontStyle: FontStyle.normal, @@ -260,9 +282,237 @@ class _businesshomeState extends State { ), ), ), - ], + ), + ), + ], + ), + ), + 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(), diff --git a/openclosenew/pubspec.lock b/openclosenew/pubspec.lock index a9d2c24..1907adc 100644 --- a/openclosenew/pubspec.lock +++ b/openclosenew/pubspec.lock @@ -56,7 +56,7 @@ packages: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.15.0" + version: "1.16.0" cross_file: dependency: transitive description: @@ -98,7 +98,7 @@ packages: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.3.0" ffi: dependency: transitive description: @@ -139,6 +139,13 @@ packages: url: "https://pub.dartlang.org" source: hosted 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: dependency: "direct dev" description: flutter @@ -232,7 +239,7 @@ packages: name: js url: "https://pub.dartlang.org" source: hosted - version: "0.6.3" + version: "0.6.4" libphonenumber: dependency: transitive description: @@ -281,7 +288,7 @@ packages: name: material_color_utilities url: "https://pub.dartlang.org" source: hosted - version: "0.1.3" + version: "0.1.4" meta: dependency: transitive description: @@ -295,7 +302,7 @@ packages: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.0" + version: "1.8.1" path_drawing: dependency: transitive description: @@ -461,7 +468,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.1" + version: "1.8.2" stack_trace: dependency: transitive description: @@ -496,7 +503,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.8" + version: "0.4.9" typed_data: dependency: transitive description: @@ -517,7 +524,7 @@ packages: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.1" + version: "2.1.2" win32: dependency: transitive description: @@ -547,5 +554,5 @@ packages: source: hosted version: "3.1.0" sdks: - dart: ">=2.16.2 <3.0.0" + dart: ">=2.17.0-0 <3.0.0" flutter: ">=2.10.0-0" diff --git a/openclosenew/pubspec.yaml b/openclosenew/pubspec.yaml index e881452..a26b6d5 100644 --- a/openclosenew/pubspec.yaml +++ b/openclosenew/pubspec.yaml @@ -31,6 +31,7 @@ dependencies: sdk: flutter snippet_coder_utils: ^1.0.8 dotted_border: ^2.0.0+2 + flutter_switch: ^0.3.2 # The following adds the Cupertino Icons fonts to your application.