19 lines
No EOL
565 B
Dart
19 lines
No EOL
565 B
Dart
import 'package:flutter/cupertino.dart';
|
|
import 'package:mnemo_cards_frontend_common/mnemo_cards_frontend_common.dart';
|
|
|
|
import '../di/locator.dart';
|
|
|
|
class MobileEnterPromoCodeWidget extends StatelessWidget {
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return EnterPromoCodeWidget(onApplyPromoCode: onApplyPromoCode);
|
|
}
|
|
|
|
Future<(bool, String?)> onApplyPromoCode(String code) async {
|
|
final result = await locator.userManager.applyPromocode(code);
|
|
return (result.success ?? false, result.message);
|
|
}
|
|
|
|
const MobileEnterPromoCodeWidget();
|
|
} |