Advertisement
fahimkamal63

ToolTipClass

Nov 17th, 2021
1,074
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 0.83 KB | None | 0 0
  1. import 'package:flutter/material.dart';
  2.  
  3. class TooltioClass extends StatefulWidget {
  4.   const TooltioClass({Key? key}) : super(key: key);
  5.  
  6.   @override
  7.   _TooltioClassState createState() => _TooltioClassState();
  8. }
  9.  
  10. class _TooltioClassState extends State<TooltioClass> {
  11.   @override
  12.   Widget build(BuildContext context) {
  13.     return Scaffold(
  14.       appBar: AppBar(
  15.         title: Text("ToolTip"), centerTitle: true,
  16.       ),
  17.       body: Center(
  18.         child: Container(
  19.           padding: EdgeInsets.all(10),
  20.           color: Colors.red,
  21.           child: Tooltip(
  22.               message: "Hi! it's a tooltip",
  23.             showDuration: Duration(milliseconds: 400),
  24.             waitDuration: Duration(milliseconds: 400),
  25.             child: Icon(Icons.account_box, size: 100,),
  26.           ),
  27.         ),
  28.       ),
  29.     );
  30.   }
  31. }
  32.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement