final
This commit is contained in:
@@ -13,8 +13,7 @@ import '../../utils/http_util.dart';
|
||||
import '../../utils/utils.dart';
|
||||
|
||||
class MobileMyCards extends StatefulWidget {
|
||||
final Key key;
|
||||
const MobileMyCards({this.key});
|
||||
const MobileMyCards({Key? key});
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() {
|
||||
@@ -24,9 +23,9 @@ class MobileMyCards extends StatefulWidget {
|
||||
}
|
||||
|
||||
class MyCardsState extends State<MobileMyCards> {
|
||||
User _user;
|
||||
User? _user;
|
||||
|
||||
bool isSubmitting;
|
||||
bool isSubmitting = false;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -44,9 +43,9 @@ class MyCardsState extends State<MobileMyCards> {
|
||||
backgroundColor: Theme.of(context).primaryColor,
|
||||
),
|
||||
body: ListView.builder(
|
||||
itemCount: _user.stripePaymentMethods.length,
|
||||
itemCount: _user!.stripePaymentMethods.length,
|
||||
itemBuilder: (BuildContext context, int position) {
|
||||
StripePaymentMethod paymentMethod = _user.stripePaymentMethods[position];
|
||||
StripePaymentMethod paymentMethod = _user!.stripePaymentMethods[position];
|
||||
return cardWidget(paymentMethod);
|
||||
}
|
||||
),
|
||||
@@ -116,7 +115,7 @@ class MyCardsState extends State<MobileMyCards> {
|
||||
TextButton(
|
||||
child: Text(S.of(context).cancel),
|
||||
style: TextButton.styleFrom(
|
||||
primary: Theme.of(context).primaryColor,
|
||||
foregroundColor: Theme.of(context).primaryColor,
|
||||
),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
|
||||
Reference in New Issue
Block a user