Last updated:
0 purchases
km screen
km_screen #
This package is a wrap of Media Query
Usage #
KMScreen is set up by MaterialApp or WdigetApp in ancestor Context.
Refer to various properties at any place.
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
title: 'My App',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: BottomNavigationWidget(),
);
}
}
class BottomNavigationWidget extends StatelessWidget {
final List<Widget> _tabItem = [
HomeWidget(),
SettingWidget(),
];
@override
Widget build(BuildContext context) {
// KMScreen setup
KMScreen.setup(context: context);
print("width: ${KMScreen.size.width}, height: ${KMScreen.size.height}");
return _mainWidget();
}
}
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.