You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1.3 KiB
49 lines
1.3 KiB
import 'package:flutter/cupertino.dart';
|
|
import 'package:provider/provider.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:teso/Classes/API%20Clasess/CouponDetails.dart';
|
|
import 'package:teso/providers/user_provider.dart';
|
|
|
|
class RedeemingCoupon extends StatefulWidget {
|
|
final CouponDetails couponDetails;
|
|
|
|
const RedeemingCoupon({Key key, @required this.couponDetails})
|
|
: super(key: key);
|
|
@override
|
|
_RedeemingCouponState createState() => _RedeemingCouponState();
|
|
}
|
|
|
|
class _RedeemingCouponState extends State<RedeemingCoupon> {
|
|
@override
|
|
void initState() {
|
|
super.initState();
|
|
Provider.of<UserProvider>(context, listen: false)
|
|
.redeemCoupon(widget.couponDetails, context);
|
|
}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
body: Center(
|
|
child: Container(
|
|
width: 200,
|
|
height: 200,
|
|
child: Column(
|
|
children: [
|
|
Container(
|
|
child: CupertinoActivityIndicator(
|
|
animating: true,
|
|
radius: 15,
|
|
),
|
|
),
|
|
Container(
|
|
child: Text("Please wait, redeeming coupon!!"),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|