优化:积分不足的时候跳转到充值中心
This commit is contained in:
parent
5f688352a8
commit
5cfb4c74af
@ -66,6 +66,14 @@ class _GenerateVideoScreenState extends State<GenerateVideoScreen> {
|
||||
Future<void> _onGenerateButtonTap() async {
|
||||
if (_isGenerating) return;
|
||||
|
||||
final userCredits = UserState.credits.value ?? 0;
|
||||
if (userCredits < _currentCredits) {
|
||||
if (mounted) {
|
||||
Navigator.of(context).pushNamed('/recharge');
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
final source = await showModalBottomSheet<ImageSource>(
|
||||
context: context,
|
||||
builder: (context) => SafeArea(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user