Flutter 3.3特性-全局选择

图片[1]-Flutter 3.3特性-全局选择-IT网络技术分享
图片[2]-Flutter 3.3特性-全局选择-IT网络技术分享

使用 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 分享