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"]);
}
相关推荐
程序员老刘5 小时前
Flutter版本选择指南:3.44稳定了11周正式转正 | 2026年10月
flutter·ai编程·客户端
_Doubletful9 小时前
从零开始学 UI 第一篇:Figma 快速上手实战指南(上)
ui·figma
mmsx10 小时前
Android 三类「看着无关」的故障:大事务、UI 阻塞与 ViewModel 作用域
android·ui
chicken_h12 小时前
【无标题】
flutter·打包
民乐团扒谱机13 小时前
【超详细】从“硬编码”到“主题化宏”:大型桌面端UI重构与模块解耦实战避坑指南
ui·重构
事圆则缓14 小时前
Flutter 底层渲染引擎怎么变了:从 Skia 到 Impeller,以及迁移时的坑
flutter
电子云与长程纠缠1 天前
UE5魂系游戏开发教程05
开发语言·学习·游戏·ui·ue5
码林鼠1 天前
flutter状态管理入门教程-Riverpod
开发语言·javascript·flutter
码林鼠1 天前
flutter网络http请求入门教程-dio
网络协议·flutter·http
码林鼠1 天前
flutter BLoC 单向数据流完整教程
flutter