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"]);
}
相关推荐
Oll Correct10 小时前
Adobe illustrator 案例六:手枪图标绘制
笔记·ui·adobe·illustrator
键盘飞行员13 小时前
Flutter App 全套实战学习计划:从零搭建到 APK 部署
学习·flutter
GitLqr16 小时前
Flutter 实战:图片上传前的压缩优化,解决带宽与存储的“大户”问题
flutter·全栈·dart
进哥AI研习社20 小时前
AtomCode 跨端开发实战:Flutter 项目从原型到多端运行的 AI 驱动体验
人工智能·flutter
恋猫de小郭1 天前
Flutter A2UI 的正确用法,怎么把 AI 和动态 UI 结合有效生产
android·前端·flutter
ryanuo71 天前
Shadcn/ui × Qt 6/QML:一次从 Web UI 到桌面 UI 的组件化实践
c++·qt·ui·shadcn
年小个大1 天前
受 go-zero 启发,我给 Flutter 整了套 MVI-BLoC 脚手架
android·flutter·架构
Zender Han2 天前
Flutter 自适应(Adaptive)与响应式(Responsive)设计实践:官方推荐方案详解
android·flutter·ios
盛夏绽放2 天前
Proxy与Reflect详解(二):进阶篇——手写Vue3响应式系统
ui·vue3·proxy
造火箭2 天前
Android UI自动化测试可行性评估SKILL
android·功能测试·ui