Flutter 3.3特性-全局选择

图片[1]-Flutter 3.3特性-全局选择-趙哥博客-赵哥博客
图片[2]-Flutter 3.3特性-全局选择-趙哥博客-赵哥博客

使用 SelectionArea 包裹住路由显示的内容 (例如 Scaffold),Flutter 会替你处理好一切,你便可以享受到这项强力的新特性。

  Widget build(BuildContext context) {
    return SelectionArea(
      child: Scaffold(
        appBar: AppBar(
          title: Text(widget.title),
        ),
        body: Column(
          children: const <Widget>[
            Text(
              'You have pushed the button this many times:',
            ),
            Text(
              'You have pushed the button this many times:',
            ),
            Text(
              'You have pushed the button this many times:',
            ),
          ],
        ),
      ),
    );
  }
THE END
喜欢就支持一下吧
点赞15赞赏 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片

    暂无评论内容