Flutter Widget之Tooltip

Widget:https://flutter.io/docs/development/ui/widgets
Tooltip:https://docs.flutter.io/flutter/material/Tooltip-class.html

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import 'package:flutter/material.dart';

class TooltipDemoPage extends StatefulWidget {
@override
State<StatefulWidget> createState() => new _TooltipDemoPagePageState();
}

class _TooltipDemoPagePageState extends State<TooltipDemoPage> {
@override
void initState() {
super.initState();
}

Widget build(BuildContext context) {
return Scaffold(
appBar: new AppBar(
title: new Text('Tooltip Demo'),
),
body: Center(
child: Tooltip(
message: "点击删除",
child: Icon(
Icons.delete,
size: 50.0,
),
preferBelow: false,
),
),
);
}
}

Flutter Widget Tooltip

Powered by AppBlog.CN     浙ICP备14037229号

Copyright © 2012 - 2020 APP开发技术博客 All Rights Reserved.

访客数 : | 访问量 :