adaptic

Creator: coderz1093

Last updated:

0 purchases

adaptic Image
adaptic Images

Languages

Categories

Add to Cart

Description:

adaptic

Adaptive #
This package provides set of widgets and functions which makes it easy and fast to write platform and screen adaptive code. By using this package you can avoid using if statements and MediaQuery for different platform and screen sizes.
Features #

Developer can define thier own breakpoints in AdaptiveData widget.
Generic functions to return values based on breakpoints or platform.

Getting started #

Simply install and import the package and start using.
All functions require AdaptiveData widget above the tree.

Usage #
Add AdaptiveData anywhere above the tree.

Widget build(BuildContext context){
return AdaptiveData(
smallScreenBreakpoint: 480,
mediumScreenBreakpoint: 768,
largeScreenBreakpoint: 1024,
child: Scaffold(
body: Container()
),
);
}

copied to clipboard
Use functions anywhere below the AdaptiveData.

AdaptiveIfScreen<Widget>(
context: context,
ifNotSpecified: listView(), // if screen size is less than medium or small breakpoint then use this as
ifLarge: Row(
children: [
Expanded(flex: 50, child: listView()),
Expanded(flex: 50, child: SampleItemDetailsView())
],
))),
);

copied to clipboard

Center(
child: Padding(
padding: AdaptiveIfScreen(
context: context,
ifNotSpecified: EdgeInsets.all(10),
ifLarge: EdgeInsets.all(20),
ifMedium: EdgeInsets.all(15),
ifSmall: EdgeInsets.all(10)),
child: Text('More Information Here'),
),
),

copied to clipboard
Functions #

AdaptiveIfScreen<T> : To return screen size specific values.
AdaptiveIfPlatform<T> : To return platform specifice values.
AdaptiveIf<T> : Combination of AdaptiveIfScreen and AdaptiveIfPlatform.
AdaptivePlatformVoidCallback : Returns platform specific voidCallback ( for example to provide deifferent onTap callback).
AdaptiveScreenVoidCallback : Returnns screen size specifc voidCallback.

Additional information #
To raise issues , suggestions and ideas: https://github.com/suryaa62/adaptive

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.