any_screen library

Classes

AnyScreenConfig
AnyScreenDefaultConfig
Responsive
Responsive widget that builds itself based on the parent widget's size. This widget is based on the width of the parent widget. If the parent widget changes size, this widget will rebuild itself to adapt to the new size. This widget is useful for creating responsive UIs that change their layout or appearance based on the available screen size. For example, you might create different layouts for large screens, small screens, and landscape orientation. builder will act as xs also builder is the required parameter. if you don't provider other parameters, builder will be rendered on all screen sizes. The order of the parameters is builder, sm, md, lg, xl. if you provide builder and md, builder willeb rendered for sm and builder screen sizes and md will be rendered for md, lg, and xl screen sizes. you can change the default screen sizes by setting AnyScreenDefaultConfig or passing AnyScreenConfig.
ResponsiveBuilder
Responsive widget that builds itself based on the parent widget's size. This widget is based on the width of the parent widget. If the parent widget changes size, this widget will rebuild itself to adapt to the new size. This widget is useful for creating responsive UIs that change their layout or appearance builder is the builder function that will be called when the screen size changes. builder is a callback function that takes BuildContext, ScreenType, and ResponsiveWidgetSize as parameters. ScreenType is the type of the screen based on the width of the parent widget. ResponsiveWidgetSize is a class that contains the width and height of the parent widget. It has a few useful methods like pWidth,pHeight. config is the configuration of the screen sizes. You can change the default screen sizes by setting AnyScreenDefaultConfig or passing AnyScreenConfig
ResponsiveGrid
A Widget like GridView with responsive support xs is the crossAxisCount for xs screen size sm is the crossAxisCount for sm screen size md is the crossAxisCount for md screen size lg is the crossAxisCount for lg screen size xl is the crossAxisCount for xl screen size childrenBuilder is the function which returns the list of widgets to be shown in the GridView itemCount is the itemCount for GridView.builder mainAxisSpacing is the mainAxisSpacing for GridView.builder crossAxisSpacing is the crossAxisSpacing for GridView.builder itemHeight is the itemHeight for GridView.builder all other properties are same as GridView.builder
ResponsiveToggle
Responsive widget that builds itself based on the parent widget's size. This widget is based on the width of the parent widget. If the parent widget changes size, this widget will rebuild itself to adapt to the new size. This widget is useful for creating responsive UIs that needs to hide or show widgets based on the available screen size. can pass showOnly to show the widget only on the specified screen sizes or pass showAfter to show the widget after the specified screen size. if you provide showOnly and showAfter, showOnly will be ignored.
ResponsiveWidgetSize
Class that holds the responsive width and height of the parent widget. It has a few useful methods like pW,pH. pW returns the width of the parent widget based on the percentage you provide. pH returns the height of the parent widget based on the percentage you provide.
ResponsiveWrap
A Widget like wrap with responsive support items is a list of ResponsiveWrapChild colCount is the number of columns in the wrap. If you give 12, then the children will be split into 12 parts.
ResponsiveWrapChild
A child of ResponsiveWrap xs is the share of the child in the wrap when the screen size is extra small if you give 6, then the child will take 6/colCount of the wrap width/height. can give sm, md, lg, xl to specify the share of the child in the wrap when the screen size is small, medium, large, extra large respectively.

Enums

ScreenType
ScreenType enum

Extensions

AnyScreenIntExtension on int
Extension on double to provide useful methods like pW,pH,vW,vH.
AnyScreenWidgetExtension on Widget
ScreenTypeExtension on ScreenType
ScreenType extension