Skip to content

Instantly share code, notes, and snippets.

@vijayinyoutube
Created August 22, 2022 19:16
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 vijayinyoutube/4af9112c137a2aa27fb48cdc7958893b to your computer and use it in GitHub Desktop.
Save vijayinyoutube/4af9112c137a2aa27fb48cdc7958893b to your computer and use it in GitHub Desktop.
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text(widget.title)),
body: Container(),
floatingActionButtonLocation: ExpandableFloatLocation(),
floatingActionButton: ExpandableDraggableFab(
childrenBoxDecoration: const BoxDecoration(color: Colors.transparent),
childrenCount: 4,
distance: 10,
childrenType: ChildrenType.rowChildren,
childrenAlignment: Alignment.center,
children: [
FloatingActionButton(
heroTag: "addBtn",
onPressed: () => Navigator.of(context).pushNamed('/add'),
child: const Icon(Icons.add)),
FloatingActionButton(
heroTag: "cameraBtn",
onPressed: () => Navigator.of(context).pushNamed('/camera'),
child: const Icon(Icons.camera)),
FloatingActionButton(
heroTag: "paymentBtn",
onPressed: () => Navigator.of(context).pushNamed('/payment'),
child: const Icon(Icons.payment)),
FloatingActionButton(
heroTag: "deleteBtn",
onPressed: () => Navigator.of(context).pushNamed('/delete'),
backgroundColor: Colors.red,
child: const Icon(Icons.delete_sharp),
),
],
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment