Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
himanshusharma89 committed Mar 15, 2021
2 parents a2d5e4e 18970f0 commit 9d2d853
Show file tree
Hide file tree
Showing 3 changed files with 223 additions and 37 deletions.
13 changes: 12 additions & 1 deletion lib/views/drawer_widget.dart
Original file line number Diff line number Diff line change
@@ -1,4 1,5 @@
import 'package:flutter/material.dart';
import 'package:retro_shopping/views/orders.dart';
//import 'package:retro_shopping/views/profile.dart';
import '../widgets/drawer_item.dart';
import './Wishlist.dart';
Expand All @@ -20,11 21,21 @@ class DrawerWidget extends StatelessWidget {
title: 'CART',
onTap: () {},
),
DrawerItem(
icon: Icons.inbox,
title: 'ORDERS',
onTap: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => OrderPage()),
);
},
),
DrawerItem(
icon: Icons.list,
title: 'WISHLIST',
onTap: () {
Navigator.push(
Navigator.push(
context,
MaterialPageRoute(builder: (context) => Wishlistscreen()),
);
Expand Down
150 changes: 150 additions & 0 deletions lib/views/orders.dart
Original file line number Diff line number Diff line change
@@ -0,0 1,150 @@
import 'package:flutter/material.dart';
import 'package:retro_shopping/helpers/constants.dart';
import 'package:retro_shopping/widgets/payment/order_item.dart';
import 'package:retro_shopping/widgets/retro_button.dart';

class OrderPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
final double height = MediaQuery.of(context).size.height;
final double width = MediaQuery.of(context).size.width;
return Container(
child: Scaffold(
appBar: AppBar(
elevation: 0,
centerTitle: true,
title: RetroButton(
upperColor: Colors.white,
lowerColor: Colors.black,
height: height * 0.046,
width: width * 0.35,
borderColor: Colors.white,
child: const Center(
child: Text(
'ORDERS',
style: TextStyle(
fontFamily: 'pix M 8pt',
fontSize: 16,
fontWeight: FontWeight.bold,
color: RelicColors.backgroundColor,
),
// textAlign: TextAlign.left,
),
),
),
leading: GestureDetector(
onTap: () {
Navigator.of(context).pop();
},
child: Container(
padding: const EdgeInsets.only(left: 10, top: 15),
child: RetroButton(
upperColor: Colors.white,
lowerColor: Colors.black,
height: height * 0.035,
width: width * 0.44,
borderColor: Colors.white,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: const <Widget>[
Icon(
Icons.arrow_back,
size: 20,
color: RelicColors.primaryBlack,
),
],
),
),
),
),
backgroundColor: RelicColors.backgroundColor,
),
backgroundColor: RelicColors.backgroundColor,
body: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 18),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: height * 0.08,
),
const Orders(),
],
),
),
),
),
);
}
}

class Orders extends StatelessWidget {
const Orders({
Key key,
}) : super(key: key);

@override
Widget build(BuildContext context) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Center(
child: Stack(
children: <Widget>[
Container(
width: MediaQuery.of(context).size.width * 0.88 5,
height: 590,
decoration: const BoxDecoration(color: Colors.black),
),
Container(
padding:
const EdgeInsets.symmetric(vertical: 16, horizontal: 12),
width: MediaQuery.of(context).size.width * 0.87,
decoration:
const BoxDecoration(color: RelicColors.primaryColor),
child: ListView(
shrinkWrap: true,
primary: false,
children: const <Widget>[
OrderItem(
title: 'ANTIQUE VASE',
ordered: 'ORDERED 3 DAYS AGO',
status: 'STATUS : ON THE WAY',
image: 'assets/items/3.png'),
Divider(
color: Colors.white,
),
OrderItem(
title: 'TATUNG EINSTEIN',
ordered: 'ORDERED 3 WEEKS AGO',
status: 'ANTIQUE DELIVERED',
image: 'assets/items/1.png',
delivered: true),
Divider(
color: Colors.white,
),
OrderItem(
title: 'M.DISC THROWER',
ordered: 'ORDERED 5 DAYS AGO',
status: 'STATUS : SHIPPED',
image: 'assets/items/2.png'),
/*Divider(
color: Colors.white,
),
OrderItem(
title: 'TATUNG EINSTEIN',
ordered: 'ORDERED 3 WEEKS AGO',
status: 'ANTIQUE DELIVERED',
image: 'assets/items/1.png',
delivered: true),*/
],
),
),
],
),
),
],
);
}
}
97 changes: 61 additions & 36 deletions lib/views/settings.dart
Original file line number Diff line number Diff line change
@@ -1,22 1,19 @@
import 'package:flutter/material.dart';
import 'package:retro_shopping/helpers/constants.dart';
import 'package:retro_shopping/views/profile.dart';
import 'package:retro_shopping/views/orders.dart';
import 'package:retro_shopping/widgets/retro_button.dart';

class Settings extends StatefulWidget {

@override
_SettingsState createState() => _SettingsState();
}

