-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from shaunhossain/wallet_screen
Wallet screen
- Loading branch information
Showing
21 changed files
with
738 additions
and
303 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
76 changes: 76 additions & 0 deletions
76
lib/view/components/widget/checkout/custom_bill_board.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
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
70
lib/view/components/widget/checkout/custom_location_button.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
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
134
lib/view/components/widget/checkout/custom_product_view.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
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), | ||
), | ||
], | ||
) | ||
], | ||
) | ||
], | ||
), | ||
); | ||
} | ||
} |
Oops, something went wrong.