responsive_mobile 0.0.3
responsive_mobile: ^0.0.3 copied to clipboard
Make responsibles apps
TODO: A package that helps you a make a responsive app, get the devices sizes by inches.
Features #
ScreenSize.getHeight(context) - gets the device height
ScreenSize.getWidth(context) - gets the device width
isSmallScreen4Inches(context) - return true if the device is lower than 4 inches
isSmallScreen5Inches(context) - return true if the device is lower than 5 inches
isLarge6Inches(context) - return true if the device is lower6 inches
isLarge6Halfnches()(context) - return true if the device is lower than 6.5 inches
getAllDevicesInchesWidth() - return the width double value for all inchs options, just pass how much % you need for each inch
getAllDevicesInchesHeight() - return the height double value for all inchs options, just pass how much % you need for each inch
Getting started #
Install the package on your pubspec.yaml, after that just call the ScreenSize class and call the static method that it is better for you
Usage #
EXAMPLES -
HALF DEVICE FOR A CONTAINER:
Container( width: ScreenSize.getWidth(context) * 0.2, height: ScreenSize.getHeight )
CHANGE THE SIZE OF SOMETHING WITH THE PACKAGE:
TextStyleParams( text: 'exemple', fontSize: ScreenSize.isSmallScreen4Inches(context) ? 8 : 12, fontWeight: FontWeight.normal)
MAKE A RESPONSIVE WIDGET FOR ALL DEVICES:
Padding( padding: EdgeInsets.only( bottom: ScreenSize.getHeight(context) * 0.04, right: ScreenSize.getAllDevicesInchesWidth(context, 0.16, 0.15, 0.13, 00.85, 0.080)), child: const Icon( Icons.add, color: Colors.blue, ), );