Commit 19b9464e authored by Adam Barth's avatar Adam Barth

Merge pull request #2231 from abarth/fab_tooltips

Add tooltips to FloatingActionButtons
parents 0f92316b 61611d47
......@@ -77,6 +77,7 @@ class _ButtonsDemoState extends State<ButtonsDemo> {
height: 128.0,
child: new Center(
child: new FloatingActionButton(
tooltip: 'Open FAB demos',
child: new Icon(icon: 'content/add'),
onPressed: () {
Navigator.push(context, new MaterialPageRoute(
......
......@@ -102,6 +102,7 @@ class _TabsFabDemoState extends State<TabsFabDemo> {
),
floatingActionButton: !selectedPage.fabDefined ? null : new FloatingActionButton(
key: selectedPage.fabKey,
tooltip: 'Show explanation',
backgroundColor: selectedPage.fabColor,
child: selectedPage.fabIcon,
onPressed: _showExplanatoryText
......
......@@ -329,6 +329,7 @@ class StockHomeState extends State<StockHome> {
Widget buildFloatingActionButton() {
return new FloatingActionButton(
tooltip: 'Create company',
child: new Icon(icon: 'content/add'),
backgroundColor: Colors.redAccent[200],
onPressed: _handleCreateCompany
......
......@@ -62,6 +62,7 @@ class PostDemoState extends State<PostDemo> {
)
),
floatingActionButton: new FloatingActionButton(
tooltip: 'Refresh',
child: new Icon(
icon: 'navigation/refresh'
),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment