Skip to content

Instantly share code, notes, and snippets.

@lamberger
Created November 10, 2019 10:41
Show Gist options
  • Select an option

  • Save lamberger/2732ff3b93ce5bb052cf89decba1c349 to your computer and use it in GitHub Desktop.

Select an option

Save lamberger/2732ff3b93ce5bb052cf89decba1c349 to your computer and use it in GitHub Desktop.
Floatingbutton
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text('Välkommen...')),
floatingActionButton: Padding(
padding: const EdgeInsets.all(16.0),
child: FloatingActionButton.extended(
onPressed: () {
// Add your onPressed code here!
Navigator.push(
context,
MaterialPageRoute(builder: (context) => Info()),
);
},
label: Padding(
padding: const EdgeInsets.all(8.0),
child: Text('Gå vidare'),
),
icon: Icon(Icons.thumb_up),
tooltip: 'Some tooltip...',
backgroundColor: Colors.red,
splashColor: Colors.blue,
),
),
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment