Flutter:图片在弹窗外部的UI布局

图片在弹窗外部的UI布局

js 复制代码
// 签到
void signIn() async{
  if(signInStatus) return Loading.toast('今日已签到');
  signinAmount = await HomeApi.signin();
  if(signinAmount.amount == null) return;
  refreshController.requestRefresh();
  _initData();
  showGeneralDialog(
    context: Get.context!,
    pageBuilder: (BuildContext buildContext, Animation<double> animation, Animation<double> secondaryAnimation) {
      return TDAlertDialog(
        title: '',
        backgroundColor: Colors.transparent,
        padding: const EdgeInsets.all(0),
        buttonWidget:<Widget>[].toRow(),
        contentWidget:<Widget>[
          <Widget>[
            SizedBox(height: 200.w,),
            TextWidget.body('今日签到成功',size: 36.sp,color: AppTheme.colorfff,weight: FontWeight.bold,),
            <Widget>[
              TDImage(assetUrl: 'assets/img/home9.png',width: 44.w,height: 44.w,type: TDImageType.square,),
              SizedBox(width: 10.w,),
              TextWidget.body('星火+${signinAmount.amount}',size: 28.sp,color: AppTheme.colorfff,),
            ].toRow(mainAxisAlignment: MainAxisAlignment.center)
            .paddingHorizontal(30.w)
            .backgroundColor(AppTheme.blockTwoBgColor)
            .height(88.w)
            .marginOnly(top: 20.w,bottom: 30.w)
            .clipRRect(all: 10.w),

            TDButton(
            text: '确认',
            isBlock: true,
            width: 690.w,
            height: 76.w,
            padding: const EdgeInsets.all(0),
            margin: const EdgeInsets.all(0),
            style: TDButtonStyle(
              backgroundColor:  AppTheme.primary,
              textColor: Colors.white,
              radius: BorderRadius.circular(10.w),
            ),
            textStyle: TextStyle(
              fontSize: 28.sp,
              fontWeight: FontWeight.w600,
            ),
            onTap: () {
              Navigator.pop(Get.context!);
            },
          ),

          ].toColumn(crossAxisAlignment: CrossAxisAlignment.center)
          .paddingHorizontal(30.w)
          .tight(width: 550.w,height: 500.w)
          .decorated(
            borderRadius: BorderRadius.circular(20.w),
            border: Border.all(color: AppTheme.primary,width: 1),
          )
          .backgroundColor(AppTheme.blockBgColor).positioned(top: 170.w),

          TDImage(assetUrl: 'assets/img/home11.png',width: 368.w,height: 302.w,type: TDImageType.square,).positioned(left: 90.w),
        ].toStack().tight(width: 650.w,height: 700.w)
        .marginOnly(top: 20.w),
      );
    },
  );
  update(["sign_in"]);
}
相关推荐
来来走走3 小时前
Flutter Form组件的基本使用
android·flutter
传奇开心果编程10 小时前
【传奇开心果系列】Flet框架实现的家庭记账本示例自定义模板
python·学习·ui·前端框架·自动化
fouryears_2341716 小时前
Flutter InheritedWidget 详解:从生命周期到数据流动的完整解析
开发语言·flutter·客户端·dart
公众号【林东笔记】获取资料20 小时前
Adobe Photoshop 2024:软件安装包分享和详细安装教程
ui·adobe·photoshop
LinXunFeng21 小时前
Flutter - 详情页 TabBar 与模块联动?秒了!
前端·flutter·开源
阅文作家助手开发团队_山神1 天前
第三章: 解决Android iPad蓝牙键盘联想词UI不跟随光标问题
flutter
阅文作家助手开发团队_山神1 天前
第四章:Flutter自定义Engine本地依赖与打包流程
前端·flutter
程序员老刘1 天前
Flutter 3.35 更新要点解析
flutter·ai编程·客户端
阅文作家助手开发团队_山神1 天前
第一章: Mac Flutter Engine开发准备工作
前端·flutter
EmmaGuo20151 天前
flutter3.7.12版本设置TextField的contextMenuBuilder的文字颜色
前端·flutter