import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:star_lock/app_settings/app_colors.dart'; import 'package:star_lock/translations/trans_lib.dart'; mixin BaseWidget { double fs(double value) => value.sp; double w(double width) => width.w; double h(double height) => height.h; initUI(Widget widget) => ScreenUtilInit( // designSize: const Size(750, 1334), designSize: const Size(375, 812), minTextAdapt: true, splitScreenMode: true, builder: (context, child) { return widget; }, ); ///数据为空的视图 Widget emptyView() { return Container( width: double.infinity, height: double.infinity, color: Colors.white, child: Column( crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center, children: [ Image.asset( 'images/icon_unHaveData.png', height: 120.w, width: 120.w, ), Padding( padding: const EdgeInsets.only(top: 10), child: Text('暂无数据'.tr, style: TextStyle( fontSize: 22.sp, color: AppColors.darkGrayTextColor)), ) ], ), ); } }