Skip to content

Instantly share code, notes, and snippets.

@just1984
Created November 28, 2022 11:57
Show Gist options
  • Save just1984/736c275681f5ec657a046903e2dc46aa to your computer and use it in GitHub Desktop.
Save just1984/736c275681f5ec657a046903e2dc46aa to your computer and use it in GitHub Desktop.
complete flutter code
Widget build(BuildContext context) {
final ButtonStyle style = TextButton.styleFrom(
foregroundColor: Theme.of(context).colorScheme.onPrimary,
);
return Scaffold (
appBar: AppBar(
leading: Icon(Icons.favorite),
title: const Text('The Title'),
actions: <Widget>[
TextButton(
style: style,
onPressed: () {},
child: const Text('RED'),
),
TextButton(
style: style,
onPressed: () {},
child: const Text('GREEN'),
),
TextButton(
style: style,
onPressed: () {},
child: const Text('BLUE'),
),
],
),
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment