初始化
This commit is contained in:
@@ -0,0 +1,84 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:hgdj/hj_utils/screen.dart';
|
||||
import 'package:hgdj/tools_base/widget/common_dialog.dart';
|
||||
|
||||
import '../../routers/jump_router.dart';
|
||||
|
||||
/// 显示vipdialog isJump 是否在dialog 内部处理跳转事件
|
||||
Future<int?> showVipLevelDialog(
|
||||
String content, {
|
||||
String buttonTitle = '立即开通',
|
||||
String? desc,
|
||||
Function? vipEvent,
|
||||
}) {
|
||||
return Get.dialog(
|
||||
barrierColor: Colors.black.withValues(alpha: .4),
|
||||
barrierDismissible: true,
|
||||
Container(
|
||||
alignment: Alignment.center,
|
||||
child: CommonDialog(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: <Widget>[
|
||||
Text(
|
||||
"溫馨提示",
|
||||
style: TextStyle(
|
||||
fontSize: 20,
|
||||
color: Color(0xE5FFFFFF),
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
24.sizeBoxH,
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 4),
|
||||
alignment: Alignment.center,
|
||||
child: Text(
|
||||
content,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 16, color: Color(0x73FFFFFF), height: 1.5),
|
||||
),
|
||||
),
|
||||
if (desc != null && desc.isNotEmpty)
|
||||
Container(
|
||||
padding: EdgeInsets.only(top: 16),
|
||||
child: Text(
|
||||
desc,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(fontSize: 16, color: Color(0x73FFFFFF)),
|
||||
),
|
||||
),
|
||||
24.sizeBoxH,
|
||||
InkWell(
|
||||
enableFeedback: false,
|
||||
onTap: () {
|
||||
if (vipEvent != null) {
|
||||
vipEvent.call();
|
||||
} else {
|
||||
pushToWalletPage(tabPosition: 0);
|
||||
}
|
||||
},
|
||||
child: Container(
|
||||
alignment: Alignment.center,
|
||||
height: 44,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(3),
|
||||
color: Color(0xffF68804),
|
||||
),
|
||||
child: Text(
|
||||
buttonTitle,
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user