From 6ad6ade5f881655bda8a1b33a663fc382eeaec14 Mon Sep 17 00:00:00 2001 From: vignesh Date: Fri, 10 Jun 2022 00:13:12 +0530 Subject: [PATCH] Built APK error fixing --- openclosenew/lib/11_busiesshome.dart | 52 +- openclosenew/lib/15_addbusinessdetails.dart | 7 +- openclosenew/lib/19-AddProductFrom.dart | 610 +++++++++++--------- openclosenew/lib/BottomNavigation.dart | 72 +++ openclosenew/lib/businessaddedsuccess.dart | 4 +- openclosenew/lib/businessempty.dart | 144 ++--- 6 files changed, 457 insertions(+), 432 deletions(-) create mode 100644 openclosenew/lib/BottomNavigation.dart diff --git a/openclosenew/lib/11_busiesshome.dart b/openclosenew/lib/11_busiesshome.dart index 6e1ed7b..0cc2c15 100644 --- a/openclosenew/lib/11_busiesshome.dart +++ b/openclosenew/lib/11_busiesshome.dart @@ -18,14 +18,6 @@ class _businesshomeState extends State { bool status1 = true; bool status2 = true; - int _selectedIndex = 0; - - void _onItemTapped(int index) { - setState(() { - _selectedIndex = index; - }); - } - @override Widget build(BuildContext context) { return Scaffold( @@ -324,7 +316,7 @@ class _businesshomeState extends State { ], ), Container( - height: 390, + height: 400, child: ListView( scrollDirection: Axis.vertical, children: [ @@ -733,48 +725,6 @@ class _businesshomeState extends State { ], ), ), - Spacer(), - BottomNavigationBar( - iconSize: 20, - unselectedFontSize: SubText, - selectedFontSize: SubText, - type: BottomNavigationBarType.fixed, - items: const [ - BottomNavigationBarItem( - icon: ImageIcon( - AssetImage('assets/images/store.png'), - ), - label: 'Business', - ), - BottomNavigationBarItem( - icon: ImageIcon( - AssetImage('assets/images/messages.png'), - ), - label: 'Chat', - ), - BottomNavigationBarItem( - icon: ImageIcon( - AssetImage('assets/images/discount.png'), - ), - label: 'Offer', - ), - BottomNavigationBarItem( - icon: ImageIcon( - AssetImage('assets/images/profile.png'), - ), - label: 'Profile', - ), - BottomNavigationBarItem( - icon: ImageIcon( - AssetImage('assets/images/setting.png'), - ), - label: 'Settings', - ), - ], - currentIndex: _selectedIndex, - selectedItemColor: primaryColor, - onTap: _onItemTapped, - ), ], ), ); diff --git a/openclosenew/lib/15_addbusinessdetails.dart b/openclosenew/lib/15_addbusinessdetails.dart index 72d5ecd..23f2483 100644 --- a/openclosenew/lib/15_addbusinessdetails.dart +++ b/openclosenew/lib/15_addbusinessdetails.dart @@ -1,6 +1,5 @@ import 'package:flutter/material.dart'; import 'package:openclosenew/colors.dart'; -import 'package:openclosenew/pages/page_1.dart'; import '17-BusinessProfileFormSuccess.dart'; import 'FontFamily.dart'; @@ -277,8 +276,10 @@ class _addbusinessdetailsState extends State { shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(4)), onPressed: () { - Navigator.push(context, - MaterialPageRoute(builder: (_) => page1())); + Navigator.push( + context, + MaterialPageRoute( + builder: (_) => profileformsuccess())); }, child: Text( 'Save', diff --git a/openclosenew/lib/19-AddProductFrom.dart b/openclosenew/lib/19-AddProductFrom.dart index cb7d632..dde7af4 100644 --- a/openclosenew/lib/19-AddProductFrom.dart +++ b/openclosenew/lib/19-AddProductFrom.dart @@ -33,298 +33,350 @@ class _addproductfromState extends State { loadData(); return Scaffold( body: SafeArea( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: const EdgeInsets.only(left: 10), - child: Row( - children: [ - IconButton( - icon: Icon(Icons.arrow_back, size: 24), - onPressed: () { - Navigator.pop(context); - }, - ), - SizedBox( - width: 20, - ), - Text( - 'Add Business Detail', - style: TextStyle( - fontSize: HeadText, - color: DarkGray, - fontFamily: Font, - ), - ), - ], - ), - ), - Padding( - padding: const EdgeInsets.only(left: 25, top: 20, right: 20), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - 'Item Name', - style: TextStyle( - fontFamily: Font, - fontStyle: FontStyle.normal, - fontWeight: FontWeight.w300, - fontSize: HeadText, - color: DarkGray, - ), - ), - SizedBox( - height: 20, - ), - TextField( - decoration: InputDecoration( - contentPadding: - EdgeInsets.only(left: 10, top: 10, bottom: 10), - border: OutlineInputBorder( - borderRadius: BorderRadius.circular(5)), - hintText: 'Type here...', - ), - ), - SizedBox( - height: 20, - ), - Text( - 'Category', - style: TextStyle( - fontFamily: Font, - fontStyle: FontStyle.normal, - fontWeight: FontWeight.w300, - fontSize: HeadText, - color: DarkGray, - ), - ), - ], - ), - ), - SizedBox( - height: 20, - ), - Padding( - padding: const EdgeInsets.only(left: 25, right: 20), - child: 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( - borderRadius: BorderRadius.circular(5), - value: selected, - items: listDrop, - icon: Icon(Icons.keyboard_arrow_down, size: 24), - hint: new Text('Choose...'), - onChanged: (value) { - selected = value as String?; - setState(() {}); - }, - ), - ), - ), - ), - ), - SizedBox( - height: 20, - ), - Padding( - padding: const EdgeInsets.only(left: 25), - child: Text( - 'Price', - style: TextStyle( - fontFamily: Font, - fontStyle: FontStyle.normal, - fontWeight: FontWeight.w300, - fontSize: HeadText, - color: DarkGray, - ), - ), - ), - SizedBox( - height: 20, - ), - Padding( - padding: const EdgeInsets.only(left: 25, right: 20), - child: TextField( - keyboardType: TextInputType.number, - decoration: InputDecoration( - prefixIcon: Image.asset( - 'assets/images/dollor.png', - width: 10, - height: 10, - ), - contentPadding: - EdgeInsets.only(left: 10, top: 10, bottom: 10), - border: OutlineInputBorder( - borderRadius: BorderRadius.circular(5), - ), - hintText: '00.00', - ), - ), - ), - SizedBox( - height: 20, - ), - Padding( - padding: const EdgeInsets.only(left: 25), - child: Text( - 'Upload photo', - style: TextStyle( - fontFamily: Font, - fontStyle: FontStyle.normal, - fontWeight: FontWeight.w300, - fontSize: HeadText, - color: DarkGray, - ), - ), - ), - InkWell( - onTap: () { - showModalBottomSheet( - context: context, - builder: (BuildContext context) { - return Container( - height: 200, - color: Colors.white, - child: Center( - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - SizedBox( - height: 20, - ), - Text( - "Choose You Image", - style: TextStyle( - fontSize: 20, - fontFamily: Font, - fontStyle: FontStyle.normal, - fontWeight: FontWeight.bold), - ), - SizedBox(height: 30), - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - IconButton( - onPressed: () {}, - icon: Icon(Icons.camera), - iconSize: 30, - ), - Text( - 'Camera', - style: TextStyle( - fontSize: 15, - fontFamily: Font, - fontStyle: FontStyle.normal, - fontWeight: FontWeight.w300, - color: Color(0xFF333333), - ), - ), - SizedBox( - width: 50, - ), - IconButton( - onPressed: () {}, - icon: Icon(Icons.image_rounded), - iconSize: 30, - ), - Text( - 'Gallery', - style: TextStyle( - fontSize: 15, - fontFamily: Font, - fontStyle: FontStyle.normal, - fontWeight: FontWeight.w300, - color: Color(0xFF333333), - ), - ), - ], - ) - ], - ), - ), - ); - }, - ); - }, - child: Padding( - padding: const EdgeInsets.only(left: 25, top: 5), - child: DottedBorder( - padding: EdgeInsets.all(45), - dashPattern: [4, 4, 4, 4], - radius: Radius.circular(10), - color: primaryColor, - child: Image.asset( - 'assets/images/insert_logo.png', - width: 30, - height: 30, - color: primaryColor, - ), - ), - ), - ), - Spacer(), - Row( - children: [ - Expanded( - child: Padding( - padding: const EdgeInsets.only(left: 24, bottom: 24), - child: MaterialButton( - height: 50, - minWidth: double.infinity, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(4)), + child: SingleChildScrollView( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.only(left: 10), + child: Row( + children: [ + IconButton( + icon: Icon(Icons.arrow_back, size: 24), onPressed: () { Navigator.pop(context); }, - child: Text( - "Cancel", - style: TextStyle( - color: Gray, - fontFamily: Font, + ), + SizedBox( + width: 20, + ), + Text( + 'Add Business Detail', + style: TextStyle( + fontSize: HeadText, + color: DarkGray, + fontFamily: Font, + ), + ), + ], + ), + ), + Row( + children: [ + Expanded( + child: Padding( + padding: const EdgeInsets.only(left: 24, bottom: 24), + child: MaterialButton( + height: 50, + minWidth: double.infinity, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(4)), + onPressed: () { + Navigator.pop(context); + }, + child: Text( + "Cancel", + style: TextStyle( + color: Gray, + fontFamily: Font, + ), ), ), ), ), + Expanded( + child: Padding( + padding: const EdgeInsets.only(right: 24, bottom: 24), + child: MaterialButton( + height: 50, + minWidth: double.infinity, + color: primaryColor, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(4)), + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (_) => businessdetail())); + }, + child: Text( + 'Save', + style: TextStyle( + color: White, + fontSize: HeadText, + fontFamily: Font, + ), + ), + ), + ), + ), + ], + ), + Padding( + padding: const EdgeInsets.only(left: 25, top: 15, right: 20), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'Item Name', + style: TextStyle( + fontFamily: Font, + fontStyle: FontStyle.normal, + fontWeight: FontWeight.w300, + fontSize: HeadText, + color: DarkGray, + ), + ), + SizedBox( + height: 20, + ), + TextField( + decoration: InputDecoration( + contentPadding: + EdgeInsets.only(left: 10, top: 10, bottom: 10), + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(5)), + hintText: 'Type here...', + ), + ), + SizedBox( + height: 20, + ), + Text( + 'Category', + style: TextStyle( + fontFamily: Font, + fontStyle: FontStyle.normal, + fontWeight: FontWeight.w300, + fontSize: HeadText, + color: DarkGray, + ), + ), + ], ), - Expanded( - child: Padding( - padding: const EdgeInsets.only(right: 24, bottom: 24), - child: MaterialButton( - height: 50, - minWidth: double.infinity, + ), + SizedBox( + height: 20, + ), + Padding( + padding: const EdgeInsets.only(left: 25, right: 20), + child: 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( + borderRadius: BorderRadius.circular(5), + value: selected, + items: listDrop, + icon: Icon(Icons.keyboard_arrow_down, size: 24), + hint: new Text('Choose...'), + onChanged: (value) { + selected = value as String?; + setState(() {}); + }, + ), + ), + ), + ), + ), + SizedBox( + height: 20, + ), + Padding( + padding: const EdgeInsets.only(left: 25), + child: Text( + 'Price', + style: TextStyle( + fontFamily: Font, + fontStyle: FontStyle.normal, + fontWeight: FontWeight.w300, + fontSize: HeadText, + color: DarkGray, + ), + ), + ), + SizedBox( + height: 20, + ), + Padding( + padding: const EdgeInsets.only(left: 25, right: 20), + child: TextField( + keyboardType: TextInputType.number, + decoration: InputDecoration( + prefixIcon: Image.asset( + 'assets/images/dollor.png', + width: 10, + height: 10, + ), + contentPadding: + EdgeInsets.only(left: 10, top: 10, bottom: 10), + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(5), + ), + hintText: '00.00', + ), + ), + ), + SizedBox( + height: 20, + ), + Padding( + padding: const EdgeInsets.only(left: 25), + child: Text( + 'Upload photo', + style: TextStyle( + fontFamily: Font, + fontStyle: FontStyle.normal, + fontWeight: FontWeight.w300, + fontSize: HeadText, + color: DarkGray, + ), + ), + ), + InkWell( + onTap: () { + showModalBottomSheet( + context: context, + builder: (BuildContext context) { + return Container( + height: 200, + color: Colors.white, + child: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + SizedBox( + height: 20, + ), + Text( + "Choose You Image", + style: TextStyle( + fontSize: 20, + fontFamily: Font, + fontStyle: FontStyle.normal, + fontWeight: FontWeight.bold), + ), + SizedBox(height: 30), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + IconButton( + onPressed: () {}, + icon: Icon(Icons.camera), + iconSize: 30, + ), + Text( + 'Camera', + style: TextStyle( + fontSize: 15, + fontFamily: Font, + fontStyle: FontStyle.normal, + fontWeight: FontWeight.w300, + color: Color(0xFF333333), + ), + ), + SizedBox( + width: 50, + ), + IconButton( + onPressed: () {}, + icon: Icon(Icons.image_rounded), + iconSize: 30, + ), + Text( + 'Gallery', + style: TextStyle( + fontSize: 15, + fontFamily: Font, + fontStyle: FontStyle.normal, + fontWeight: FontWeight.w300, + color: Color(0xFF333333), + ), + ), + ], + ) + ], + ), + ), + ); + }, + ); + }, + child: Padding( + padding: const EdgeInsets.only(left: 25, top: 5), + child: DottedBorder( + padding: EdgeInsets.all(45), + dashPattern: [4, 4, 4, 4], + radius: Radius.circular(10), + color: primaryColor, + child: Image.asset( + 'assets/images/insert_logo.png', + width: 30, + height: 30, color: primaryColor, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(4)), - onPressed: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (_) => businessdetail())); - }, - child: Text( - 'Save', - style: TextStyle( - color: White, - fontSize: HeadText, - fontFamily: Font, + ), + ), + ), + ), + Row( + children: [ + Expanded( + child: Padding( + padding: const EdgeInsets.only(left: 24, bottom: 24), + child: MaterialButton( + height: 50, + minWidth: double.infinity, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(4)), + onPressed: () { + Navigator.pop(context); + }, + child: Text( + "Cancel", + style: TextStyle( + color: Gray, + fontFamily: Font, + ), ), ), ), ), - ), - ], - ), - ], + Expanded( + child: Padding( + padding: const EdgeInsets.only(right: 24, bottom: 24), + child: MaterialButton( + height: 50, + minWidth: double.infinity, + color: primaryColor, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(4)), + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (_) => businessdetail())); + }, + child: Text( + 'Save', + style: TextStyle( + color: White, + fontSize: HeadText, + fontFamily: Font, + ), + ), + ), + ), + ), + ], + ), + ], + ), ), ), ); diff --git a/openclosenew/lib/BottomNavigation.dart b/openclosenew/lib/BottomNavigation.dart new file mode 100644 index 0000000..52e4706 --- /dev/null +++ b/openclosenew/lib/BottomNavigation.dart @@ -0,0 +1,72 @@ +import 'package:flutter/material.dart'; +import 'package:openclosenew/11_busiesshome.dart'; + +import 'businessempty.dart'; +import 'colors.dart'; +import 'fontsize.dart'; + +class bottomnavigation extends StatefulWidget { + const bottomnavigation({Key? key}) : super(key: key); + + @override + State createState() => _bottomnavigationState(); +} + +class _bottomnavigationState extends State { + int _selectedIndex = 0; + final screens = [ + businessempty(), + Scaffold(), + Scaffold(), + Scaffold(), + Scaffold(), + ]; + + @override + Widget build(BuildContext context) { + return Scaffold( + body: screens[_selectedIndex], + bottomNavigationBar: BottomNavigationBar( + iconSize: 20, + unselectedFontSize: SubText, + selectedFontSize: SubText, + type: BottomNavigationBarType.fixed, + items: const [ + BottomNavigationBarItem( + icon: ImageIcon( + AssetImage('assets/images/store.png'), + ), + label: 'Business', + ), + BottomNavigationBarItem( + icon: ImageIcon( + AssetImage('assets/images/messages.png'), + ), + label: 'Chat', + ), + BottomNavigationBarItem( + icon: ImageIcon( + AssetImage('assets/images/discount.png'), + ), + label: 'Offer', + ), + BottomNavigationBarItem( + icon: ImageIcon( + AssetImage('assets/images/profile.png'), + ), + label: 'Profile', + ), + BottomNavigationBarItem( + icon: ImageIcon( + AssetImage('assets/images/setting.png'), + ), + label: 'Settings', + ), + ], + currentIndex: _selectedIndex, + selectedItemColor: primaryColor, + onTap: (screens) => setState(() => this._selectedIndex = screens), + ), + ); + } +} diff --git a/openclosenew/lib/businessaddedsuccess.dart b/openclosenew/lib/businessaddedsuccess.dart index c1ea5e6..48e51b3 100644 --- a/openclosenew/lib/businessaddedsuccess.dart +++ b/openclosenew/lib/businessaddedsuccess.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:openclosenew/businessempty.dart'; import 'package:openclosenew/colors.dart'; +import 'BottomNavigation.dart'; import 'FontFamily.dart'; import 'fontsize.dart'; @@ -52,7 +52,7 @@ class businessaddedsuccess extends StatelessWidget { borderRadius: BorderRadius.circular(4)), onPressed: () { Navigator.push(context, - MaterialPageRoute(builder: (_) => businessempty())); + MaterialPageRoute(builder: (_) => bottomnavigation())); }, child: Text( 'Let’s Explore', diff --git a/openclosenew/lib/businessempty.dart b/openclosenew/lib/businessempty.dart index 6e70c0d..f8ccced 100644 --- a/openclosenew/lib/businessempty.dart +++ b/openclosenew/lib/businessempty.dart @@ -14,22 +14,14 @@ class businessempty extends StatefulWidget { } class _businessemptyState extends State { - int _selectedIndex = 0; - - void _onItemTapped(int index) { - setState(() { - _selectedIndex = index; - }); - } - @override Widget build(BuildContext context) { return Scaffold( backgroundColor: Colors.white, - body: Column( - children: [ - SafeArea( - child: Row( + body: SafeArea( + child: Column( + children: [ + Row( crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.center, children: [ @@ -82,94 +74,52 @@ class _businessemptyState extends State { ), ], ), - ), - Spacer(), - Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - DottedBorder( - dashPattern: [5, 5, 5, 5], - color: primaryColor, - padding: EdgeInsets.all(5), - radius: Radius.circular(6), - child: Container( - height: 100, - width: 330, - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - IconButton( - icon: Image.asset( - 'assets/images/shop.png', - color: primaryColor, + Spacer(), + Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + DottedBorder( + dashPattern: [5, 5, 5, 5], + color: primaryColor, + padding: EdgeInsets.all(5), + radius: Radius.circular(6), + child: Container( + height: 100, + width: 330, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + IconButton( + icon: Image.asset( + 'assets/images/shop.png', + color: primaryColor, + ), + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (_) => businesshome())); + }, ), - onPressed: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (_) => businesshome())); - }, - ), - Text( - 'Add your Business', - style: TextStyle( - fontFamily: Font, - fontStyle: FontStyle.normal, - fontWeight: FontWeight.w400, - fontSize: HeadText, - color: primaryColor, - ), - ) - ], + Text( + 'Add your Business', + style: TextStyle( + fontFamily: Font, + fontStyle: FontStyle.normal, + fontWeight: FontWeight.w400, + fontSize: HeadText, + color: primaryColor, + ), + ) + ], + ), ), ), - ), - ], - ), - Spacer(), - BottomNavigationBar( - iconSize: 20, - unselectedFontSize: SubText, - selectedFontSize: SubText, - type: BottomNavigationBarType.fixed, - items: const [ - BottomNavigationBarItem( - icon: ImageIcon( - AssetImage('assets/images/store.png'), - ), - label: 'Business', - ), - BottomNavigationBarItem( - icon: ImageIcon( - AssetImage('assets/images/messages.png'), - ), - label: 'Chat', - ), - BottomNavigationBarItem( - icon: ImageIcon( - AssetImage('assets/images/discount.png'), - ), - label: 'Offer', - ), - BottomNavigationBarItem( - icon: ImageIcon( - AssetImage('assets/images/profile.png'), - ), - label: 'Profile', - ), - BottomNavigationBarItem( - icon: ImageIcon( - AssetImage('assets/images/setting.png'), - ), - label: 'Settings', - ), - ], - currentIndex: _selectedIndex, - selectedItemColor: primaryColor, - onTap: _onItemTapped, - ), - ], + ], + ), + Spacer(), + ], + ), ), ); }