How to show Tooltip in Flutter?

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

Click here to support us by Subscribing to our youtube channel.


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


Click here to support us by Subscribing to our youtube channel.




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.




Wave animation in Flutter




Search Results





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