flutter_screen_scaler
3.0.0, released a year ago by an unverified publisher
Scale widget sizes and font sizes using screen percentages with concise extension methods.
What it does
Provides a singleton ScreenScaler that converts numeric values into screen-relative dimensions and font sizes. Extension getters (.h, .w, .sp) make the API concise.
AI-written summary of version 3.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need responsive UI that adapts to different screen sizes
- You want to avoid hard‑coded pixel values
- You prefer a simple, declarative scaling syntax
Skip it when
- You need complex adaptive layouts that depend on breakpoints
- You are building a custom layout system that already handles scaling
Strengths
- Simple API with extension methods
- No external dependencies
- Works across all Flutter platforms
- Provides parent-relative scaling
Weaknesses
- Requires explicit initialization before use
- No breakpoint or adaptive layout support
- Only linear scaling for fonts
- No built‑in theming or advanced layout features
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
Call ScreenScaler.init(context) once (e.g., in the root widget). No permissions or build_runner needed.
import 'package:flutter_screen_scaler/flutter_screen_scaler.dart';
@override
Widget build(BuildContext context) {
ScreenScaler.init(context);
return Container(
height: 50.h,
width: 80.w,
child: Text('Scaled', style: TextStyle(fontSize: 16.sp)),
);
}Alternatives
Packages that do the same job and could replace flutter_screen_scaler.
- flutter_screenutil_plus
Adaptive screen and font scaling with CSS-like breakpoints and container-aware layouts.
74Compare - flutter_helper_utils
Flutter utilities for adaptive UI breakpoints, color parsing, typed lists, and context extensions.
72Compare - flexify
Responsive UI scaling from design dimensions and context-free navigation with page transitions.
68Compare - flutter_screenutil
A Flutter plugin for adapting screen and font size across different device models.
50Compare