Flutter Widget之Tooltip

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

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

版权声明:
作者:Joe.Ye
链接:https://www.appblog.cn/index.php/2023/03/16/flutter-widget-tooltip/
来源:APP全栈技术分享
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
打赏
海报
Flutter Widget之Tooltip
Widget:https://flutter.io/docs/development/ui/widgets Tooltip:https://docs.flutter.io/flutter/material/Tooltip-class.html       import 'pac……
<<上一篇
下一篇>>
文章目录
关闭
目 录