forked from lohanidamodar/flutter_ui_challenges
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* cart three page design * cart three screenshot and readme * cart three page design * Cart three Readme * deleting old pictures Co-authored-by: Aparna16 <[email protected]>
- Loading branch information
1 parent
18d4481
commit 21f048d
Showing
9 changed files
with
203 additions
and
1 deletion.
There are no files selected for viewing
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
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.
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
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,199 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
/** | ||
* Author: Aparna Dulal | ||
* profile: https://github.com/ambikadulal | ||
*/ | ||
|
||
class CartThreePage extends StatefulWidget { | ||
static final String path = "lib/src/pages/ecommerece/cart3.dart"; | ||
|
||
@override | ||
_CartThreePageState createState() => _CartThreePageState(); | ||
} | ||
|
||
class _CartThreePageState extends State<CartThreePage> { | ||
@override | ||
Widget build(BuildContext context) { | ||
return Scaffold( | ||
backgroundColor: Color(0xFF21BFBD), | ||
body: ListView( | ||
children: <Widget>[ | ||
Padding( | ||
padding: EdgeInsets.only(top: 15.0, left: 10.0), | ||
child: Row( | ||
mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
children: <Widget>[ | ||
IconButton( | ||
icon: Icon(Icons.arrow_back_ios), | ||
color: Colors.white, | ||
onPressed: () {}, | ||
), | ||
Container( | ||
width: 125.0, | ||
child: Row( | ||
mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
children: <Widget>[ | ||
IconButton( | ||
icon: Icon(Icons.filter_list), | ||
color: Colors.white, | ||
onPressed: () {}, | ||
), | ||
IconButton( | ||
icon: Icon(Icons.menu), | ||
color: Colors.white, | ||
onPressed: () {}, | ||
) | ||
], | ||
)) | ||
], | ||
), | ||
), | ||
SizedBox(height: 25.0), | ||
Padding( | ||
padding: EdgeInsets.only(left: 40.0), | ||
child: Row( | ||
children: <Widget>[ | ||
Text('Delicious', | ||
style: TextStyle( | ||
fontFamily: 'Montserrat', | ||
color: Colors.white, | ||
fontWeight: FontWeight.bold, | ||
fontSize: 25.0)), | ||
SizedBox(width: 10.0), | ||
Text('Food', | ||
style: TextStyle( | ||
fontFamily: 'Montserrat', | ||
color: Colors.white, | ||
fontSize: 25.0)) | ||
], | ||
), | ||
), | ||
SizedBox(height: 40.0), | ||
Container( | ||
height: MediaQuery.of(context).size.height - 185.0, | ||
decoration: BoxDecoration( | ||
color: Colors.white, | ||
borderRadius: BorderRadius.only(topLeft: Radius.circular(75.0)), | ||
), | ||
child: ListView( | ||
primary: false, | ||
padding: EdgeInsets.only(left: 25.0, right: 20.0), | ||
children: <Widget>[ | ||
Padding( | ||
padding: EdgeInsets.only(top: 45.0), | ||
child: Container( | ||
height: MediaQuery.of(context).size.height - 300.0, | ||
child: ListView(children: [ | ||
_buildFoodItem('assets/fooditem/plate1.jpg', | ||
'Salmon bowl', '\$25.00'), | ||
_buildFoodItem('assets/fooditem/plate2.jpg', | ||
'Spring bowl', '\$20.00'), | ||
_buildFoodItem('assets/fooditem/plate3.jpg', | ||
'Avocado bowl', '\$26.00'), | ||
_buildFoodItem('assets/fooditem/plate4.jpg', | ||
'Berry bowl', '\$14.00') | ||
]))), | ||
Row( | ||
mainAxisAlignment: MainAxisAlignment.spaceEvenly, | ||
children: <Widget>[ | ||
Container( | ||
height: 65.0, | ||
width: 60.0, | ||
decoration: BoxDecoration( | ||
border: Border.all( | ||
color: Colors.grey, | ||
style: BorderStyle.solid, | ||
width: 1.0), | ||
borderRadius: BorderRadius.circular(10.0), | ||
), | ||
child: Center( | ||
child: Icon(Icons.search, color: Colors.black), | ||
), | ||
), | ||
Container( | ||
height: 65.0, | ||
width: 60.0, | ||
decoration: BoxDecoration( | ||
border: Border.all( | ||
color: Colors.grey, | ||
style: BorderStyle.solid, | ||
width: 1.0), | ||
borderRadius: BorderRadius.circular(10.0), | ||
), | ||
child: Center( | ||
child: Icon(Icons.shopping_basket, color: Colors.black), | ||
), | ||
), | ||
Container( | ||
height: 65.0, | ||
width: 120.0, | ||
decoration: BoxDecoration( | ||
border: Border.all( | ||
color: Colors.grey, | ||
style: BorderStyle.solid, | ||
width: 1.0), | ||
borderRadius: BorderRadius.circular(10.0), | ||
color: Color(0xFF1C1428)), | ||
child: Center( | ||
child: Text('Checkout', | ||
style: TextStyle( | ||
fontFamily: 'Montserrat', | ||
color: Colors.white, | ||
fontSize: 15.0))), | ||
) | ||
], | ||
) | ||
], | ||
), | ||
) | ||
], | ||
), | ||
); | ||
} | ||
|
||
Widget _buildFoodItem(String imgPath, String foodName, String price) { | ||
return Padding( | ||
padding: EdgeInsets.only(left: 10.0, right: 10.0, top: 10.0), | ||
child: InkWell( | ||
onTap: () { | ||
Navigator.of(context).push(MaterialPageRoute( | ||
//builder: | ||
)); | ||
}, | ||
child: Row( | ||
mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
children: <Widget>[ | ||
Container( | ||
child: Row(children: [ | ||
Hero( | ||
tag: imgPath, | ||
child: Image( | ||
image: AssetImage(imgPath), | ||
fit: BoxFit.cover, | ||
height: 75.0, | ||
width: 75.0)), | ||
SizedBox(width: 10.0), | ||
Column( | ||
crossAxisAlignment: CrossAxisAlignment.start, | ||
children: [ | ||
Text(foodName, | ||
style: TextStyle( | ||
fontFamily: 'Montserrat', | ||
fontSize: 17.0, | ||
fontWeight: FontWeight.bold)), | ||
Text(price, | ||
style: TextStyle( | ||
fontFamily: 'Montserrat', | ||
fontSize: 15.0, | ||
color: Colors.grey)) | ||
]) | ||
])), | ||
IconButton( | ||
icon: Icon(Icons.add), | ||
color: Colors.black, | ||
onPressed: () {}) | ||
], | ||
))); | ||
} | ||
} |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.