We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
开发模式下一切正常,打包后,主题中的字体大小,和使用了的padding大小都失效了
import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:xxxx/common/theme/color_scheme.dart'; final defaultTextStyle = TextStyle( fontSize: 14.sp, color: SimiColorScheme.textPrimary, ); final specialNumberTextStyle = TextStyle( fontSize: 18.sp, fontFamily: 'DINPro', fontWeight: FontWeight.w500, ); final specialTextStyle = TextStyle( fontSize: 18.sp, fontFamily: 'YouSheBiaoTiHei', fontWeight: FontWeight.bold, ); final textTheme = TextTheme( headlineMedium: TextStyle( fontSize: 28.sp, fontWeight: FontWeight.bold, ), titleMedium: TextStyle( fontSize: 16.sp, fontWeight: FontWeight.bold, ), bodyLarge: TextStyle( fontSize: 18.sp, fontWeight: FontWeight.bold, ), bodyMedium: defaultTextStyle, bodySmall: TextStyle( fontSize: 12.sp, color: SimiColorScheme.textSecondary, ), );
Widget app = ScreenUtilInit( designSize: const Size(375, 812), minTextAdapt: true, splitScreenMode: true, builder: (context, child) { return DefaultTextStyle( style: defaultTextStyle, child: GetMaterialApp( title: "XXXX", initialRoute: AppPages.INITIAL, getPages: AppPages.routes, theme: themeData, debugShowCheckedModeBanner: false, builder: FToastBuilder(), ), ); }, );
The text was updated successfully, but these errors were encountered:
需要初始化屏幕尺寸 await ScreenUtil.ensureScreenSize(); runApp(const MyApp());
Sorry, something went wrong.
No branches or pull requests
开发模式下一切正常,打包后,主题中的字体大小,和使用了的padding大小都失效了
The text was updated successfully, but these errors were encountered: