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"]);
}
相关推荐
一只大侠的侠2 小时前
Flutter开源鸿蒙跨平台训练营 Day 10特惠推荐数据的获取与渲染
flutter·开源·harmonyos
renke33646 小时前
Flutter for OpenHarmony:色彩捕手——基于HSL色轮与感知色差的交互式色觉训练系统
flutter
子春一8 小时前
Flutter for OpenHarmony:构建一个 Flutter 四色猜谜游戏,深入解析密码逻辑、反馈算法与经典益智游戏重构
算法·flutter·游戏
御承扬8 小时前
鸿蒙NDK UI之文本自定义样式
ui·华为·harmonyos·鸿蒙ndk ui
铅笔侠_小龙虾8 小时前
Flutter 实战: 计算器
开发语言·javascript·flutter
微祎_10 小时前
Flutter for OpenHarmony:构建一个 Flutter 重力弹球游戏,2D 物理引擎、手势交互与关卡设计的工程实现
flutter·游戏·交互
一起养小猫10 小时前
Flutter for OpenHarmony 实战_魔方应用UI设计与交互优化
flutter·ui·交互·harmonyos
hudawei99610 小时前
flutter和Android动画的对比
android·flutter·动画
一只大侠的侠11 小时前
Flutter开源鸿蒙跨平台训练营 Day7Flutter+ArkTS双方案实现轮播图+搜索框+导航组件
flutter·开源·harmonyos
一只大侠的侠11 小时前
Flutter开源鸿蒙跨平台训练营 Day9分类数据的获取与渲染实现
flutter·开源·harmonyos