Skip to content

Instantly share code, notes, and snippets.

@MarcinusX
Created May 27, 2019 04:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MarcinusX/bd78f2b2b428f7feb6d54e6bfb73829f to your computer and use it in GitHub Desktop.
Save MarcinusX/bd78f2b2b428f7feb6d54e6bfb73829f to your computer and use it in GitHub Desktop.
class _ExhibitionBottomSheetState extends State<ExhibitionBottomSheet>
with SingleTickerProviderStateMixin {
...
@override
Widget build(BuildContext context) {
return ...
child: Container(
padding: const EdgeInsets.symmetric(horizontal: 32),
decoration: const BoxDecoration(
color: Color(0xFF162A49),
borderRadius: BorderRadius.vertical(top: Radius.circular(32)),
),
child: Stack( //<-- Add a stack
children: <Widget>[
MenuButton(), //<-- With a menu button
],
),
),
...
}
}
class MenuButton extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Positioned( //<-- Align the icon to bottom right corner
right: 0,
bottom: 24,
child: Icon(
Icons.menu,
color: Colors.white,
size: 28,
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment