9 changed files with 154 additions and 120 deletions
@ -0,0 +1,67 @@ |
|||
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, |
|||
); |
|||
} |
|||
Loading…
Reference in new issue