Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
joker-fu committed May 31, 2024
1 parent a9b038d commit aeca735
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
### Properties

| Property | Type | Default Value | Description |
| ----------------- | ---------------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| ----------------- | ---------------- | ------------- |-----------------------------------------------------------------------------------------------------------------------------------------------|
| designSize | Size | Size(360,690) | The size of the device screen in the design draft, in dp |
| builder | Function | null | Return widget that uses the library in a property (ex: MaterialApp's theme) |
| child | Widget | null | A part of builder that its dependencies/properties don't use the library |
Expand All @@ -52,6 +52,8 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
| fontSizeResolver | Function | _default_ | Function that specify how font size should be adapted. Default is that font size scale with width of screen. |
| responsiveWidgets | Iterable<String> | null | List/Set of widget names that should be included in rebuilding tree. (See [How flutter_screenutil marks a widget needs build](#rebuild-list)) |
| excludeWidgets | Iterable<String> | null | List/Set of widget names that should be excluded from rebuilding tree. |
| enableScaleWH | Function | null | Support enable scale width and height. |
| enableScaleText | Function | null | Support enable scale text. |


**Note : You must either provide builder, child or both.**
Expand Down Expand Up @@ -184,6 +186,25 @@ class _HomePageState extends State<HomePage> {

### API

#### Enable or disable scale

```dart
Widget build(BuildContext context) {
return ScreenUtilInit(
enableScaleWH: ()=>false,
enableScaleText: ()=>false,
//...
);
}
```

or

```dart
ScreenUtil.enableScale(enableWH: () => false, enableText: () => false);
```


#### Pass the dp size of the design draft

```dart
Expand Down

0 comments on commit aeca735

Please sign in to comment.