mo_adapt 0.1.0
mo_adapt: ^0.1.0 copied to clipboard
Wrap your app once and every UI dimension - text, padding, icons, radii, widths, heights - scales proportionally to the screen from a reference design size. No .w/.h/.sp accessors needed.
Use this package as a library
Depend on it
Run this command:
With Flutter:
$ flutter pub add mo_adaptThis will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):
dependencies:
mo_adapt: ^0.1.0Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.
Import it
Now in your Dart code, you can use:
import 'package:mo_adapt/mo_adapt.dart';