07 add business design changed

This commit is contained in:
vignesh 2022-07-18 12:06:52 +05:30
parent c47b039eae
commit e15b2ec52b
4 changed files with 137 additions and 227 deletions

View File

@ -31,28 +31,9 @@ class _addbusinessState extends State<addbusiness> {
));
}
List<DropdownMenuItem<String>> 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<addbusiness> {
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<addbusiness> {
fontFamily: Font,
),
),
SizedBox(
width: 120,
),
Text(
'Category',
style: TextStyle(
color: DarkGray,
fontFamily: Font,
fontSize: HeadText),
),
],
),
),
@ -271,39 +212,41 @@ class _addbusinessState extends State<addbusiness> {
),
),
),
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,

View File

@ -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<addphotos> {
List<addphotos1> 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,
),
),
),
),
],
),
),
],
),
);
}
}

View File

@ -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<addphotos1> createState() => _addphotos1State();
State<addphotos1> createState() => state;
}
class _addphotos1State extends State<addphotos1> {

View File

@ -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<HomePage> {
@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: () {