Showing
4 changed files
with
41 additions
and
3 deletions
@@ -212,6 +212,7 @@ Column( | @@ -212,6 +212,7 @@ Column( | ||
212 | 212 | ||
213 | #### Setting font does not change with system font size | 213 | #### Setting font does not change with system font size |
214 | 214 | ||
215 | +APP global: | ||
215 | ``` | 216 | ``` |
216 | MaterialApp( | 217 | MaterialApp( |
217 | debugShowCheckedModeBanner: false, | 218 | debugShowCheckedModeBanner: false, |
@@ -230,6 +231,11 @@ Column( | @@ -230,6 +231,11 @@ Column( | ||
230 | ), | 231 | ), |
231 | ``` | 232 | ``` |
232 | 233 | ||
234 | +Separate Text: | ||
235 | +```dart | ||
236 | +Text("text", textScaleFactor: 1.0) | ||
237 | +``` | ||
238 | + | ||
233 | [widget test](https://github.com/OpenFlutter/flutter_screenutil/issues/115) | 239 | [widget test](https://github.com/OpenFlutter/flutter_screenutil/issues/115) |
234 | 240 | ||
235 | ### Example: | 241 | ### Example: |
@@ -214,7 +214,8 @@ Column( | @@ -214,7 +214,8 @@ Column( | ||
214 | 214 | ||
215 | #### 设置字体不随系统字体大小进行改变 | 215 | #### 设置字体不随系统字体大小进行改变 |
216 | 216 | ||
217 | -``` | 217 | +APP全局: |
218 | +```dart | ||
218 | MaterialApp( | 219 | MaterialApp( |
219 | debugShowCheckedModeBanner: false, | 220 | debugShowCheckedModeBanner: false, |
220 | title: 'Flutter_ScreenUtil', | 221 | title: 'Flutter_ScreenUtil', |
@@ -231,7 +232,10 @@ Column( | @@ -231,7 +232,10 @@ Column( | ||
231 | home: HomePage(title: 'FlutterScreenUtil Demo'), | 232 | home: HomePage(title: 'FlutterScreenUtil Demo'), |
232 | ), | 233 | ), |
233 | ``` | 234 | ``` |
234 | - | 235 | +单独的Text: |
236 | +```dart | ||
237 | +Text("text", textScaleFactor: 1.0) | ||
238 | +``` | ||
235 | 239 | ||
236 | [widget test](https://github.com/OpenFlutter/flutter_screenutil/issues/115) | 240 | [widget test](https://github.com/OpenFlutter/flutter_screenutil/issues/115) |
237 | 241 |
@@ -368,6 +368,34 @@ class _HomePageState extends State<HomePage> { | @@ -368,6 +368,34 @@ class _HomePageState extends State<HomePage> { | ||
368 | } | 368 | } |
369 | 369 | ||
370 | ``` | 370 | ``` |
371 | + | ||
372 | +#### Setting font does not change with system font size | ||
373 | + | ||
374 | +APP global: | ||
375 | +``` | ||
376 | + MaterialApp( | ||
377 | + debugShowCheckedModeBanner: false, | ||
378 | + title: 'Flutter_ScreenUtil', | ||
379 | + theme: ThemeData( | ||
380 | + primarySwatch: Colors.blue, | ||
381 | + ), | ||
382 | + builder: (context, widget) { | ||
383 | + return MediaQuery( | ||
384 | + ///Setting font does not change with system font size | ||
385 | + data: MediaQuery.of(context).copyWith(textScaleFactor: 1.0), | ||
386 | + child: widget, | ||
387 | + ); | ||
388 | + }, | ||
389 | + home: HomePage(title: 'FlutterScreenUtil Demo'), | ||
390 | + ), | ||
391 | +``` | ||
392 | + | ||
393 | +Separate Text: | ||
394 | +```dart | ||
395 | +Text("text", textScaleFactor: 1.0) | ||
396 | +``` | ||
397 | + | ||
398 | + | ||
371 | [widget test](https://github.com/OpenFlutter/flutter_screenutil/issues/115) | 399 | [widget test](https://github.com/OpenFlutter/flutter_screenutil/issues/115) |
372 | 400 | ||
373 | ### Exemplo: | 401 | ### Exemplo: |
@@ -4,7 +4,7 @@ version: 5.0.0 | @@ -4,7 +4,7 @@ version: 5.0.0 | ||
4 | homepage: https://github.com/OpenFlutter/flutter_screenutil | 4 | homepage: https://github.com/OpenFlutter/flutter_screenutil |
5 | 5 | ||
6 | environment: | 6 | environment: |
7 | - sdk: '>=2.12.0-29.10.beta <3.0.0' | 7 | + sdk: ">=2.12.0 <3.0.0" |
8 | 8 | ||
9 | dependencies: | 9 | dependencies: |
10 | flutter: | 10 | flutter: |
-
Please register or login to post a comment