Skip to content
New issue

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

Fix README.md for incorrect ResponsiveSizer reference #20

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ dependencies:
import 'package:sizer/sizer.dart';
```

## Wrap MaterialApp with ResponsiveSizer widget
## Wrap `MaterialApp`/`WidgetsApp` with `Sizer` widget
```dart
ResponsiveSizer(
Sizer(
builder: (context, orientation, deviceType) {
return MaterialApp();
return MaterialApp(); // WidgetsApp works
}
)
)
```

Whenever you use height and width first import sizer package.
Expand All @@ -67,7 +67,7 @@ import 'package:sizer/sizer.dart';
```dart
Container(
width: 20.w, //It will take a 20% of screen width
height:30.h //It will take a 30% of screen height
height: 30.h, //It will take a 30% of screen height
)
```

Expand All @@ -82,7 +82,8 @@ import 'package:sizer/sizer.dart';
## Font size 🆎
```dart
Text(
'Sizer',style: TextStyle(fontSize: 15.sp),
'Sizer',
style: TextStyle(fontSize: 15.sp),
);
```

Expand All @@ -91,8 +92,8 @@ import 'package:sizer/sizer.dart';
If you want to make square size widget then give height or width in both height and width.
```dart
Container(
width: 30.h, //It will take a 30% of screen height
height: 30.h, //It will take a 30% of screen height
width: 30.h, //It will take a 30% of screen height
height: 30.h, //It will take a 30% of screen height
);
```

Expand Down Expand Up @@ -149,4 +150,4 @@ import 'package:sizer/sizer.dart';

## Issue and feedback 💭

If you have any suggestion for including a feature or if something doesn't work, feel free to open a Github [issue](https://github.com/TechnoUrmish/Sizer/issues) for us to have a discussion on it.
If you have any suggestion for including a feature or if something doesn't work, feel free to open a Github [issue](https://github.com/TechnoUrmish/Sizer/issues) for us to have a discussion on it.