diff --git a/openclosenew/lib/20-ProductListing.dart b/openclosenew/lib/20-ProductListing.dart index 81dc0e9..54e09d7 100644 --- a/openclosenew/lib/20-ProductListing.dart +++ b/openclosenew/lib/20-ProductListing.dart @@ -81,9 +81,7 @@ class _ProductListingState extends State Tab(text: "North In"), ], ), - SizedBox( - height: 30, - ), + SizedBox(height: 30), Expanded( child: ListView( scrollDirection: Axis.vertical, @@ -93,7 +91,7 @@ class _ProductListingState extends State 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 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 InkWell( onTap: () {}, child: Container( - height: 225, + height: 250, width: double.infinity, decoration: BoxDecoration( borderRadius: BorderRadius.circular(5), diff --git a/openclosenew/lib/23-ServiceListing.dart b/openclosenew/lib/23-ServiceListing.dart index d7b10e2..3d2f6cb 100644 --- a/openclosenew/lib/23-ServiceListing.dart +++ b/openclosenew/lib/23-ServiceListing.dart @@ -56,9 +56,7 @@ class _serviceslistingState extends State ), ], ), - SizedBox( - height: 30, - ), + SizedBox(height: 30), TabBar( indicator: BoxDecoration( color: primaryColor, @@ -91,7 +89,7 @@ class _serviceslistingState extends State 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 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 InkWell( onTap: () {}, child: Container( - height: 225, + height: 250, width: double.infinity, decoration: BoxDecoration( borderRadius: BorderRadius.circular(5), diff --git a/openclosenew/lib/24_addphotos.dart b/openclosenew/lib/24_addphotos.dart index 57d96f8..a0b9e9f 100644 --- a/openclosenew/lib/24_addphotos.dart +++ b/openclosenew/lib/24_addphotos.dart @@ -37,7 +37,7 @@ class _addphtosState extends State { ), SizedBox(width: 20), Text( - 'Services', + 'Add Photos', style: TextStyle( fontFamily: Font, fontStyle: FontStyle.normal, diff --git a/openclosenew/lib/25-addphotos1.dart b/openclosenew/lib/25-addphotos1.dart index 26758c2..c304b09 100644 --- a/openclosenew/lib/25-addphotos1.dart +++ b/openclosenew/lib/25-addphotos1.dart @@ -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 { @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(Colors.green), - ) - ], - )) - : Container(), ], - )); + ), + ), + ); } chooseImage() async { diff --git a/openclosenew/lib/test.dart b/openclosenew/lib/test.dart new file mode 100644 index 0000000..b57bdb2 --- /dev/null +++ b/openclosenew/lib/test.dart @@ -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 createState() => _testState(); +} + +class _testState extends State { + @override + Widget build(BuildContext context) { + return Text( + 'data', + style: TextStyle(color: DarkGray), + ); + } +}