flutter_size_matters 1.0.8 copy "flutter_size_matters: ^1.0.8" to clipboard
flutter_size_matters: ^1.0.8 copied to clipboard

Responsive Design Mastery for Flutter: Media Query and Scaling Configuration

Responsive Design Mastery for Flutter: Media Query and Scaling Configuration #

Discover the ultimate solution for Flutter app development with our streamlined and dependency-free toolkit. Seamlessly resize your app's UI with precision, ensuring optimal performance on a myriad of devices. Our comprehensive media query and scaling configuration empower you to effortlessly create a consistent and seamless user experience across diverse screen sizes. Elevate your Flutter applications to the next level with this indispensable tool for responsive design.

Screenshots #

  • Left one without this package
  • Right one with this package

Web

Image 1 Image 2

Mobile

Image 3 Image 4

iPad

Image 5 Image 6

Usage #

import 'package:flutter/material.dart';
import 'package:flutter_size_matters/flutter_size_matters.dart';

void main() {
  runApp(const MainApp());
}

class MainApp extends StatelessWidget {
  const MainApp({super.key});

  @override
  Widget build(BuildContext context) {
    ScallingConfig().init(context);
    return const MaterialApp(
      home: Scaffold(
        body: Center(
          child: Text('Hello World!',style: TextStyle(fontSize: ScallingConfig.moderateScale(14)),),
        ),
      ),
    );
  }
}

Others Functions #

Function Type Description
scale func Method for scaling a given size based on the shorter dimension of the screen and the guidelineBaseWidth
verticalScale func Method for scaling a given size based on the longer dimension of the screen and the guidelineBaseHeight
moderateScale func Method that applies a moderate scaling factor to a given size, considering both width and height
moderateScaleVertical func Method that applies a moderate scaling factor to a given size, considering only the height.

Additional information #

This package will support Windows, macOS, Linux, Android, iOS, and all modern browsers.

7
likes
160
points
42
downloads

Publisher

verified publisheri-cultiver.com

Weekly Downloads

Responsive Design Mastery for Flutter: Media Query and Scaling Configuration

Repository (GitHub)
View/report issues

Topics

#flutter #dart #scalling #responsive #mediaquery

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on flutter_size_matters