macosui_tool_starter

Powered by Mason

一个用于创建macOS的Flutter启动工具的mason brick,该工具使用macos_ui

包含内容 ✨

该brick开箱即用地创建一个Flutter应用程序,该应用程序

  • ✅ 目标为macOS(可手动添加对其他平台的支持)
  • ✅ 基于最新版本的macos_ui构建UI
  • ✅ 使用SharedPreferences准备一个preferences_repository
  • ✅ 使用SharedPreferences准备一个提供最小AppStat的AppNotifier
  • ✅ 在ToolBar中提供一个ToolBarPullDownButton,其中包含两个菜单项
    • Choose Folder,它会打开一个FilePicker
    • Scan Directory,它会调用AppNotifier上的一个方法
  • ✅ 从pubspec.yaml读取当前版本,并在AppState中提供
  • ✅ 已预装以下包
    • macos_ui
    • flutter_hooks
    • hooks_riverpod
    • shared_preferences
    • 文件选择器
    • pubspec_parse

输出 ?

├── README.md
├── analysis_options.yaml
├── lib
│   ├── main.dart
│   ├── pages
│   │   ├── home_page.dart
│   │   ├── main_view.dart
│   │   └── settings_page.dart
│   └── providers
│       ├── app_notifier.dart
│       ├── preferences_repository.dart
│       ├── providers.dart
│       └── settings_notifier.dart
├── macos
├── pubspec.lock
├── pubspec.yaml
└── test
    └── widget_test.dart

鸣谢

如果您不需要或不想要Riverpod、preferences和file_picker,您也可以使用brick macosui_starter,这是此brick的起点。它包含的包较少,但支持多窗口,并有多种选项可配置窗口样式。

GitHub

查看 Github