scrizer 1.3.4 copy "scrizer: ^1.3.4" to clipboard
scrizer: ^1.3.4 copied to clipboard

A lightweight and scalable UI toolkit for Flutter that provides responsive typography, spacing, and layout utilities based on screen size and orientation.

๐Ÿง  Scrizer #

Scrizer is a lightweight and scalable UI toolkit built for Flutter that provides responsive typography, spacing, and layout utilities based on screen size and orientation.

๐Ÿ“ One-time init. Global access to Scrizer.scale & Scrizer.typography.


๐Ÿ’ก Why Scrizer? #

Because scaling manually across devices is painful. Scrizer gives you:

  • ๐Ÿง  Smart, responsive typography
  • ๐Ÿงฑ Modular layout helpers
  • โš–๏ธ Consistency across all screen sizes

๐Ÿš€ Features #

  • ๐Ÿ“ Responsive scaling for width, height, gaps, icons, and padding
  • โœ๏ธ Typography with dynamic font scaling
  • โš’ Custom device type detection
  • ๐Ÿงฑ Reusable widgets for responsive text and layout spacing
  • ๐Ÿง  Centralized screen info through the Scrizer singleton

๐Ÿ“ฆ Installation #

dependencies:
  scrizer: <latest-version>

๐Ÿงฐ Usage #

1. Wrap Your App with ScrizerLayout #

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return ScrizerLayout(
      child: MaterialApp(
        title: 'Scrizer App',
        home: HomeScreen(),
      ),
    );
  }
}

2. Use ScrizerText for scalable text #

ScrizerText(
  'Hello World',
  fontSize: 16,
  style: TextStyle(fontWeight: FontWeight.bold),
)

Or use the typography styles:

Text(
  'Hello',
  style: Scrizer.typography.titleLarge,
)

3. Add spacing with ScrizerGap #

Column(
  children: [
    Text('Above'),
    ScrizerGap.v(16),
    Text('Below'),
  ],
)

4. Use responsive padding #

Container(
  padding: Scrizer.scale.paddingAll(12),
  child: ...
)

๐Ÿงพ Important Notes #

  • Scrizer.initialize(context) is automatically called in ScrizerLayout.

  • Always access typography and scaler via Scrizer.typography and Scrizer.scale, not directly via their classes.

  • Scrizer.fontSize(size) is a shortcut for Scrizer.typography.scale(size).

๐Ÿ”ค Typography API #

Scrizer provides a consistent set of text styles that scale with screen size.

Style Name Usage Example
displayLarge Hero titles
displayMedium Big headers
headlineMedium Page titles
titleMedium Section titles
bodyLarge Main content text
bodySmall Secondary info or meta
caption Hints, footnotes
link Tappable links (underline + color)

๐Ÿ“ Scale API #

Scrizer.scale.width(100);       // scales width responsively
Scrizer.scale.height(50);       // scales height responsively
Scrizer.scale.radius(12);       // responsive border radius
Scrizer.scale.paddingAll(16);   // uniform padding
Scrizer.scale.icon(24);         // icon size that scales

๐Ÿ‘€ Example #

Padding(
  padding: Scrizer.scale.paddingSymmetric(h: 12, v: 8),
  child: Column(
    crossAxisAlignment: CrossAxisAlignment.start,
    children: [
      ScrizerText('Title', style: Scrizer.typography.titleMedium),
      ScrizerGap.v(12),
      ScrizerText('Body text here', fontSize: 14),
    ],
  ),
)

๐Ÿ› ๏ธ Roadmap #

  • โœ… Typography system
  • โœ… Layout wrappers
  • โŒ Support for text direction (RTL)
  • โŒ Theme integration
  • โŒ Custom breakpoints

๐Ÿง‘โ€๐Ÿ’ป Author #

Made with โค๏ธ by @Mbouziani

๐Ÿ“„ License #

MIT License

1
likes
160
points
50
downloads

Publisher

unverified uploader

Weekly Downloads

A lightweight and scalable UI toolkit for Flutter that provides responsive typography, spacing, and layout utilities based on screen size and orientation.

Repository (GitHub)

Documentation

Documentation
API reference

License

MIT (license)

Dependencies

dartz, equatable, flutter, plugin_platform_interface

More

Packages that depend on scrizer