scaler 1.0.6+1 scaler: ^1.0.6+1 copied to clipboard
Set your width height on the basis of percentage of the screen. Its value will be between ( 0 -1 ) set the value between 0 to 1 for 0 to 100% scale to width/height of screen.
Use this package as a library
Depend on it
Run this command:
With Dart:
$ dart pub add scaler
With Flutter:
$ flutter pub add scaler
This will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get
):
dependencies:
scaler: ^1.0.6+1
Alternatively, your editor might support dart pub get
or flutter pub get
. Check the docs for your editor to learn more.
Import it
Now in your Dart code, you can use:
import 'package:scaler/scaler.dart';