update rate

This commit is contained in:
PhyoThandar
2020-10-15 15:49:02 +06:30
parent 47c07a6c88
commit 2a401f2e1f
17 changed files with 937 additions and 295 deletions

View File

@@ -20,6 +20,16 @@ class DiscountList extends StatefulWidget {
class _DiscountListState extends State<DiscountList> {
bool _isLoading = false;
bool _selected = false;
@override
void initState() {
super.initState();
if (widget.selected != null) {
_selected = widget.selected;
}
}
@override
Widget build(BuildContext context) {
var discountModel = Provider.of<DiscountModel>(context);
@@ -53,7 +63,7 @@ class _DiscountListState extends State<DiscountList> {
var discount = discountModel.discounts[index];
return InkWell(
onTap: () {
widget.selected
_selected
? Navigator.pop(context, discount)
: Navigator.push(
context,