Skip to content

Commit

Permalink
Merge pull request #11 from shaunhossain/wallet_screen
Browse files Browse the repository at this point in the history
Wallet screen
  • Loading branch information
shaunhossain authored Jul 13, 2022
2 parents a8248a4 + cbef05c commit 2535789
Show file tree
Hide file tree
Showing 21 changed files with 738 additions and 303 deletions.
11 changes: 11 additions & 0 deletions assets/master_card.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
76 changes: 76 additions & 0 deletions assets/visa_card.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions lib/view/components/navigator/app_routes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import 'package:platzi_fake_store/view/page/view_product_screen/view_product_scr
import 'package:platzi_fake_store/view/page/view_single_carousel_screen/view_single_carousel_screen.dart';
import 'package:platzi_fake_store/view/page/view_single_category_screen/view_single_category_binding/view_single_category_binding.dart';
import 'package:platzi_fake_store/view/page/view_single_category_screen/view_single_category_screen.dart';
import 'package:platzi_fake_store/view/page/wallet_screen/wallet_binding/wallet_binding.dart';
import 'package:platzi_fake_store/view/page/wallet_screen/wallet_screen.dart';
import '../../page/view_single_carousel_screen/view_single_carousel_binding/view_single_carousel_binding.dart';

Expand Down
76 changes: 76 additions & 0 deletions lib/view/components/widget/checkout/custom_bill_board.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
import 'package:flutter/material.dart';

import '../../../../utils/size_config.dart';
import '../custom_text_view.dart';

class CustomBillBoard extends StatelessWidget {
const CustomBillBoard({Key? key, required this.price, required this.shippingCost, required this.totalBill}) : super(key: key);
final int price;
final int shippingCost;
final int totalBill;

@override
Widget build(BuildContext context) {
return Container(
width: SizeConfig.width,
alignment: Alignment.center,
padding: const EdgeInsets.all(24),
decoration: BoxDecoration(
color: Colors.grey.shade100,
borderRadius: BorderRadius.circular(15)),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
CustomTextView(
text: 'Amount',
fontSize: SizeConfig.textScaleFactor! * 14,
fontWeight: FontWeight.w400,
color: Colors.black),
CustomTextView(
text: '\u0024$price',
fontSize: SizeConfig.textScaleFactor! * 14,
fontWeight: FontWeight.w400,
color: Colors.black),
],
),
const SizedBox(height: 18,),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
CustomTextView(
text: 'Shipping bill',
fontSize: SizeConfig.textScaleFactor! * 14,
fontWeight: FontWeight.w400,
color: Colors.black),
CustomTextView(
text: '\u0024$shippingCost',
fontSize: SizeConfig.textScaleFactor! * 14,
fontWeight: FontWeight.w400,
color: Colors.black),
],
),
const SizedBox(height: 24,),
const Divider(color: Colors.grey,height: 1,),
const SizedBox(height: 24,),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
CustomTextView(
text: 'Total bill',
fontSize: SizeConfig.textScaleFactor! * 14,
fontWeight: FontWeight.w400,
color: Colors.black),
CustomTextView(
text: '\u0024$totalBill',
fontSize: SizeConfig.textScaleFactor! * 14,
fontWeight: FontWeight.w400,
color: Colors.black),
],
),
],
),
);
}
}
70 changes: 70 additions & 0 deletions lib/view/components/widget/checkout/custom_location_button.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
import 'package:flutter/material.dart';
import 'package:platzi_fake_store/utils/size_config.dart';
import 'package:platzi_fake_store/view/components/widget/custom_text_view.dart';

