update subcription portal
This commit is contained in:
@@ -6,7 +6,12 @@ import '../constant.dart';
|
||||
import '../generated/l10n.dart' as lang;
|
||||
import '../model/business_info_model.dart';
|
||||
|
||||
Widget goToPackagePagePopup({required BuildContext context, required EnrolledPlan? enrolledPlan}) {
|
||||
Widget goToPackagePagePopup({
|
||||
required BuildContext context,
|
||||
required EnrolledPlan? enrolledPlan,
|
||||
VoidCallback? onCancel,
|
||||
VoidCallback? onUpgrade,
|
||||
}) {
|
||||
return AlertDialog(
|
||||
backgroundColor: kWhite,
|
||||
surfaceTintColor: kWhite,
|
||||
@@ -24,7 +29,11 @@ Widget goToPackagePagePopup({required BuildContext context, required EnrolledPla
|
||||
padding: EdgeInsets.zero,
|
||||
visualDensity: const VisualDensity(horizontal: -4, vertical: -4),
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
if (onCancel != null) {
|
||||
onCancel();
|
||||
} else {
|
||||
Navigator.pop(context);
|
||||
}
|
||||
},
|
||||
icon: const Icon(
|
||||
Icons.close,
|
||||
@@ -56,11 +65,55 @@ Widget goToPackagePagePopup({required BuildContext context, required EnrolledPla
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
ElevatedButton(
|
||||
child: Text(lang.S.of(context).upgradeNow),
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
}),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: OutlinedButton(
|
||||
style: OutlinedButton.styleFrom(
|
||||
padding: const EdgeInsets.symmetric(vertical: 13),
|
||||
side: const BorderSide(color: Colors.red),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(30),
|
||||
),
|
||||
),
|
||||
onPressed: () {
|
||||
if (onCancel != null) {
|
||||
onCancel();
|
||||
} else {
|
||||
Navigator.pop(context);
|
||||
}
|
||||
},
|
||||
child: Text(
|
||||
lang.S.of(context).cancel,
|
||||
style: const TextStyle(color: Colors.red),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Expanded(
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
padding: const EdgeInsets.symmetric(vertical: 13),
|
||||
backgroundColor: kMainColor,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(30),
|
||||
),
|
||||
),
|
||||
child: Text(
|
||||
lang.S.of(context).upgradeNow,
|
||||
style: const TextStyle(color: Colors.white),
|
||||
),
|
||||
onPressed: () {
|
||||
if (onUpgrade != null) {
|
||||
onUpgrade();
|
||||
} else {
|
||||
Navigator.pop(context);
|
||||
}
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 5),
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user