Open
Description
开发模式下一切正常,打包后,主题中的字体大小,和使用了的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(),
),
);
},
);
Metadata
Metadata
Assignees
Labels
No labels