js
复制代码
// 初始化数据
void _initData() {
showInviteFriendDialog();
update(["home"]);
}
// 显示邀请好友弹窗
void showInviteFriendDialog() {
Get.dialog(
Dialog(
backgroundColor: Colors.transparent,
elevation: 0,
child: <Widget>[
// 弹窗内容
<Widget>[
ImgWidget(path: 'assets/images/home12.png',width: 470.w,height: 470.w,),
SizedBox(height: 30.w),
TextWidget.body('邀请好友尊享交易返佣', size: 32.sp, color: AppTheme.colorfff),
SizedBox(height: 20.w),
// <Widget>[
// TextWidget.body('共同解锁', size: 32.sp, color: AppTheme.colorfff),
// TextWidget.body('1000USDT', size: 48.sp, color: AppTheme.colorGreen,weight: FontWeight.w600),
// TextWidget.body('奖励', size: 32.sp, color: AppTheme.colorfff),
// ].toRow(mainAxisAlignment: MainAxisAlignment.center),
SizedBox(height: 40.w),
ButtonWidget(
text: '邀请好友',
width: 690,
height: 88,
borderRadius: 44,
backgroundColor: AppTheme.colorfff,
textColor: AppTheme.color000,
onTap: () {
Get.back();
Get.toNamed('/sharePage');
},
),
SizedBox(height: 60.w),
const Icon(Icons.close,size: 32,color: Colors.white,).onTap((){
Get.back();
}),
].toColumn().paddingAll(30.w),
].toColumn(crossAxisAlignment: CrossAxisAlignment.center,mainAxisAlignment: MainAxisAlignment.center)
),
barrierColor: Colors.black.withOpacity(0.7),
);
}