Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4bb0230
commit 47c1db8
Showing
51 changed files
with
2,125 additions
and
926 deletions.
There are no files selected for viewing
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+251 KB
ScreenShots/Screenshot_2020-03-20-01-25-05-888_com.example.ecommerce.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+296 KB
ScreenShots/Screenshot_2020-03-20-02-12-14-926_com.example.ecommerce.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+243 KB
ScreenShots/Screenshot_2020-03-20-02-12-19-163_com.example.ecommerce.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+108 KB
ScreenShots/Screenshot_2020-03-20-02-12-25-953_com.example.ecommerce.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+113 KB
ScreenShots/Screenshot_2020-03-20-02-12-33-294_com.example.ecommerce.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+296 KB
ScreenShots/Screenshot_2020-03-20-02-12-38-602_com.example.ecommerce.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+148 KB
ScreenShots/Screenshot_2020-03-20-02-18-15-228_com.example.ecommerce.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+160 KB
ScreenShots/Screenshot_2020-03-20-02-18-44-483_com.example.ecommerce.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+450 KB
ScreenShots/Screenshot_2020-03-20-02-40-00-083_com.example.ecommerce.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 1 addition & 5 deletions
6
lib/Store/Authentication/authenication.dart → lib/Authentication/authenication.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
class LightColor { | ||
static const Color background = Color(0XFFFFFFFF); | ||
|
||
static const Color titleTextColor = const Color(0xff5a5d85); | ||
static const Color subTitleTextColor = const Color(0xff797878); | ||
|
||
static const Color bottonTitleTextColor = const Color(0xffd4d4ea); | ||
|
||
static const Color grey = Color(0xff9D99A7); | ||
static const Color darkgrey = Color(0xff625f6a); | ||
|
||
static const Color yellow = Color(0xfffbbd5c); | ||
|
||
static const Color orange = Color(0xfff96d5b); | ||
static const Color darkOrange = Color(0xfff46352); | ||
static const Color lightOrange = Color(0xfffa8e5c); | ||
static const Color lightOrange2 = Color(0xfff97d6d); | ||
|
||
static const Color purple = Color(0xff7a81dd); | ||
static const Color lightpurple = Color(0xff898edf); | ||
static const Color darkpurple = Color(0xff7178d3); | ||
static const Color extraDarkPurple = Color(0xff494c79); | ||
|
||
static const Color seeBlue = Color(0xff73d4dd); | ||
static const Color darkseeBlue = Color(0xff63c4cf); | ||
static const Color lightseeBlue = Color(0xffb9e6fc); | ||
|
||
static const Color brighter = Color(0xff3754aa); | ||
static const Color Darker = Color(0xffffffff); | ||
static const Color black = Color(0xff040405); | ||
static const Color lightblack = Color(0xff3E404D); | ||
static const Color lightGrey = Color(0xffDFE7DD); | ||
static const Color darkBlue = Color(0xff13165A); | ||
static const Color lightBlue = Color(0xff203387); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'light_color.dart'; | ||
|
||
class AppTheme { | ||
const AppTheme(); | ||
static ThemeData lightTheme = ThemeData( | ||
primarySwatch: Colors.blue, | ||
backgroundColor: LightColor.background, | ||
primaryColor: LightColor.purple, | ||
accentColor: LightColor.lightblack, | ||
primaryColorDark: LightColor.Darker, | ||
primaryColorLight: LightColor.brighter, | ||
cardTheme: CardTheme(color: LightColor.background), | ||
textTheme: TextTheme(display1: TextStyle(color: LightColor.black)), | ||
iconTheme: IconThemeData(color: LightColor.lightblack), | ||
bottomAppBarColor: LightColor.background, | ||
dividerColor: LightColor.lightGrey, | ||
colorScheme: ColorScheme( | ||
primary: LightColor.purple, | ||
primaryVariant: LightColor.purple, | ||
secondary: LightColor.lightBlue, | ||
secondaryVariant: LightColor.darkBlue, | ||
surface: LightColor.background, | ||
background: LightColor.background, | ||
error: Colors.red, | ||
onPrimary: LightColor.Darker, | ||
onSecondary: LightColor.background, | ||
onSurface: LightColor.Darker, | ||
onBackground: LightColor.titleTextColor, | ||
onError: LightColor.titleTextColor, | ||
brightness: Brightness.dark), | ||
); | ||
|
||
static TextStyle titleStyle = | ||
const TextStyle(color: LightColor.titleTextColor, fontSize: 16); | ||
static TextStyle subTitleStyle = | ||
const TextStyle(color: LightColor.subTitleTextColor, fontSize: 12); | ||
|
||
static TextStyle h1Style = | ||
const TextStyle(fontSize: 24, fontWeight: FontWeight.bold); | ||
static TextStyle h2Style = const TextStyle(fontSize: 22); | ||
static TextStyle h3Style = const TextStyle(fontSize: 20); | ||
static TextStyle h4Style = const TextStyle(fontSize: 18); | ||
static TextStyle h5Style = const TextStyle(fontSize: 16); | ||
static TextStyle h6Style = const TextStyle(fontSize: 14); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
import 'package:ecommerce/Config/config.dart'; | ||
import 'package:ecommerce/Widgets/customAppBar.dart'; | ||
import 'package:ecommerce/modals/address.dart'; | ||
import 'package:flutter/material.dart'; | ||
|
||
class AddAddress extends StatelessWidget { | ||
final _cName = TextEditingController(); | ||
final _cPhoneNumber = TextEditingController(); | ||
final _cFlatNumber = TextEditingController(); | ||
final _cArea = TextEditingController(); | ||
final _clandmark = TextEditingController(); | ||
final _cCity = TextEditingController(); | ||
final _cState = TextEditingController(); | ||
final _cPincode = TextEditingController(); | ||
final formKey = GlobalKey<FormState>(); | ||
final scaffoldKey = GlobalKey<ScaffoldState>(); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return SafeArea( | ||
child: Scaffold( | ||
key: scaffoldKey, | ||
appBar: MyAppBar(), | ||
floatingActionButton: FloatingActionButton.extended( | ||
onPressed: () { | ||
if (formKey.currentState.validate()) { | ||
final model = AddressModel( | ||
name: _cName.text, | ||
state: _cState.text, | ||
pincode: _cPincode.text, | ||
phoneNumber: _cPincode.text, | ||
landmark: _clandmark.text, | ||
flatNumber: _cFlatNumber.text, | ||
city: _cCity.text, | ||
area: _cArea.text) | ||
.toJson(); | ||
EcommerceApp.firestore | ||
.collection(EcommerceApp.collectionUser) | ||
.document( | ||
EcommerceApp.sharedPreferences.getString(EcommerceApp.userUID)) | ||
.collection(EcommerceApp.subCollectionAddress) | ||
.document(DateTime.now().millisecondsSinceEpoch.toString()) | ||
.setData(model).then((_){ | ||
final snackbar = SnackBar(content: Text('Address added successfully')); | ||
scaffoldKey.currentState.showSnackBar(snackbar); | ||
FocusScope.of(context).requestFocus(FocusNode()); | ||
formKey.currentState.reset(); | ||
}); | ||
} | ||
}, | ||
label: Text('Done'), | ||
backgroundColor: Colors.deepPurple, | ||
icon: Icon(Icons.check), | ||
), | ||
body: SingleChildScrollView( | ||
child: Column( | ||
children: <Widget>[ | ||
Align( | ||
alignment: Alignment.centerLeft, | ||
child: Padding( | ||
padding: const EdgeInsets.all(8.0), | ||
child: Text( | ||
'Add address', | ||
style: TextStyle( | ||
color: Colors.black, | ||
fontWeight: FontWeight.bold, | ||
fontSize: 20), | ||
), | ||
), | ||
), | ||
Form( | ||
key: formKey, | ||
child: Column( | ||
children: <Widget>[ | ||
MyTextField( | ||
hint: 'Name', | ||
controller: _cName, | ||
), | ||
MyTextField( | ||
hint: 'Phone Number', | ||
controller: _cPhoneNumber, | ||
), | ||
MyTextField( | ||
hint: 'Flat Number', | ||
controller: _cFlatNumber, | ||
), | ||
MyTextField( | ||
hint: 'Area', | ||
controller: _cArea, | ||
), | ||
MyTextField( | ||
hint: 'Landmark', | ||
controller: _clandmark, | ||
), | ||
MyTextField( | ||
hint: 'City', | ||
controller: _cCity, | ||
), | ||
MyTextField( | ||
hint: 'State', | ||
controller: _cState, | ||
), | ||
MyTextField( | ||
hint: 'Pincode', | ||
controller: _cPincode, | ||
), | ||
], | ||
)), | ||
|
||
], | ||
), | ||
), | ||
), | ||
); | ||
} | ||
} | ||
|
||
class MyTextField extends StatelessWidget { | ||
final String hint; | ||
final TextEditingController controller; | ||
|
||
const MyTextField({Key key, this.hint, this.controller}) : super(key: key); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Padding( | ||
padding: const EdgeInsets.all(8.0), | ||
child: TextFormField( | ||
controller: controller, | ||
decoration: InputDecoration.collapsed(hintText: hint), | ||
validator: (value) => value.isEmpty ? 'Field can\'t be blank' : null, | ||
), | ||
); | ||
} | ||
} |
Oops, something went wrong.