add photo design small changes
This commit is contained in:
parent
b86945a2da
commit
b290fb1492
@ -81,9 +81,7 @@ class _ProductListingState extends State<ProductListing>
|
||||
Tab(text: "North In"),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 30,
|
||||
),
|
||||
SizedBox(height: 30),
|
||||
Expanded(
|
||||
child: ListView(
|
||||
scrollDirection: Axis.vertical,
|
||||
@ -93,7 +91,7 @@ class _ProductListingState extends State<ProductListing>
|
||||
BottomSheets(context);
|
||||
},
|
||||
child: Container(
|
||||
height: 225,
|
||||
height: 250,
|
||||
width: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(10)),
|
||||
@ -214,7 +212,7 @@ class _ProductListingState extends State<ProductListing>
|
||||
InkWell(
|
||||
onTap: () {},
|
||||
child: Container(
|
||||
height: 225,
|
||||
height: 250,
|
||||
width: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
@ -335,7 +333,7 @@ class _ProductListingState extends State<ProductListing>
|
||||
InkWell(
|
||||
onTap: () {},
|
||||
child: Container(
|
||||
height: 225,
|
||||
height: 250,
|
||||
width: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
|
@ -56,9 +56,7 @@ class _serviceslistingState extends State<serviceslisting>
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 30,
|
||||
),
|
||||
SizedBox(height: 30),
|
||||
TabBar(
|
||||
indicator: BoxDecoration(
|
||||
color: primaryColor,
|
||||
@ -91,7 +89,7 @@ class _serviceslistingState extends State<serviceslisting>
|
||||
InkWell(
|
||||
onTap: () {},
|
||||
child: Container(
|
||||
height: 225,
|
||||
height: 250,
|
||||
width: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(10)),
|
||||
@ -212,7 +210,7 @@ class _serviceslistingState extends State<serviceslisting>
|
||||
InkWell(
|
||||
onTap: () {},
|
||||
child: Container(
|
||||
height: 225,
|
||||
height: 250,
|
||||
width: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
@ -333,7 +331,7 @@ class _serviceslistingState extends State<serviceslisting>
|
||||
InkWell(
|
||||
onTap: () {},
|
||||
child: Container(
|
||||
height: 225,
|
||||
height: 250,
|
||||
width: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
|
@ -37,7 +37,7 @@ class _addphtosState extends State<addphotos> {
|
||||
),
|
||||
SizedBox(width: 20),
|
||||
Text(
|
||||
'Services',
|
||||
'Add Photos',
|
||||
style: TextStyle(
|
||||
fontFamily: Font,
|
||||
fontStyle: FontStyle.normal,
|
||||
|
@ -1,9 +1,13 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:dotted_border/dotted_border.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:image_picker/image_picker.dart';
|
||||
import 'package:openclosenew/26-PhotoListing.dart';
|
||||
import 'package:path/path.dart' as Path;
|
||||
|
||||
import 'FontFamily.dart';
|
||||
import 'colors.dart';
|
||||
import 'fontsize.dart';
|
||||
|
||||
class addphotos1 extends StatefulWidget {
|
||||
const addphotos1({Key? key}) : super(key: key);
|
||||
@ -22,71 +26,97 @@ class _addphotos1State extends State<addphotos1> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text('Add Photos'),
|
||||
actions: [
|
||||
MaterialButton(
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
uploading = true;
|
||||
});
|
||||
uploadFile().whenComplete(() => Navigator.of(context)
|
||||
.push(MaterialPageRoute(builder: (_) => HomePage())));
|
||||
},
|
||||
child: Text(
|
||||
'upload',
|
||||
style: TextStyle(color: Colors.white),
|
||||
))
|
||||
],
|
||||
appBar: AppBar(
|
||||
elevation: 1,
|
||||
backgroundColor: White,
|
||||
iconTheme: IconThemeData(color: DarkGray),
|
||||
title: Text(
|
||||
'Add Photos',
|
||||
style: TextStyle(
|
||||
fontFamily: Font,
|
||||
fontStyle: FontStyle.normal,
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: HeadText,
|
||||
color: DarkGray,
|
||||
),
|
||||
),
|
||||
body: Stack(
|
||||
actions: [
|
||||
MaterialButton(
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
uploading = true;
|
||||
});
|
||||
uploadFile().whenComplete(() => Navigator.of(context)
|
||||
.push(MaterialPageRoute(builder: (_) => HomePage())));
|
||||
},
|
||||
child: Text(
|
||||
'upload',
|
||||
style: TextStyle(color: DarkGray),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
body: SafeArea(
|
||||
child: Stack(
|
||||
children: [
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(10),
|
||||
),
|
||||
),
|
||||
padding: EdgeInsets.all(4),
|
||||
margin: EdgeInsets.only(left: 10, right: 10, top: 40),
|
||||
child: GridView.builder(
|
||||
itemCount: _image.length + 1,
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 3),
|
||||
crossAxisCount: 3,
|
||||
crossAxisSpacing: 10,
|
||||
),
|
||||
itemBuilder: (context, index) {
|
||||
return index == 0
|
||||
? Center(
|
||||
child: IconButton(
|
||||
icon: Icon(Icons.add),
|
||||
onPressed: () =>
|
||||
!uploading ? chooseImage() : null),
|
||||
child: InkWell(
|
||||
onTap: () => !uploading ? chooseImage() : null,
|
||||
child: DottedBorder(
|
||||
dashPattern: [5, 5, 5, 5],
|
||||
color: primaryColor,
|
||||
padding: EdgeInsets.all(5),
|
||||
radius: Radius.circular(6),
|
||||
child: Container(
|
||||
height: 100,
|
||||
width: 100,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Image(
|
||||
image: AssetImage(
|
||||
'assets/images/gallery-icon.png'),
|
||||
color: primaryColor,
|
||||
width: 30,
|
||||
height: 30,
|
||||
),
|
||||
SizedBox(width: 10),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
: Container(
|
||||
margin: EdgeInsets.all(3),
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: FileImage(_image[index - 1]),
|
||||
fit: BoxFit.cover)),
|
||||
image: DecorationImage(
|
||||
image: FileImage(_image[index - 1]),
|
||||
fit: BoxFit.cover),
|
||||
),
|
||||
);
|
||||
}),
|
||||
),
|
||||
uploading
|
||||
? Center(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Container(
|
||||
child: Text(
|
||||
'uploading...',
|
||||
style: TextStyle(fontSize: 20),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
CircularProgressIndicator(
|
||||
value: val,
|
||||
valueColor: AlwaysStoppedAnimation<Color>(Colors.green),
|
||||
)
|
||||
],
|
||||
))
|
||||
: Container(),
|
||||
],
|
||||
));
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
chooseImage() async {
|
||||
|
19
openclosenew/lib/test.dart
Normal file
19
openclosenew/lib/test.dart
Normal file
@ -0,0 +1,19 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:openclosenew/colors.dart';
|
||||
|
||||
class test extends StatefulWidget {
|
||||
const test({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<test> createState() => _testState();
|
||||
}
|
||||
|
||||
class _testState extends State<test> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Text(
|
||||
'data',
|
||||
style: TextStyle(color: DarkGray),
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user