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"),
|
Tab(text: "North In"),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(height: 30),
|
||||||
height: 30,
|
|
||||||
),
|
|
||||||
Expanded(
|
Expanded(
|
||||||
child: ListView(
|
child: ListView(
|
||||||
scrollDirection: Axis.vertical,
|
scrollDirection: Axis.vertical,
|
||||||
@ -93,7 +91,7 @@ class _ProductListingState extends State<ProductListing>
|
|||||||
BottomSheets(context);
|
BottomSheets(context);
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
height: 225,
|
height: 250,
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.all(Radius.circular(10)),
|
borderRadius: BorderRadius.all(Radius.circular(10)),
|
||||||
@ -214,7 +212,7 @@ class _ProductListingState extends State<ProductListing>
|
|||||||
InkWell(
|
InkWell(
|
||||||
onTap: () {},
|
onTap: () {},
|
||||||
child: Container(
|
child: Container(
|
||||||
height: 225,
|
height: 250,
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(5),
|
borderRadius: BorderRadius.circular(5),
|
||||||
@ -335,7 +333,7 @@ class _ProductListingState extends State<ProductListing>
|
|||||||
InkWell(
|
InkWell(
|
||||||
onTap: () {},
|
onTap: () {},
|
||||||
child: Container(
|
child: Container(
|
||||||
height: 225,
|
height: 250,
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(5),
|
borderRadius: BorderRadius.circular(5),
|
||||||
|
@ -56,9 +56,7 @@ class _serviceslistingState extends State<serviceslisting>
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(height: 30),
|
||||||
height: 30,
|
|
||||||
),
|
|
||||||
TabBar(
|
TabBar(
|
||||||
indicator: BoxDecoration(
|
indicator: BoxDecoration(
|
||||||
color: primaryColor,
|
color: primaryColor,
|
||||||
@ -91,7 +89,7 @@ class _serviceslistingState extends State<serviceslisting>
|
|||||||
InkWell(
|
InkWell(
|
||||||
onTap: () {},
|
onTap: () {},
|
||||||
child: Container(
|
child: Container(
|
||||||
height: 225,
|
height: 250,
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.all(Radius.circular(10)),
|
borderRadius: BorderRadius.all(Radius.circular(10)),
|
||||||
@ -212,7 +210,7 @@ class _serviceslistingState extends State<serviceslisting>
|
|||||||
InkWell(
|
InkWell(
|
||||||
onTap: () {},
|
onTap: () {},
|
||||||
child: Container(
|
child: Container(
|
||||||
height: 225,
|
height: 250,
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(5),
|
borderRadius: BorderRadius.circular(5),
|
||||||
@ -333,7 +331,7 @@ class _serviceslistingState extends State<serviceslisting>
|
|||||||
InkWell(
|
InkWell(
|
||||||
onTap: () {},
|
onTap: () {},
|
||||||
child: Container(
|
child: Container(
|
||||||
height: 225,
|
height: 250,
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(5),
|
borderRadius: BorderRadius.circular(5),
|
||||||
|
@ -37,7 +37,7 @@ class _addphtosState extends State<addphotos> {
|
|||||||
),
|
),
|
||||||
SizedBox(width: 20),
|
SizedBox(width: 20),
|
||||||
Text(
|
Text(
|
||||||
'Services',
|
'Add Photos',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: Font,
|
fontFamily: Font,
|
||||||
fontStyle: FontStyle.normal,
|
fontStyle: FontStyle.normal,
|
||||||
|
@ -1,9 +1,13 @@
|
|||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
|
import 'package:dotted_border/dotted_border.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:image_picker/image_picker.dart';
|
import 'package:image_picker/image_picker.dart';
|
||||||
import 'package:openclosenew/26-PhotoListing.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 {
|
class addphotos1 extends StatefulWidget {
|
||||||
const addphotos1({Key? key}) : super(key: key);
|
const addphotos1({Key? key}) : super(key: key);
|
||||||
@ -22,71 +26,97 @@ class _addphotos1State extends State<addphotos1> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: Text('Add Photos'),
|
elevation: 1,
|
||||||
actions: [
|
backgroundColor: White,
|
||||||
MaterialButton(
|
iconTheme: IconThemeData(color: DarkGray),
|
||||||
onPressed: () {
|
title: Text(
|
||||||
setState(() {
|
'Add Photos',
|
||||||
uploading = true;
|
style: TextStyle(
|
||||||
});
|
fontFamily: Font,
|
||||||
uploadFile().whenComplete(() => Navigator.of(context)
|
fontStyle: FontStyle.normal,
|
||||||
.push(MaterialPageRoute(builder: (_) => HomePage())));
|
fontWeight: FontWeight.w500,
|
||||||
},
|
fontSize: HeadText,
|
||||||
child: Text(
|
color: DarkGray,
|
||||||
'upload',
|
),
|
||||||
style: TextStyle(color: Colors.white),
|
|
||||||
))
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
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: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.all(
|
||||||
|
Radius.circular(10),
|
||||||
|
),
|
||||||
|
),
|
||||||
padding: EdgeInsets.all(4),
|
padding: EdgeInsets.all(4),
|
||||||
|
margin: EdgeInsets.only(left: 10, right: 10, top: 40),
|
||||||
child: GridView.builder(
|
child: GridView.builder(
|
||||||
itemCount: _image.length + 1,
|
itemCount: _image.length + 1,
|
||||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||||
crossAxisCount: 3),
|
crossAxisCount: 3,
|
||||||
|
crossAxisSpacing: 10,
|
||||||
|
),
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
return index == 0
|
return index == 0
|
||||||
? Center(
|
? Center(
|
||||||
child: IconButton(
|
child: InkWell(
|
||||||
icon: Icon(Icons.add),
|
onTap: () => !uploading ? chooseImage() : null,
|
||||||
onPressed: () =>
|
child: DottedBorder(
|
||||||
!uploading ? chooseImage() : null),
|
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(
|
: Container(
|
||||||
margin: EdgeInsets.all(3),
|
margin: EdgeInsets.all(3),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
image: FileImage(_image[index - 1]),
|
image: FileImage(_image[index - 1]),
|
||||||
fit: BoxFit.cover)),
|
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 {
|
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