How to show Tooltip in Flutter?

This Article is posted by seven.srikanth 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

Tags: tooltip



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 deploy flutter web site on GitHub using peanut

Posted by nikhilchaudhary12155 on 13 Oct 2019 Article


AnimatedPositioned Widget Example in Flutter

Posted by seven.srikanth on 10 Oct 2019 Article


Flutter Open-Source and directory lists

Posted by nishantkotatech on 09 Oct 2019 Article


Flutter Travelling Couple Leading Page - Flutter Web Series 3

Posted by nikhilchaudhary12155 on 05 Oct 2019 Article



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