flutter_screenutil
5.9.3, released 2 years ago by an unverified publisher
A Flutter plugin for adapting screen and font size across different device models.
What it does
Adapts UI layouts and font sizes based on a provided design draft size. Offers extension methods to easily scale widths, heights, radii, and font sizes.
AI-written summary of version 5.9.3, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to precisely match UI dimensions from design drafts across varying screen sizes
- You want a straightforward way to scale fonts and spacing using extension methods like .w, .h, and .sp
Skip it when
- You prefer responsive layouts built using standard Flutter layout widgets and flexible constraints rather than fixed scaling
- Your app utilizes completely fluid designs that do not rely on fixed design-draft dimensions
Strengths
- Simple extension methods for sizing (.w, .h, .sp, .r)
- Supports split screen mode and minimum text adaptation
- Allows enabling or disabling scaling programmatically
Weaknesses
- Relies on a fixed design draft size which may not suit all adaptive/responsive design paradigms
- Can require careful configuration during widget tests (e.g. pumpAndSettle)
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
Initialize ScreenUtilInit once in your app's widget tree.
ScreenUtilInit(
designSize: const Size(360, 690),
minTextAdapt: true,
splitScreenMode: true,
builder: (_ , child) {
return MaterialApp(
home: HomePage(),
);
},
);Alternatives
Packages that do the same job and could replace flutter_screenutil.
- flutter_screenutil_plus
Adaptive screen and font scaling with CSS-like breakpoints and container-aware layouts.
74Compare - responsive_framework
Automatically adapt Flutter app UI to different screen sizes and breakpoints.
50Compare - adaptive_screen_utils
Flutter package for creating responsive UIs based on screen size and orientation.
48Compare - flutter_screen_scaler
Scale widget sizes and font sizes using screen percentages with concise extension methods.
43Compare
Works with
Packages commonly used together with flutter_screenutil: ones it builds on, ones built on it, and its own family.