diff --git a/openclosenew/assets/images/location.png b/openclosenew/assets/images/location.png new file mode 100644 index 0000000..01b723f Binary files /dev/null and b/openclosenew/assets/images/location.png differ diff --git a/openclosenew/assets/images/success.png b/openclosenew/assets/images/success.png new file mode 100644 index 0000000..8cb7fa8 Binary files /dev/null and b/openclosenew/assets/images/success.png differ diff --git a/openclosenew/lib/07_addbusiness.dart b/openclosenew/lib/07_addbusiness.dart index d0f6fe0..67a6a18 100644 --- a/openclosenew/lib/07_addbusiness.dart +++ b/openclosenew/lib/07_addbusiness.dart @@ -1,5 +1,7 @@ +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/widgets.dart'; +import 'package:openclosenew/businessaddedsuccess.dart'; class addbusiness extends StatefulWidget { addbusiness({Key? key}) : super(key: key); @@ -9,204 +11,335 @@ class addbusiness extends StatefulWidget { } class _addbusinessState extends State { - late String valuChoose; - List ListItem = ["item 1", "item 2", "item 3", "item 4", "item 5"]; + List> listDrop = []; + String? selected = null; + void loadData() { + listDrop = []; + listDrop.add(new DropdownMenuItem( + child: new Text('Item No.1'), + value: 'val-1', + )); + listDrop.add(new DropdownMenuItem( + child: new Text('Item No.2'), + value: 'val-2', + )); + listDrop.add(new DropdownMenuItem( + child: new Text('Item No.3'), + value: 'val-3', + )); + } + + List> listDrop1 = []; + String? selected1 = null; + void loadData1() { + listDrop1 = []; + listDrop1.add(new DropdownMenuItem( + child: new Text('Item No.1'), + value: 'val-1', + )); + listDrop1.add(new DropdownMenuItem( + child: new Text('Item No.2'), + value: 'val-2', + )); + listDrop1.add(new DropdownMenuItem( + child: new Text('Item No.3'), + value: 'val-3', + )); + } + @override Widget build(BuildContext context) { + loadData(); + loadData1(); return Scaffold( backgroundColor: Colors.white, - body: Column( - children: [ - SizedBox( - height: 50, - ), - Padding( - padding: const EdgeInsets.only(left: 15, right: 24), - child: Row( - children: [ - IconButton( - icon: Icon(Icons.arrow_back, size: 24), - onPressed: () { - Navigator.pop(context); - }, - ), - SizedBox( - width: 20, - ), - Text( - 'Add Business', - style: TextStyle( - fontSize: 15, - color: Color(0xff3D3D3D), - fontFamily: 'assets/fonts/Manrope-Medium.ttf', - ), - ) - ], + body: SingleChildScrollView( + reverse: true, + child: Column( + children: [ + SizedBox( + height: 50, ), - ), - Container( - child: Column( - children: [ - Image.asset( - 'assets/images/gallery-icon.png', - ), - SizedBox( - height: 10, - ), - Text( - 'Uploading Logo', - style: TextStyle( - color: Colors.grey, - fontSize: 14, - fontWeight: FontWeight.w400, - fontFamily: 'Manrope'), - ), - ], + Padding( + padding: const EdgeInsets.only(left: 15, right: 24), + child: Row( + children: [ + IconButton( + icon: Icon(Icons.arrow_back, size: 24), + onPressed: () { + Navigator.pop(context); + }, + ), + SizedBox( + width: 20, + ), + Text( + 'Add Business', + style: TextStyle( + fontSize: 15, + color: Color(0xff3D3D3D), + fontFamily: 'assets/fonts/Manrope-Medium.ttf', + ), + ) + ], + ), ), - decoration: BoxDecoration( - shape: BoxShape.circle, - color: Colors.black, + Container( + child: Column( + children: [ + Image.asset( + 'assets/images/gallery-icon.png', + ), + SizedBox( + height: 10, + ), + Text( + 'Uploading Logo', + style: TextStyle( + color: Colors.grey, + fontSize: 14, + fontWeight: FontWeight.w400, + fontFamily: 'Manrope'), + ), + ], + ), + decoration: BoxDecoration( + shape: BoxShape.circle, + color: Colors.white, + ), + margin: EdgeInsets.all(15), + padding: EdgeInsets.all(30), ), - margin: EdgeInsets.all(15), - padding: EdgeInsets.all(30), - ), - Container( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: const EdgeInsets.only( - left: 24, - top: 10, - right: 24, - ), - child: Text( - 'Business Name', - style: TextStyle( - fontFamily: "Manrope", - fontSize: 14, - color: Color(0xff333333), + Container( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.only( + left: 24, + top: 10, + right: 24, ), - ), - ), - Padding( - padding: const EdgeInsets.only(left: 24, right: 24, top: 10), - child: TextField( - decoration: InputDecoration( - border: InputBorder.none, - hintText: 'Type here...', - ), - ), - ), - Padding( - padding: const EdgeInsets.only( - left: 24, - top: 10, - right: 24, - ), - child: Text( - 'Contact Number', - style: TextStyle( - fontFamily: "Manrope", - fontSize: 14, - color: Color(0xff333333), - ), - ), - ), - Padding( - padding: const EdgeInsets.only(left: 24, right: 24, top: 10), - child: TextField( - decoration: InputDecoration( - border: InputBorder.none, - hintText: 'Type here...', - ), - ), - ), - Padding( - padding: const EdgeInsets.only( - left: 24, - top: 10, - right: 24, - ), - child: Text( - 'Tell about your business...', - style: TextStyle( - fontFamily: "Manrope", - fontSize: 14, - color: Color(0xff333333), - ), - ), - ), - Padding( - padding: const EdgeInsets.only(left: 24, right: 24, top: 10), - child: TextField( - maxLines: 5, - keyboardType: TextInputType.multiline, - decoration: InputDecoration( - border: InputBorder.none, - hintText: 'Type here...', - ), - ), - ), - Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - SizedBox( - width: 28, - ), - Text('Industry'), - SizedBox( - width: 120, - ), - Text('Category'), - ], - ), - Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - SizedBox( - width: 28, - ), - DropdownButton( - hint: Text( - 'Food', - style: TextStyle(color: Color(0xff3D3D3D)), + child: Text( + 'Business Name', + style: TextStyle( + fontFamily: "Manrope", + fontSize: 14, + color: Color(0xff333333), ), - iconSize: 14, - icon: Icon(Icons.keyboard_arrow_down, size: 24), - items: [ - DropdownMenuItem( - value: "1", - child: Center( - child: Text("one"), - ), - ) - ], - onChanged: (_value) => { - print(_value.toString()), - }, ), - Spacer(), - DropdownButton( - items: [ - DropdownMenuItem( - value: "1", - child: Center( - child: Text("one"), + ), + Padding( + padding: + const EdgeInsets.only(left: 24, right: 24, top: 10), + child: TextField( + decoration: InputDecoration( + contentPadding: + EdgeInsets.only(left: 10, top: 5, bottom: 5), + border: OutlineInputBorder( + borderRadius: BorderRadius.all( + Radius.circular(5), ), - ) - ], - onChanged: (_value) => { - print(_value.toString()), - }, + ), + hintText: 'Type here...', + ), ), - ], - ), - ], + ), + Padding( + padding: const EdgeInsets.only( + left: 24, + top: 10, + right: 24, + ), + child: Text( + 'Contact Number', + style: TextStyle( + fontFamily: "Manrope", + fontSize: 14, + color: Color(0xff333333), + ), + ), + ), + Padding( + padding: + const EdgeInsets.only(left: 24, right: 24, top: 10), + child: TextField( + decoration: InputDecoration( + contentPadding: + EdgeInsets.only(left: 10, top: 5, bottom: 5), + border: OutlineInputBorder( + borderRadius: BorderRadius.all( + Radius.circular(5), + ), + ), + hintText: 'Type here...', + ), + keyboardType: TextInputType.number, + ), + ), + Padding( + padding: + const EdgeInsets.only(left: 24, top: 10, right: 24), + child: Text( + 'Tell about your business...', + style: TextStyle( + fontFamily: "Manrope", + fontSize: 14, + color: Color(0xff333333), + ), + ), + ), + Padding( + padding: + const EdgeInsets.only(left: 24, right: 24, top: 10), + child: TextField( + maxLines: 4, + keyboardType: TextInputType.multiline, + decoration: InputDecoration( + contentPadding: + EdgeInsets.only(left: 10, top: 5, bottom: 5), + border: OutlineInputBorder( + borderRadius: BorderRadius.all( + Radius.circular(5), + ), + ), + hintText: 'Type here...', + ), + ), + ), + Padding( + padding: const EdgeInsets.only(top: 10), + child: Row( + children: [ + SizedBox( + width: 28, + ), + Text('Industry'), + SizedBox( + width: 120, + ), + Text('Category'), + ], + ), + ), + Padding( + padding: const EdgeInsets.only(top: 5, right: 24), + child: Row( + children: [ + SizedBox( + width: 28, + ), + Expanded( + child: InputDecorator( + decoration: InputDecoration( + contentPadding: EdgeInsets.only( + left: 10, top: 1, bottom: 1, right: 5), + border: OutlineInputBorder( + borderRadius: + BorderRadius.all(Radius.circular(5))), + ), + child: DropdownButtonHideUnderline( + child: new DropdownButton( + value: selected, + items: listDrop, + icon: Icon(Icons.keyboard_arrow_down, size: 24), + hint: new Text('Choose...'), + onChanged: (value) { + selected = value as String?; + setState(() {}); + }, + ), + ), + ), + ), + Expanded( + child: InputDecorator( + decoration: InputDecoration( + contentPadding: EdgeInsets.only( + left: 10, top: 1, bottom: 1, right: 5), + border: OutlineInputBorder( + borderRadius: + BorderRadius.all(Radius.circular(5))), + ), + child: DropdownButtonHideUnderline( + child: new DropdownButton( + value: selected1, + items: listDrop1, + icon: Icon(Icons.keyboard_arrow_down, size: 24), + hint: new Text('Choose...'), + onChanged: (value) { + selected1 = value as String?; + setState(() {}); + }, + ), + ), + ), + ), + ], + ), + ), + SizedBox( + height: 5, + ), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.only(left: 28), + child: Text( + 'Address', + style: TextStyle( + fontFamily: "Manrope", + fontSize: 14, + color: Color(0xff333333), + ), + ), + ), + SizedBox( + height: 5, + ), + Padding( + padding: const EdgeInsets.only(left: 28, right: 24), + child: TextField( + decoration: InputDecoration( + contentPadding: + EdgeInsets.only(left: 10, top: 5, bottom: 5), + border: OutlineInputBorder( + borderRadius: BorderRadius.all( + Radius.circular(5), + ), + ), + hintText: 'Type here...', + suffixIcon: + Image.asset('assets/images/location.png'), + ), + ), + ), + ], + ), + SizedBox( + height: 20, + ), + MaterialButton( + height: 50, + minWidth: double.infinity, + color: Color(0xff12C193), + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (_) => businessaddedsuccess())); + }, + child: Text( + 'Save', + style: TextStyle(color: Colors.white, fontSize: 15), + ), + ), + ], + ), ), - ), - ], + ], + ), ), ); } diff --git a/openclosenew/lib/businessaddedsuccess.dart b/openclosenew/lib/businessaddedsuccess.dart new file mode 100644 index 0000000..293bd40 --- /dev/null +++ b/openclosenew/lib/businessaddedsuccess.dart @@ -0,0 +1,64 @@ +import 'package:flutter/material.dart'; +import 'package:openclosenew/07_addbusiness.dart'; + +class businessaddedsuccess extends StatelessWidget { + const businessaddedsuccess({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return Scaffold( + body: SafeArea( + child: Padding( + padding: EdgeInsets.only(left: 24, right: 24, bottom: 24), + child: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Spacer(), + Image.asset( + 'assets/images/success.png', + ), + SizedBox( + height: 24, + ), + Text( + "Yay!", + style: TextStyle( + fontSize: 24, + color: Color(0xff12C193), + ), + ), + SizedBox( + height: 24, + ), + Text( + "Your business added successfully", + style: TextStyle( + fontSize: 15, + color: Colors.black, + ), + ), + Spacer(), + MaterialButton( + height: 50, + minWidth: double.infinity, + color: Color(0xff12C193), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(4)), + onPressed: () { + Navigator.push(context, + MaterialPageRoute(builder: (_) => addbusiness())); + }, + child: Text( + 'Let’s Explore', + style: TextStyle(color: Colors.white, fontSize: 15), + ), + ), + ], + ), + ), + ), + ), + ); + } +} diff --git a/openclosenew/pubspec.lock b/openclosenew/pubspec.lock index bbb83df..92f177e 100644 --- a/openclosenew/pubspec.lock +++ b/openclosenew/pubspec.lock @@ -131,7 +131,7 @@ packages: name: flutter_plugin_android_lifecycle url: "https://pub.dartlang.org" source: hosted - version: "2.0.5" + version: "2.0.6" flutter_test: dependency: "direct dev" description: flutter @@ -178,33 +178,33 @@ packages: source: hosted version: "3.1.3" image_picker: - dependency: "direct main" + dependency: transitive description: name: image_picker url: "https://pub.dartlang.org" source: hosted - version: "0.8.5" + version: "0.8.5+1" image_picker_android: dependency: transitive description: name: image_picker_android url: "https://pub.dartlang.org" source: hosted - version: "0.8.4+11" + version: "0.8.4+12" image_picker_for_web: dependency: transitive description: name: image_picker_for_web url: "https://pub.dartlang.org" source: hosted - version: "2.1.6" + version: "2.1.7" image_picker_ios: dependency: transitive description: name: image_picker_ios url: "https://pub.dartlang.org" source: hosted - version: "0.8.5" + version: "0.8.5+1" image_picker_platform_interface: dependency: transitive description: @@ -427,6 +427,13 @@ packages: description: flutter source: sdk version: "0.0.99" + snippet_coder_utils: + dependency: "direct main" + description: + name: snippet_coder_utils + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.12" source_span: dependency: transitive description: diff --git a/openclosenew/pubspec.yaml b/openclosenew/pubspec.yaml index e16fc72..19cce59 100644 --- a/openclosenew/pubspec.yaml +++ b/openclosenew/pubspec.yaml @@ -29,6 +29,7 @@ environment: dependencies: flutter: sdk: flutter + snippet_coder_utils: ^1.0.8 # The following adds the Cupertino Icons fonts to your application. @@ -37,7 +38,8 @@ dependencies: shared_preferences: ^2.0.11 intl_phone_number_input: ^0.7.0+2 get: ^4.5.1 - image_picker: ^0.8.5 + + dev_dependencies: