diff --git a/openclosenew/lib/07_addbusiness.dart b/openclosenew/lib/07_addbusiness.dart index 48387e5..45cb5d5 100644 --- a/openclosenew/lib/07_addbusiness.dart +++ b/openclosenew/lib/07_addbusiness.dart @@ -31,28 +31,9 @@ class _addbusinessState extends State { )); } - 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: SafeArea( @@ -178,36 +159,6 @@ class _addbusinessState extends State { keyboardType: TextInputType.number, ), ), - Padding( - padding: - const EdgeInsets.only(left: 24, top: 15, right: 24), - child: Text( - 'Tell about your business...', - style: TextStyle( - fontFamily: Font, - fontSize: HeadText, - color: DarkGray, - ), - ), - ), - Padding( - padding: - const EdgeInsets.only(left: 24, right: 24, top: 5), - 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: 15), child: Row( @@ -223,16 +174,6 @@ class _addbusinessState extends State { fontFamily: Font, ), ), - SizedBox( - width: 120, - ), - Text( - 'Category', - style: TextStyle( - color: DarkGray, - fontFamily: Font, - fontSize: HeadText), - ), ], ), ), @@ -271,39 +212,41 @@ class _addbusinessState extends State { ), ), ), - Expanded( - child: InputDecorator( - decoration: InputDecoration( - contentPadding: EdgeInsets.only( - left: 10, top: 1, bottom: 1, right: 5), - border: OutlineInputBorder( - borderRadius: BorderRadius.only( - topRight: Radius.circular(5), - bottomRight: Radius.circular(5), - ), - ), - ), - child: DropdownButtonHideUnderline( - child: new DropdownButton( - borderRadius: BorderRadius.circular(10), - value: selected1, - items: listDrop1, - icon: - Icon(Icons.keyboard_arrow_down, size: 24), - hint: new Text('Choose...'), - onChanged: (value) { - selected1 = value as String?; - setState(() {}); - }, - ), - ), - ), - ), ], ), ), + Padding( + padding: + const EdgeInsets.only(left: 24, top: 15, right: 24), + child: Text( + 'Category', + style: TextStyle( + fontFamily: Font, + fontSize: HeadText, + color: DarkGray, + ), + ), + ), + Padding( + padding: + const EdgeInsets.only(left: 24, right: 24, top: 5), + child: TextField( + maxLines: 5, + keyboardType: TextInputType.multiline, + decoration: InputDecoration( + contentPadding: + EdgeInsets.only(left: 10, top: 5, bottom: 5), + border: OutlineInputBorder( + borderRadius: BorderRadius.all( + Radius.circular(5), + ), + ), + hintText: 'Add your categories', + ), + ), + ), SizedBox( - height: 5, + height: 10, ), Column( crossAxisAlignment: CrossAxisAlignment.start, diff --git a/openclosenew/lib/24_addphotos.dart b/openclosenew/lib/24_addphotos.dart index a0b9e9f..d3086b7 100644 --- a/openclosenew/lib/24_addphotos.dart +++ b/openclosenew/lib/24_addphotos.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:dotted_border/dotted_border.dart'; +import 'package:openclosenew/25-addphotos1.dart'; -import '25-addphotos1.dart'; import 'FontFamily.dart'; import 'colors.dart'; import 'fontsize.dart'; @@ -14,145 +14,111 @@ class addphotos extends StatefulWidget { } class _addphtosState extends State { + List users = []; + @override Widget build(BuildContext context) { return Scaffold( - backgroundColor: Colors.white, - body: SafeArea( - child: Padding( - padding: const EdgeInsets.only(left: 20, right: 15, top: 10), - child: Column( - children: [ - Row( - children: [ - InkWell( - onTap: () { - Navigator.pop(context); - }, - child: Icon( - Icons.arrow_back, - color: DarkGray, - size: 24, - ), - ), - SizedBox(width: 20), - Text( - 'Add Photos', - style: TextStyle( - fontFamily: Font, - fontStyle: FontStyle.normal, - fontWeight: FontWeight.w500, - fontSize: HeadText, - color: DarkGray, - ), - ), - Spacer(), - InkWell( - onTap: () {}, - child: Icon( - Icons.add, - color: DarkGray, - size: 24, - ), - ), - ], - ), - Spacer(), - Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - InkWell( - onTap: () { - Navigator.push(context, - MaterialPageRoute(builder: (_) => addphotos1())); - }, - child: DottedBorder( - dashPattern: [5, 5, 5, 5], - color: primaryColor, - padding: EdgeInsets.all(5), - radius: Radius.circular(6), - child: Container( - height: 100, - width: 330, - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Image( - image: - AssetImage('assets/images/gallery-icon.png'), - color: primaryColor, - width: 30, - height: 30, - ), - SizedBox(width: 10), - Text( - 'Upload Photos', - style: TextStyle( - fontFamily: Font, - fontStyle: FontStyle.normal, - fontWeight: FontWeight.w400, - fontSize: HeadText, - color: primaryColor, - ), - ) - ], - ), - ), - ), - ), - ], - ), - Spacer(), - Padding( - padding: const EdgeInsets.only(bottom: 24), - child: Row( - children: [ - Expanded( - 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: MaterialButton( - height: 50, - minWidth: double.infinity, - color: primaryColor, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(4)), - onPressed: () { - Navigator.push(context, - MaterialPageRoute(builder: (_) => addphotos1())); - }, - child: Text( - 'Save', - style: TextStyle( - color: White, - fontSize: HeadText, - fontFamily: Font, - ), - ), - ), - ), - ], - ), - ), - ], + appBar: AppBar( + title: Text( + 'Add Photos', + style: TextStyle( + fontFamily: Font, + fontStyle: FontStyle.normal, + fontWeight: FontWeight.w500, + fontSize: HeadText, + color: DarkGray, ), ), ), + body: Column( + children: [ + Spacer(), + Center( + child: InkWell( + onTap: () { + setState(() {}); + }, + child: DottedBorder( + dashPattern: [5, 5, 5, 5], + color: primaryColor, + padding: EdgeInsets.all(5), + radius: Radius.circular(6), + child: Container( + height: 100, + width: 330, + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Image( + image: AssetImage('assets/images/gallery-icon.png'), + color: primaryColor, + width: 30, + height: 30, + ), + SizedBox(width: 10), + Text( + 'Upload Photos', + style: TextStyle( + fontFamily: Font, + fontStyle: FontStyle.normal, + fontWeight: FontWeight.w400, + fontSize: HeadText, + color: primaryColor, + ), + ), + ], + ), + ), + ), + ), + ), + Spacer(), + Padding( + padding: const EdgeInsets.only(bottom: 24, right: 20, left: 20), + child: Row( + children: [ + Expanded( + 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: MaterialButton( + height: 50, + minWidth: double.infinity, + color: primaryColor, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(4)), + onPressed: () {}, + child: Text( + 'Save', + style: TextStyle( + color: White, + fontSize: HeadText, + fontFamily: Font, + ), + ), + ), + ), + ], + ), + ), + ], + ), ); } } diff --git a/openclosenew/lib/25-addphotos1.dart b/openclosenew/lib/25-addphotos1.dart index c304b09..5355b1f 100644 --- a/openclosenew/lib/25-addphotos1.dart +++ b/openclosenew/lib/25-addphotos1.dart @@ -10,10 +10,10 @@ import 'colors.dart'; import 'fontsize.dart'; class addphotos1 extends StatefulWidget { - const addphotos1({Key? key}) : super(key: key); - + addphotos1({Key? key}) : super(key: key); + final state = _addphotos1State(); @override - State createState() => _addphotos1State(); + State createState() => state; } class _addphotos1State extends State { diff --git a/openclosenew/lib/26-PhotoListing.dart b/openclosenew/lib/26-PhotoListing.dart index 7f78a69..3df3fa9 100644 --- a/openclosenew/lib/26-PhotoListing.dart +++ b/openclosenew/lib/26-PhotoListing.dart @@ -1,5 +1,4 @@ import 'package:flutter/material.dart'; - import '25-addphotos1.dart'; class HomePage extends StatefulWidget { @@ -11,7 +10,9 @@ class _HomePageState extends State { @override Widget build(BuildContext context) { return Scaffold( - appBar: AppBar(title: Text('Home Page')), + appBar: AppBar( + title: Text('Home Page'), + ), floatingActionButton: FloatingActionButton( child: Icon(Icons.add), onPressed: () {