size_builder 0.0.4
size_builder: ^0.0.4 copied to clipboard
Make a proportion and proportion to the length, width, and diameter of the screens of all kinds to get a responsive design.
size_builder:0.0.4
Features #
Make a proportion and proportion to the length, width, and diameter of the screens of all kinds to get a responsive design.
Getting started #
size_builder: 0.0.3
or
flutter pub add size_builder
How to use #
At first, you should to add in first screen class
for Web
WebAppSize().init(context);
for Mobile
MobileAppSize().init(context);
Example #
for Mobile
class HomeLayout extends StatelessWidget {
const HomeLayout({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
MobileAppSize().init(context);
return Scaffold();
}
}
for Web
class HomeLayout extends StatelessWidget {
const HomeLayout({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
WebAppSize().init(context);
return Scaffold();
}
}
you can use it for many things; like:
Container Size #
Container(
height : MobileAppSize.MobileHeight_200,
width : MobileAppSize.MobileWidth_390,
),
Or #
Container(
height : WebAppSize.WebHeight_200,
width : WebAppSize.WebWidth_390,
),
You can add it for font size
Container(
height : WebAppSize.WebHeight_200,
width : WebAppSize.WebWidth_390,
child :Text('hello flutter',
style: TextStyle(
fontSize: MobileSize.MobileSize_20,
),
)
),