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> { ...@@ -77,6 +77,7 @@ class _ButtonsDemoState extends State<ButtonsDemo> {
height: 128.0, height: 128.0,
child: new Center( child: new Center(
child: new FloatingActionButton( child: new FloatingActionButton(
tooltip: 'Open FAB demos',
child: new Icon(icon: 'content/add'), child: new Icon(icon: 'content/add'),
onPressed: () { onPressed: () {
Navigator.push(context, new MaterialPageRoute( Navigator.push(context, new MaterialPageRoute(
......
...@@ -102,6 +102,7 @@ class _TabsFabDemoState extends State<TabsFabDemo> { ...@@ -102,6 +102,7 @@ class _TabsFabDemoState extends State<TabsFabDemo> {
), ),
floatingActionButton: !selectedPage.fabDefined ? null : new FloatingActionButton( floatingActionButton: !selectedPage.fabDefined ? null : new FloatingActionButton(
key: selectedPage.fabKey, key: selectedPage.fabKey,
tooltip: 'Show explanation',
backgroundColor: selectedPage.fabColor, backgroundColor: selectedPage.fabColor,
child: selectedPage.fabIcon, child: selectedPage.fabIcon,
onPressed: _showExplanatoryText onPressed: _showExplanatoryText
......
...@@ -329,6 +329,7 @@ class StockHomeState extends State<StockHome> { ...@@ -329,6 +329,7 @@ class StockHomeState extends State<StockHome> {
Widget buildFloatingActionButton() { Widget buildFloatingActionButton() {
return new FloatingActionButton( return new FloatingActionButton(
tooltip: 'Create company',
child: new Icon(icon: 'content/add'), child: new Icon(icon: 'content/add'),
backgroundColor: Colors.redAccent[200], backgroundColor: Colors.redAccent[200],
onPressed: _handleCreateCompany onPressed: _handleCreateCompany
......
...@@ -62,6 +62,7 @@ class PostDemoState extends State<PostDemo> { ...@@ -62,6 +62,7 @@ class PostDemoState extends State<PostDemo> {
) )
), ),
floatingActionButton: new FloatingActionButton( floatingActionButton: new FloatingActionButton(
tooltip: 'Refresh',
child: new Icon( child: new Icon(
icon: 'navigation/refresh' 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