Filter by Widgets


How to show Tooltip in Flutter?

This Article is posted by seven.srikanth@gmail.com at 28-05-2019 19:33:29


In this article, I'm going to share the example code of how to show Tooltip in Flutter. In Flutter, a tooltip appears when the related widget is long pressed, as shown in the below image.



Here is the example code of how to show tooltip in flutter. All you need to do is, copy this code into main.dart file to try this example.

import 'package:flutter/material.dart';

void main() {
runApp(MyApp());
}


class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return
MaterialApp(
title: 'ToolTip App',
home: Scaffold(
appBar: AppBar(title: Text('Tooltip',)),
body: Center(
child: Container(
child: Tooltip(
message: 'FlutterLogo',
child: FlutterLogo(size: 100,)),
),
),
),
);
}
}


Hope this example is useful to you.

Thanks,
Srikanth
0 Comments
Login to comment.
Recent Comments

Be the first to Comment. You can ask a Query or Share your toughts or Just say thanks.




Recent articles

How to create a persistent bottom sheet in Flutter?

Check out this article on How to create a persistent bottom sheet in Flutter?

Read full post

How to draw a Decorative Horizontal line in Flutter?

Check out this article on How to draw a Decorative Horizontal line in Flutter?

Read full post

How to fetch an Image from Internet in Flutter

Check out this article on How to fetch an Image from Internet in Flutter

Read full post

ListView with Images from the Internet

Check out this article on ListView with Images from the Internet

Read full post

How to show Tooltip in Flutter?

Check out this article on How to show Tooltip in Flutter?

Read full post

How to create BottomNavigationBar in flutter?

Check out this article on How to create BottomNavigationBar in flutter?

Read full post

How to add actions to Appbar?

Check out this article on How to add actions to Appbar?

Read full post

How to open dart devtools in VS code?

Check out this article on How to open dart devtools in VS code?

Read full post

Accessibility features in flutter

Check out this article on Accessibility features in flutter

Read full post

How to create a Slider in Flutter?

Check out this article on How to create a Slider in Flutter?

Read full post

© 2018 - Fluttercentral | Email to me - Seven.srikanth@gmail.com

Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License , and code samples are licensed under the BSD License.