Flutter window_manager中拖拽窗口的组件 DragToMoveArea

Flutter 中使用window_manager 配置窗口的时候我们可以自定义窗口的顶部栏,自定义顶部栏后需要配置拖拽组件,这个时候我们就可以使用 DragToMoveArea

Flutter window_manager DragToMoveArea拖拽窗口组件

return Scaffold(
      appBar: AppBar(
        // Here we take the value from the MyHomePage object that was created by
        // the App.build method, and use it to set our appbar title.
        title: const DragToMoveArea(
            child: SizedBox(
          height: 40,
          width: double.infinity,
        )),
        actions: [if (Platform.isWindows == true) const WindowButtons()],
      )

更多关于Flutter window_manager中拖拽窗口的组件 DragToMoveArea的实战教程也可以访问 https://www.itying.com/category-92-b0.html

回到顶部