flutter_super_scaffold 0.0.4
flutter_super_scaffold: ^0.0.4 copied to clipboard
Scaffold widget that will handle status bar and navigation bar in both Android & Ios.
Features #
![]() |
Getting started #
Usage #
class PageOne extends StatelessWidget {
const SsTestPage({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return FlutterSuperScaffold(
topColor: Colors.yellowAccent,
isBotSafe: false,
body: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
const Text('Page 1'),
ElevatedButton(onPressed: () {
Navigator.of(context).push(MaterialPageRoute(builder: (context) => const PageTwo(),));
}, child: const Text('To Page 2')),
],
)
);
}
}
class PageTwo extends StatelessWidget {
const PageTwo({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return FlutterSuperScaffold(
topColor: Colors.black,
botColor: Colors.black,
isBotSafe: true,
body: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
const Text('Page 2'),
ElevatedButton(onPressed: () {
Navigator.of(context).push(MaterialPageRoute(builder: (context) => const PageThree(),));
}, child: const Text('To Page 3')),
ElevatedButton(onPressed: () {
Navigator.of(context).pop();
}, child: const Text('Back')),
],
),
);
}
}
class PageThree extends StatelessWidget {
const PageThree({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return FlutterSuperScaffold(
botColor: Colors.green,
isTopSafe: false,
body: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
const Text('Page 3'),
ElevatedButton(onPressed: () {
Navigator.of(context).pop();
}, child: const Text('Back')),
],
),
);
}
}
Additional information #
<