This repository has been archived by the owner on Apr 21, 2022. It is now read-only.
-
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.
- Loading branch information
Showing
36 changed files
with
2,489 additions
and
2,322 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.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
import "package:flutter/material.dart"; | ||
import "package:flutter_gen/gen_l10n/app_localizations.dart"; | ||
import "package:food_busters/styles/styles.dart"; | ||
|
||
Widget backHomeBtn(BuildContext context, AppLocalizations text) => | ||
ElevatedButton( | ||
onPressed: () { | ||
Navigator.of(context).pop(); | ||
}, | ||
child: Text( | ||
text.back_to_home, | ||
style: const TextStyle(fontSize: 18), | ||
), | ||
style: loginRegisterBtn, | ||
); | ||
import "package:flutter/material.dart"; | ||
import "package:flutter_gen/gen_l10n/app_localizations.dart"; | ||
import "package:food_busters/styles/styles.dart"; | ||
|
||
Widget backHomeBtn(BuildContext context, AppLocalizations text) => | ||
ElevatedButton( | ||
onPressed: () { | ||
Navigator.of(context).pop(); | ||
}, | ||
child: Text( | ||
text.back_to_home, | ||
style: const TextStyle(fontSize: 18), | ||
), | ||
style: loginRegisterBtn, | ||
); |
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,59 +1,59 @@ | ||
import "package:flutter/material.dart"; | ||
import "package:flutter_gen/gen_l10n/app_localizations.dart"; | ||
import "package:food_busters/styles/styles.dart"; | ||
|
||
AlertDialog exchangeSuccess( | ||
AppLocalizations text, | ||
BuildContext context, { | ||
bool showQR = false, | ||
}) => | ||
AlertDialog( | ||
title: Text(text.exchange.toUpperCase(), textAlign: TextAlign.center), | ||
backgroundColor: lightGreen, | ||
content: showQR | ||
? Column( | ||
mainAxisSize: MainAxisSize.min, | ||
children: [ | ||
Text(text.exchange_complete), | ||
Padding( | ||
padding: const EdgeInsets.symmetric(vertical: 8.0), | ||
child: Image.asset("assets/images/dummy_QR.png"), | ||
), | ||
Text(text.use_this_qr, style: const TextStyle(fontSize: 12)), | ||
], | ||
) | ||
: Text(text.exchange_complete), | ||
actions: [ | ||
TextButton( | ||
child: Text( | ||
text.window_close, | ||
style: const TextStyle( | ||
color: Colors.black, | ||
), | ||
), | ||
onPressed: () { | ||
Navigator.of(context).pop(); | ||
}, | ||
), | ||
], | ||
); | ||
|
||
AlertDialog exchangeFailed(AppLocalizations text, BuildContext context) => | ||
AlertDialog( | ||
title: Text(text.exchange.toUpperCase(), textAlign: TextAlign.center), | ||
backgroundColor: rose, | ||
content: Text(text.exchange_failed), | ||
actions: [ | ||
TextButton( | ||
child: Text( | ||
text.window_close, | ||
style: const TextStyle( | ||
color: Colors.black, | ||
), | ||
), | ||
onPressed: () { | ||
Navigator.of(context).pop(); | ||
}, | ||
), | ||
], | ||
); | ||
import "package:flutter/material.dart"; | ||
import "package:flutter_gen/gen_l10n/app_localizations.dart"; | ||
import "package:food_busters/styles/styles.dart"; | ||
|
||
AlertDialog exchangeSuccess( | ||
AppLocalizations text, | ||
BuildContext context, { | ||
bool showQR = false, | ||
}) => | ||
AlertDialog( | ||
title: Text(text.exchange.toUpperCase(), textAlign: TextAlign.center), | ||
backgroundColor: lightGreen, | ||
content: showQR | ||
? Column( | ||
mainAxisSize: MainAxisSize.min, | ||
children: [ | ||
Text(text.exchange_complete), | ||
Padding( | ||
padding: const EdgeInsets.symmetric(vertical: 8.0), | ||
child: Image.asset("assets/images/dummy_QR.png"), | ||
), | ||
Text(text.use_this_qr, style: const TextStyle(fontSize: 12)), | ||
], | ||
) | ||
: Text(text.exchange_complete), | ||
actions: [ | ||
TextButton( | ||
child: Text( | ||
text.window_close, | ||
style: const TextStyle( | ||
color: Colors.black, | ||
), | ||
), | ||
onPressed: () { | ||
Navigator.of(context).pop(); | ||
}, | ||
), | ||
], | ||
); | ||
|
||
AlertDialog exchangeFailed(AppLocalizations text, BuildContext context) => | ||
AlertDialog( | ||
title: Text(text.exchange.toUpperCase(), textAlign: TextAlign.center), | ||
backgroundColor: rose, | ||
content: Text(text.exchange_failed), | ||
actions: [ | ||
TextButton( | ||
child: Text( | ||
text.window_close, | ||
style: const TextStyle( | ||
color: Colors.black, | ||
), | ||
), | ||
onPressed: () { | ||
Navigator.of(context).pop(); | ||
}, | ||
), | ||
], | ||
); |
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,41 +1,41 @@ | ||
import "package:flutter/material.dart"; | ||
|
||
List<Widget> greenLeaves(int count) { | ||
List<Widget> widgets = []; | ||
for (int i = 0; i < count; i++) { | ||
widgets.add(leaf); | ||
} | ||
return widgets; | ||
} | ||
|
||
List<Widget> bigGreenLeaves(int count) { | ||
List<Widget> widgets = []; | ||
for (int i = 0; i < count; i++) { | ||
widgets.add(bigLeaf); | ||
} | ||
return widgets; | ||
} | ||
|
||
final leaf = Container( | ||
height: 30, | ||
width: 30, | ||
decoration: const BoxDecoration( | ||
shape: BoxShape.rectangle, | ||
image: DecorationImage( | ||
fit: BoxFit.cover, | ||
image: AssetImage("assets/images/leaf.png"), | ||
), | ||
), | ||
); | ||
|
||
final bigLeaf = Container( | ||
height: 60, | ||
width: 60, | ||
decoration: const BoxDecoration( | ||
shape: BoxShape.rectangle, | ||
image: DecorationImage( | ||
fit: BoxFit.cover, | ||
image: AssetImage("assets/images/leaf.png"), | ||
), | ||
), | ||
); | ||
import "package:flutter/material.dart"; | ||
|
||
List<Widget> greenLeaves(int count) { | ||
List<Widget> widgets = []; | ||
for (int i = 0; i < count; i++) { | ||
widgets.add(leaf); | ||
} | ||
return widgets; | ||
} | ||
|
||
List<Widget> bigGreenLeaves(int count) { | ||
List<Widget> widgets = []; | ||
for (int i = 0; i < count; i++) { | ||
widgets.add(bigLeaf); | ||
} | ||
return widgets; | ||
} | ||
|
||
final leaf = Container( | ||
height: 30, | ||
width: 30, | ||
decoration: const BoxDecoration( | ||
shape: BoxShape.rectangle, | ||
image: DecorationImage( | ||
fit: BoxFit.cover, | ||
image: AssetImage("assets/images/leaf.png"), | ||
), | ||
), | ||
); | ||
|
||
final bigLeaf = Container( | ||
height: 60, | ||
width: 60, | ||
decoration: const BoxDecoration( | ||
shape: BoxShape.rectangle, | ||
image: DecorationImage( | ||
fit: BoxFit.cover, | ||
image: AssetImage("assets/images/leaf.png"), | ||
), | ||
), | ||
); |
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,4 +1,4 @@ | ||
// * Simulate Server Request | ||
Future<void> serverRequest() async { | ||
await Future.delayed(const Duration(milliseconds: 1000)); | ||
} | ||
// * Simulate Server Request | ||
Future<void> serverRequest() async { | ||
await Future.delayed(const Duration(milliseconds: 1000)); | ||
} |
Oops, something went wrong.