responsive library

Responsive is a flutter package that helps you to make your app responsive for all devices. It provides a set of tools to help you build responsive UIs for different screen sizes and orientations.

This package is inspired by the Sizer package, published by TechnoUrmish, Urmish Patel on pub.dev.

Sizer package (GitHub): https://github.com/TechnoUrmish/Sizer Sizer package (pub.dev): https://pub.dev/packages/sizer

This package is also inspired by the auto_size_text package, published by simc.dev on pub.dev.

auto_size_text package (GitHub): https://github.com/simc auto_size_text package (pub.dev): https://pub.dev/packages/auto_size_text

Shout out to them for the inspiration and the great work they have done! This package is built on top of their work and aims to provide an even more flexible and customizable solution for building responsive UIs in Flutter.

@author IFD @since 2024/07/12

Classes

AppSizeErrorWidget
AppSizeErrorWidget is a widget that displays an error message when the app size is not supported.
ResponsiveBuilder
A widget that helps you build responsive UIs for different screen sizes and orientations. It takes a builder function as a parameter and returns a widget you provide.
ResponsiveUtil
ResponseiveUtil class is the main utility class that provides methods to initialize the responsive package and update the screen size and orientation when the screen size changes.
Rext
A widget that will make text responsive Has the ability to group multiple Rext widgets using group parameter and calculate the biggest font size that will fit all of them.
RextGroup
A group of RextState widgets that share the same font size. This class is used to manage the font size of the RextState widgets. It is used to ensure that all RextState widgets in the group have the same font size.
RextState
The state of the Rext widget
RowColumn
A widget that allows you to build a row or column based on the screen size.
TextOverflowWidget
TextOverflowWidget is a widget that displays an icon when the text overflows the screen size.
WrapColumn
A widget that will build a Wrap or Column based on the screen size.

Enums

DeviceType
Enum to define the device type
ScreenType
Enum to define the screen type
SizeError
Enum to define the size error when the app screen size is not supported

Extensions

ResponsiveExt on num
Extension for responsive values

Typedefs

ResponsiveBuilderType = Widget Function(BuildContext context, BoxConstraints constraints, Orientation orientation, ScreenType screenType)
This is a functional widget that takes a builder function as a parameter and returns a widget. The builder function takes three parameters: context, orientation, and screenType. The context parameter is the build context of the widget. The orientation parameter is the orientation of the screen. The screenType parameter is the type of screen (mobile, tablet, desktop). The builder function returns a widget that is built based on the screen orientation and type.

Exceptions / Errors

ResponsiveException
A custom exception that is thrown when an error occurs in the Responsive package.