class CustomLocationButton extends StatelessWidget {
const CustomLocationButton({Key? key, required this.title, required this.address, required this.onTap}) : super(key: key);
final String title;
final String address;
final Function() onTap;

@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: onTap,
child: Container(
width: SizeConfig.width,
padding: const EdgeInsets.only(left: 16,right: 16,top: 8,bottom: 8),
decoration: BoxDecoration(
color: Colors.grey.shade100,
borderRadius: BorderRadius.circular(20)),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Container(
width: SizeConfig.width! * 0.15,
height: SizeConfig.width! * 0.15,
decoration: const BoxDecoration(
shape: BoxShape.circle,
),
child: Card(
elevation: 1,
shape: StadiumBorder(
side: BorderSide(
color: Colors.grey.shade600,
width: 6,
),
),
child: const ClipOval(
clipBehavior: Clip.antiAlias,
child: Icon(Icons.location_on_outlined,size: 28,),
),
),
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
CustomTextView(
text: title,
fontSize: SizeConfig.textScaleFactor! * 20,
fontWeight: FontWeight.w500,
color: Colors.black),
CustomTextView(
text: address,
fontSize: SizeConfig.textScaleFactor! * 14,
fontWeight: FontWeight.w400,
color: Colors.grey.shade600),
],
),
const Icon(
Icons.edit_location_alt_outlined,
color: Colors.black,
size: 28,
),
],
),
),
);
}
}
134 changes: 134 additions & 0 deletions lib/view/components/widget/checkout/custom_product_view.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
import 'package:flutter/material.dart';
import 'package:platzi_fake_store/db/db_model/add_cart_product.dart';
import 'package:platzi_fake_store/utils/conversion.dart';
import 'package:platzi_fake_store/utils/size_config.dart';
import 'package:platzi_fake_store/view/components/widget/custom_text_view.dart';

class CustomProductView extends StatelessWidget {
const CustomProductView({Key? key, required this.item}) : super(key: key);
final AddCartProduct item;

@override
Widget build(BuildContext context) {
return Container(
width: SizeConfig.width,
padding: const EdgeInsets.all(10),
decoration: BoxDecoration(
color: Colors.grey.shade300,
borderRadius: BorderRadius.circular(30)),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Card(
clipBehavior: Clip.antiAlias,
color: Colors.grey.shade50,
elevation: 0.3,
shadowColor: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(20),
),
child: Container(
color: Colors.white,
height: SizeConfig.width! * 0.26,
width: SizeConfig.width! * 0.345,
alignment: Alignment.center,
child: Image.network(
Conversion().imageUrl(images: item.images).first,
fit: BoxFit.fitWidth,
),
),
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
SizedBox(
width: SizeConfig.width! * 0.34,
child: CustomTextView(
text: item.title,
fontSize: 16,
fontWeight: FontWeight.w600,
color: Colors.black),
),
],
),
Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Container(
width: 24,
height: 24,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: Color(item.color)),
),
SizedBox(
width: SizeConfig.width! * 0.02,
),
const CustomTextView(
text: 'color',
fontSize: 15,
fontWeight: FontWeight.w400,
color: Colors.grey),
SizedBox(
width: SizeConfig.width! * 0.02,
),
const CustomTextView(
text: '|',
fontSize: 15,
fontWeight: FontWeight.w400,
color: Colors.grey),
SizedBox(
width: SizeConfig.width! * 0.02,
),
CustomTextView(
text: 'size = ${item.size}',
fontSize: 15,
fontWeight: FontWeight.w400,
color: Colors.grey),
],
),
const SizedBox(
height: 10,
),
Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
CustomTextView(
text: '\u0024${item.price}',
fontSize: 18,
fontWeight: FontWeight.w600,
color: Colors.black),
SizedBox(
width: SizeConfig.width! * 0.05,
),
Container(
width: SizeConfig.width! * 0.08,
height: SizeConfig.width! * 0.08,
alignment: Alignment.center,
decoration: BoxDecoration(
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(30),
color: Colors.grey),
child: CustomTextView(
text: '${item.quantity}',
fontSize: 12,
fontWeight: FontWeight.w400,
color: Colors.black),
),
],
)
],
)
],
),
);
}
}
Loading

0 comments on commit 2535789

Please sign in to comment.