Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors the Download Pages with a new Material Design 3 (MD3) UI structure. It introduces data models to improve code organization, adds time formatting via the intl package, and restructures download-related pages with better navigation patterns using NavigationDrawer instead of TabBar.
Changes:
- Adds
MinecraftVersionandNavigationDrawerItemmodels for better data management and UI component abstraction - Introduces
kDefaultPaddingconstant andintlpackage for standardized spacing and date formatting - Refactors download pages with NavigationDrawer-based navigation and FutureBuilder pattern for better async handling
- Renames page files (home.dart → home_page.dart, etc.) for consistency and removes unused test.dart
Reviewed changes
Copilot reviewed 10 out of 14 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| pubspec.yaml | Adds intl dependency (^0.20.2) for date/time formatting |
| pubspec.lock | Updates transitive dependencies (characters, matcher, material_color_utilities, test_api) and adds intl |
| lib/pages/test.dart | Removes unused test page (NewPage class) |
| lib/pages/setting_page.dart | Renames from setting.dart with Card-based settings layout |
| lib/pages/online_page.dart | Renames from online.dart with same EasyTier functionality |
| lib/pages/model/navigation_drawer_item.dart | Adds model for NavigationDrawer items with page and destination |
| lib/pages/home_page.dart | Renames from home.dart with Card-based game info display |
| lib/pages/download_page.dart | Refactored from download.dart, replaces TabBar with NavigationDrawer and IndexedStack |
| lib/pages/download/download_version/download_game.dart | Major refactor: uses MinecraftVersion model, improved layout with consistent padding, switch statement for loader selection |
| lib/pages/download/download_version.dart | Major refactor: FutureBuilder for async loading, CustomScrollView with SliverAppBar, SegmentedButton for version type filtering, improved error handling |
| lib/model/minecraft_version.dart | New model representing Minecraft version data from API with VersionType enum and parsing utilities |
| lib/main.dart | Updates imports to reflect renamed page files |
| lib/constants.dart | Adds kDefaultPadding constant (16.0) for consistent UI spacing |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
关于字体这个,我有计划移除思源雅黑以缩小app体积,但是flutter的Windows平台的中文字体有问题,准备解决完就用默认字重字体了,不过我主要开发是在mac上进行的,也一直没去搞 (´・ω・`) 还有也祝你新年快乐喵(゚∀゚) |
我的想法是Windows平台上指定用系统自带的微软雅黑,其它平台不做特别处理直接使用系统默认字体。我印象里面Windows上的flutter是因为字体回退问题导致看起来奇怪,所以Windows平台上指定微软雅黑应该能解决。软件直接调用系统字体,不打包进app应该没有侵权风险。。。大概吧 |
但是微软雅黑不符合MaterialDesign吧,侵权应该就不会毕竟是开源不商用 |
|
我觉得NavigationDrawer这个问题应该要限制最小窗口大小了,比如PCL都是限制拉不动的 不可能给用户这样随便拉,就算手动指定了大小 你拉到最小还是会因为ListTile的问题崩溃 |
|
对了还要加个根据DPI缩放窗口大小,要不然高DPI设备一打开糊一脸 |
确实应该限制窗口大小,不过目前这个NavigationDrawer也确实过大了。还有一点就是macos上app一打开的默认窗口宽度比windows小很多,接近正方形的窗口,目前的NavigationDrawer会导致内容完全不可读 |
这点主要是不想在app内置字体,整个app一半的大小都是被字体文件占据了 |
|
我现在改成600x600最小了 DPI缩放等下个PR,我现在还发现现在的Page存不住状态 ,明天再修吧 |
这个简单,我记得可以打开应用时获取一次,然后以后就不用获取了 |
https://pub.dev/packages/google_fonts 可以看这个库,运行时HTTP获取然后会缓存 |
字体这个先不急吧,个人认为优先级不是很高(´・ω・`) |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 14 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
_versionList.contains(_versionFolderName)这个判断条件好像不能判断文件夹是否存在,以及我现在才知道约定式提交type后面可以加scope. _ / |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 14 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 14 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| final selectedPath = prefs.getString('SelectedPath') ?? ''; | ||
| final gameList = prefs.getStringList('Game_$selectedPath') ?? []; | ||
| setState(() { | ||
| _versionList = gameList; |
There was a problem hiding this comment.
After _versionList is loaded, the current form validity isn’t recomputed. If the default folder name already exists, _isFormValid can remain true (because initial validation ran before _versionList was populated), allowing navigation with a duplicate name. Re-run validation and update _isFormValid after _versionList is set.
| _versionList = gameList; | |
| _versionList = gameList; | |
| // After loading the version list, recompute form validity so that | |
| // a default folder name that already exists is not treated as valid. | |
| if (gameList.contains(widget.version.id)) { | |
| _isFormValid = false; | |
| } |
| setState(() { | ||
| _fabricVersionList = versions; | ||
| _fabricJson = loaderData; | ||
| }); |
There was a problem hiding this comment.
setState() is called after an await in _loadFabricList() without a mounted check. Add if (!mounted) return; before setState() to avoid exceptions if the page is disposed while the network request is in flight.
| setState(() { | ||
| _neoForgeStableVersions = stableVersions; | ||
| _neoforgeBetaVersions = betaVersions; | ||
| }); |
There was a problem hiding this comment.
setState() is called after an await in _loadNeoForgeList() without a mounted check. Add if (!mounted) return; before setState() to avoid exceptions if the page is disposed while the network request is in flight.
| library; | ||
|
|
There was a problem hiding this comment.
The library; directive here is unnecessary (and can trigger the unnecessary_library_directive lint under flutter_lints). Consider removing it, or give the library a proper name if you intentionally want a named library.
| library; |




还有现在的UI看起来比较割裂,后续会梳理统一

以及我觉得这个字体字重看起来有点问题
可以的话我到时候改一下
如:
这个是我之前的,字重看起来更合理

代码写的有点乱(
原本的文件与文件夹的位置有点不合理,比如Model都是分开放的
还有很多画的大饼没写(
这几天会整完:
后续会提PR
想不到有啥写的了,脑子有点乱
新年快乐 o( ̄▽ ̄)o