-
Notifications
You must be signed in to change notification settings - Fork 10
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
398c070
commit 0ca9ec5
Showing
14 changed files
with
954 additions
and
100 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
org.gradle.jvmargs=-Xmx1536M | ||
android.useAndroidX=true | ||
android.enableJetifier=true | ||
android.enableR8=true |
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,112 @@ | ||
import 'package:drink_order_app_ui/constants/constants.dart'; | ||
import 'package:drink_order_app_ui/constants/custom_icons_icons.dart'; | ||
import 'package:flutter/material.dart'; | ||
|
||
class Background extends StatefulWidget { | ||
final String drinkImageUrl; | ||
|
||
Background(this.drinkImageUrl); | ||
|
||
@override | ||
_BackgroundState createState() => _BackgroundState(); | ||
} | ||
|
||
class _BackgroundState extends State<Background> { | ||
@override | ||
Widget build(BuildContext context) { | ||
Size size = MediaQuery.of(context).size; | ||
|
||
return Column( | ||
mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
crossAxisAlignment: CrossAxisAlignment.start, | ||
children: [ | ||
Image( | ||
height: size.height * 0.55, | ||
width: size.width, | ||
image: AssetImage(widget.drinkImageUrl), | ||
fit: BoxFit.cover, | ||
), | ||
Padding( | ||
padding: EdgeInsets.only(bottom: appPadding, left: appPadding * 1.5), | ||
child: Column( | ||
mainAxisAlignment: MainAxisAlignment.end, | ||
crossAxisAlignment: CrossAxisAlignment.start, | ||
children: [ | ||
Text( | ||
'Total Order', | ||
style: TextStyle( | ||
color: white, | ||
fontSize: 18, | ||
), | ||
), | ||
SizedBox( | ||
height: size.height * 0.02, | ||
), | ||
Row( | ||
crossAxisAlignment: CrossAxisAlignment.end, | ||
children: [ | ||
Column( | ||
children: [ | ||
Stack( | ||
children: [ | ||
Icon( | ||
CustomIcons.cocktails, | ||
color: white.withOpacity(0.4), | ||
size: 30, | ||
), | ||
Positioned( | ||
right: 0, | ||
child: Container( | ||
height: size.height * 0.025, | ||
width: size.width * 0.05, | ||
decoration: BoxDecoration( | ||
shape: BoxShape.circle, | ||
color: grey_dark.withOpacity(0.8)), | ||
child: Center( | ||
child: Text( | ||
'3', | ||
style: TextStyle(color: white), | ||
), | ||
), | ||
), | ||
) | ||
], | ||
), | ||
SizedBox( | ||
height: size.height * 0.01, | ||
), | ||
Text( | ||
'Total Drinks', | ||
style: TextStyle( | ||
color: white.withOpacity(0.4), fontSize: 10.0), | ||
) | ||
], | ||
), | ||
SizedBox( | ||
width: size.height * 0.1, | ||
), | ||
Column( | ||
children: [ | ||
Text( | ||
'\$32', | ||
style: TextStyle(color: white,fontSize: 24,fontWeight: FontWeight.bold), | ||
), | ||
SizedBox( | ||
height: size.height * 0.01, | ||
), | ||
Text( | ||
'Total Price', | ||
style: TextStyle( | ||
color: white.withOpacity(0.4), fontSize: 10.0), | ||
) | ||
], | ||
) | ||
], | ||
) | ||
], | ||
), | ||
) | ||
], | ||
); | ||
} | ||
} |
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,32 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
class CurveClipper extends CustomClipper<Path> { | ||
@override | ||
Path getClip(Size size) { | ||
Path path = Path(); | ||
path.lineTo(0, size.height * 0.7); | ||
Offset curvePoint1 = Offset(0, size.height * 0.78); | ||
Offset centerPoint = Offset(size.width * 0.075, size.height * 0.8); | ||
path.quadraticBezierTo( | ||
curvePoint1.dx, curvePoint1.dy, centerPoint.dx, centerPoint.dy); | ||
|
||
path.lineTo(size.width * 0.925, size.height); | ||
|
||
Offset curvePoint2 = Offset(size.width, size.height); | ||
Offset endPoint = Offset(size.width, size.height * 0.9); | ||
|
||
path.quadraticBezierTo( | ||
curvePoint2.dx, curvePoint2.dy, endPoint.dx, endPoint.dy); | ||
|
||
path.lineTo(size.width, 0); | ||
|
||
path.close(); | ||
return path; | ||
} | ||
|
||
@override | ||
bool shouldReclip(covariant CustomClipper oldClipper) { | ||
return false; | ||
} | ||
|
||
} |
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,28 @@ | ||
import 'package:drink_order_app_ui/constants/constants.dart'; | ||
import 'package:flutter/material.dart'; | ||
|
||
class CustomBackButton extends StatelessWidget { | ||
@override | ||
Widget build(BuildContext context) { | ||
|
||
Size size = MediaQuery.of(context).size; | ||
|
||
return GestureDetector( | ||
onTap: () => { | ||
Navigator.pop(context), | ||
}, | ||
child: Padding( | ||
padding: const EdgeInsets.only(left: appPadding,top: appPadding * 1.5), | ||
child: Container( | ||
height: size.height * 0.075, | ||
width: size.width * 0.15, | ||
decoration: BoxDecoration( | ||
color: grey_dark, | ||
borderRadius: BorderRadius.circular(20.0), | ||
), | ||
child: Icon(Icons.arrow_back_ios,color: white,size: 25.0,), | ||
), | ||
), | ||
); | ||
} | ||
} |
Oops, something went wrong.