class _SettingsState extends State<Settings> {
bool Switched_On = false;

Widget _setting_Buttons(String text, IconData ic){
Widget _setting_Buttons(String text, IconData ic) {
return InkWell(
onTap: (){

},
//onTap: () {},
child: Row(
children: <Widget>[
const SizedBox(
Expand All @@ -28,14 25,17 @@ class _SettingsState extends State<Settings> {
const SizedBox(
width: 5,
),
Icon(ic,
Icon(
ic,
size: 30,
color: Colors.white,
),
const SizedBox(
width: 5,
),
Text(text,style: TextStyle(fontWeight: FontWeight.normal, fontSize: 20))
Text(text,
style:
TextStyle(fontWeight: FontWeight.normal, fontSize: 20))
],
),
),
Expand Down Expand Up @@ -63,7 63,7 @@ class _SettingsState extends State<Settings> {
leading: Padding(
padding: const EdgeInsets.all(8.0),
child: GestureDetector(
onTap: (){
onTap: () {
Navigator.pop(context);
},
child: RetroButton(
Expand All @@ -72,8 72,10 @@ class _SettingsState extends State<Settings> {
width: 35,
height: 35,
borderColor: Colors.white,
child: const Icon(Icons.arrow_back,color: Colors.black,),

child: const Icon(
Icons.arrow_back,
color: Colors.black,
),
),
),
),
Expand All @@ -83,7 85,7 @@ class _SettingsState extends State<Settings> {
body: SingleChildScrollView(
scrollDirection: Axis.vertical,
child: Padding(
padding: const EdgeInsets.only(left:14.0,right: 10.0),
padding: const EdgeInsets.only(left: 14.0, right: 10.0),
child: SingleChildScrollView(
scrollDirection: Axis.vertical,
child: Stack(
Expand All @@ -94,40 96,57 @@ class _SettingsState extends State<Settings> {
decoration: const BoxDecoration(color: Colors.black),
),
Container(
padding:
const EdgeInsets.symmetric(vertical: 16, horizontal: 12),
padding: const EdgeInsets.symmetric(
vertical: 16, horizontal: 12),
width: MediaQuery.of(context).size.width * 0.92 - 3,
height: MediaQuery.of(context).size.height * 0.85 5,
decoration:
const BoxDecoration(color: RelicColors.primaryColor),
const BoxDecoration(color: RelicColors.primaryColor),
child: SingleChildScrollView(
scrollDirection: Axis.vertical,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
_setting_Buttons("Your Orders",Icons.bookmark_border_sharp),
children: <Widget>[
GestureDetector(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => OrderPage()),
);
},
child: _setting_Buttons(
"Your Orders", Icons.bookmark_border_sharp),
),
Padding(
padding: const EdgeInsets.only(left: 16.0, right: 16.0),
padding:
const EdgeInsets.only(left: 16.0, right: 16.0),
child: divider(),
),
_setting_Buttons("Change Username/\nPassword",Icons.person),
_setting_Buttons(
"Change Username/\nPassword", Icons.person),
Padding(
padding: const EdgeInsets.only(left: 16.0, right: 16.0),
padding:
const EdgeInsets.only(left: 16.0, right: 16.0),
child: divider(),
),
_setting_Buttons("FAQs",Icons.question_answer),
_setting_Buttons("FAQs", Icons.question_answer),
Padding(
padding: const EdgeInsets.only(left: 16.0, right: 16.0),
padding:
const EdgeInsets.only(left: 16.0, right: 16.0),
child: divider(),
),
_setting_Buttons("Manage Address",Icons.location_pin),
_setting_Buttons(
"Manage Address", Icons.location_pin),
Padding(
padding: const EdgeInsets.only(left: 16.0, right: 16.0),
padding:
const EdgeInsets.only(left: 16.0, right: 16.0),
child: divider(),
),
_setting_Buttons("T&C",Icons.quick_contacts_dialer),
_setting_Buttons("T&C", Icons.quick_contacts_dialer),
Padding(
padding: const EdgeInsets.only(left: 16.0, right: 16.0),
padding:
const EdgeInsets.only(left: 16.0, right: 16.0),
child: divider(),
),
Row(
Expand All @@ -141,14 160,18 @@ class _SettingsState extends State<Settings> {
const SizedBox(
width: 5,
),
const Icon(Icons.notifications_active,
const Icon(
Icons.notifications_active,
size: 30,
color: Colors.white,
),
const SizedBox(
width: 5,
),
Text("Notifications(on/off)",style: TextStyle(fontWeight: FontWeight.normal, fontSize: 20))
Text("Notifications(on/off)",
style: TextStyle(
fontWeight: FontWeight.normal,
fontSize: 20))
],
),
),
Expand All @@ -165,20 188,23 @@ class _SettingsState extends State<Settings> {
],
),
Padding(
padding: const EdgeInsets.only(left: 16.0, right: 16.0),
padding:
const EdgeInsets.only(left: 16.0, right: 16.0),
child: divider(),
),
_setting_Buttons("LogOut",Icons.logout),
_setting_Buttons("LogOut", Icons.logout),
Padding(
padding: const EdgeInsets.only(left: 16.0, right: 16.0),
padding:
const EdgeInsets.only(left: 16.0, right: 16.0),
child: divider(),
),
_setting_Buttons("GitHub Repo Link",Icons.verified_user_outlined),
_setting_Buttons(
"GitHub Repo Link", Icons.verified_user_outlined),
Padding(
padding: const EdgeInsets.only(left: 16.0, right: 16.0),
padding:
const EdgeInsets.only(left: 16.0, right: 16.0),
child: divider(),
),

],
),
),
Expand All @@ -187,7 213,6 @@ class _SettingsState extends State<Settings> {
),
),
),
)
);
));
}
}

0 comments on commit 9d2d853

Please sign in to comment.