Showing
2 changed files
with
4 additions
and
4 deletions
| @@ -14,9 +14,7 @@ class MyApp extends StatelessWidget { | @@ -14,9 +14,7 @@ class MyApp extends StatelessWidget { | ||
| 14 | title: 'Flutter_ScreenUtil', | 14 | title: 'Flutter_ScreenUtil', |
| 15 | theme: ThemeData( | 15 | theme: ThemeData( |
| 16 | primarySwatch: Colors.blue, | 16 | primarySwatch: Colors.blue, |
| 17 | - textTheme: TextTheme( | ||
| 18 | - button: TextStyle(fontSize: 45.sp) | ||
| 19 | - ), | 17 | + textTheme: TextTheme(button: TextStyle(fontSize: 45.sp)), |
| 20 | ), | 18 | ), |
| 21 | builder: (context, widget) { | 19 | builder: (context, widget) { |
| 22 | return MediaQuery( | 20 | return MediaQuery( |
| @@ -66,7 +66,9 @@ class _HomePageState extends State<HomePage> { | @@ -66,7 +66,9 @@ class _HomePageState extends State<HomePage> { | ||
| 66 | child: Text( | 66 | child: Text( |
| 67 | '我的设计稿宽度: 180dp \n' | 67 | '我的设计稿宽度: 180dp \n' |
| 68 | '我的设计稿高度: 200dp', | 68 | '我的设计稿高度: 200dp', |
| 69 | - style: TextStyle(color: Colors.white, fontSize: ScreenUtil().setSp(12))), | 69 | + style: TextStyle( |
| 70 | + color: Colors.white, | ||
| 71 | + fontSize: ScreenUtil().setSp(12))), | ||
| 70 | ), | 72 | ), |
| 71 | ], | 73 | ], |
| 72 | ), | 74 | ), |
-
Please register or login to post a comment