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.
67 lines
2.1 KiB
67 lines
2.1 KiB
import 'package:flutter/material.dart';
|
|
import 'package:get/get.dart';
|
|
import '../../../routes/app_routes.dart';
|
|
|
|
void showRechargeDialog(String type) {
|
|
Get.dialog(
|
|
Dialog(
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(12),
|
|
),
|
|
child: Stack(
|
|
children: [
|
|
Padding(
|
|
padding: const EdgeInsets.fromLTRB(16, 20, 16, 16),
|
|
child: Column(
|
|
mainAxisSize: MainAxisSize.min,
|
|
children: [
|
|
Text(
|
|
'tip'.tr,
|
|
style: const TextStyle(
|
|
fontSize: 18,
|
|
fontWeight: FontWeight.bold,
|
|
),
|
|
),
|
|
const SizedBox(height: 12),
|
|
Text(
|
|
'insufficientBalanceDesc'.tr, //'余额不足,请前往对应充值界面进行充值',
|
|
textAlign: TextAlign.center,
|
|
),
|
|
const SizedBox(height: 20),
|
|
SizedBox(
|
|
width: double.infinity,
|
|
child: ElevatedButton(
|
|
style: ElevatedButton.styleFrom(
|
|
backgroundColor: Colors.orangeAccent,
|
|
foregroundColor: Colors.white,
|
|
),
|
|
onPressed: () {
|
|
Get.back();
|
|
if (type == 'agent') {
|
|
Get.toNamed(Routes.goodsvip);
|
|
} else if (type == 'translation') {
|
|
Get.toNamed(Routes.goodstrade);
|
|
} else if (type == 'meeting') {
|
|
Get.toNamed(Routes.goodsmeet);
|
|
}
|
|
},
|
|
child: Text('recharge'.tr),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
Positioned(
|
|
right: 8,
|
|
top: 8,
|
|
child: IconButton(
|
|
icon: const Icon(Icons.close),
|
|
onPressed: () => Get.back(),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
barrierDismissible: true,
|
|
);
|
|
}
|
|
|