Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<p align="center"><img src="./assets/img/icon/icon.png" width="20%" /><img src="./assets/img/logo/flutter.png" width="25%" /></p>
<p align="center"><img src="./assets/img/icon/logo_rounded.png" width="20%" /><img src="./assets/img/logo/flutter.png" width="25%" /></p>

# Flutter Minecraft Launcher

一个由Flutter编写的Material Design 3风格的使用GPL3.0协议开源跨平台Vanilla/Fabric/NeoForge Minecraft Java启动器,支持Windows、macOS、Linux

***需要更多Windows ARM64、macOS x86、 Linux的反馈!***

# shared_preferences
# Shared Preferences
软件配置
| 键 | 值 | 类型 |
| -- | -- |-- |
Expand Down Expand Up @@ -63,4 +63,4 @@
| 3 | 游戏高度 |
| 4 | 模组加载器 |

###### flutter logo : [Sawaratsuki](https://github.com/SAWARATSUKI)
###### Flutter logo : [Sawaratsuki](https://github.com/SAWARATSUKI)
Binary file removed assets/img/icon/Windows.png
Binary file not shown.
Binary file added assets/img/icon/default.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/img/icon/default_rounded.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/img/icon/default_transparent.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/img/icon/error.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/img/icon/error_rounded.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/img/icon/error_transparent.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/img/icon/icon.png
Binary file not shown.
Binary file added assets/img/icon/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/img/icon/logo_rounded.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/img/icon/logo_transparent.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/img/icon/macOS.png
Binary file not shown.
8 changes: 4 additions & 4 deletions flutter_launcher_icons.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# flutter pub run flutter_launcher_icons
#
# 更改后请运行 flutter pub run flutter_launcher_icons
#
flutter_launcher_icons:
image_path: "assets/img/icon/icon.png"
image_path: "assets/img/icon/default_rounded.png"
windows:
generate: true
image_path: "assets/img/icon/Windows.png"
icon_size: 48

macos:
generate: true
image_path: "assets/img/icon/macOS.png"
6 changes: 6 additions & 0 deletions lib/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
* text=auto

# Ignore Flutter's auto-generated native platform host folders
windows/** linguist-generated
linux/** linguist-generated
macos/** linguist-generated
17 changes: 17 additions & 0 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,28 @@ import 'package:fml/pages/home.dart';
import 'package:fml/pages/online.dart';
import 'package:fml/pages/online/owner.dart';
import 'package:fml/pages/setting.dart';
import 'package:window_manager/window_manager.dart';

void main() async {
WidgetsFlutterBinding.ensureInitialized();

await windowManager.ensureInitialized();

await initVersionInfo();

// 设置窗口标题
// e.g. Flutter Minecraft Launcher v1.8.0 (11)
// Windows下窗口标题的+疑似有渲染问题(后面会有空隙),故用了括号包裹buildNumber
WindowOptions windowOptions = WindowOptions(
center: true,
title: "$kAppName v$gAppVersion ($gAppBuildNumber)",
);

windowManager.waitUntilReadyToShow(windowOptions, () async {
await windowManager.show();
await windowManager.focus();
});

await initLogs();

runApp(const FMLBaseApp());
Expand Down
11 changes: 3 additions & 8 deletions lib/pages/setting/about.dart
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class AboutPageState extends State<AboutPage> {
children: [
Flexible(
child: Image.asset(
'assets/img/icon/icon.png',
'assets/img/icon/logo_transparent.png',
height: 150,
),
),
Expand Down Expand Up @@ -145,10 +145,7 @@ class AboutPageState extends State<AboutPage> {
margin: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
child: Column(
children: [
const ListTile(
title: Text('鸣谢'),
subtitle: Text('排名不分先后顺序'),
),
const ListTile(title: Text('鸣谢'), subtitle: Text('排名不分先后顺序')),
ListTile(
title: const Text('bangbang93'),
subtitle: const Text(
Expand Down Expand Up @@ -247,9 +244,7 @@ class AboutPageState extends State<AboutPage> {
),
ListTile(
title: const Text('futurw4v'),
subtitle: const Text(
'贡献者\nhttps://github.com/futurw4v',
),
subtitle: const Text('贡献者\nhttps://github.com/futurw4v'),
trailing: const Icon(Icons.open_in_new),
onTap: () => _launchURL('https://github.com/futurw4v'),
),
Expand Down
8 changes: 8 additions & 0 deletions linux/flutter/generated_plugin_registrant.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@

#include <desktop_drop/desktop_drop_plugin.h>
#include <file_selector_linux/file_selector_plugin.h>
#include <screen_retriever_linux/screen_retriever_linux_plugin.h>
#include <url_launcher_linux/url_launcher_plugin.h>
#include <window_manager/window_manager_plugin.h>

void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr(FlPluginRegistrar) desktop_drop_registrar =
Expand All @@ -17,7 +19,13 @@ void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr(FlPluginRegistrar) file_selector_linux_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "FileSelectorPlugin");
file_selector_plugin_register_with_registrar(file_selector_linux_registrar);
g_autoptr(FlPluginRegistrar) screen_retriever_linux_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "ScreenRetrieverLinuxPlugin");
screen_retriever_linux_plugin_register_with_registrar(screen_retriever_linux_registrar);
g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin");
url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar);
g_autoptr(FlPluginRegistrar) window_manager_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "WindowManagerPlugin");
window_manager_plugin_register_with_registrar(window_manager_registrar);
}
2 changes: 2 additions & 0 deletions linux/flutter/generated_plugins.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
list(APPEND FLUTTER_PLUGIN_LIST
desktop_drop
file_selector_linux
screen_retriever_linux
url_launcher_linux
window_manager
)

list(APPEND FLUTTER_FFI_PLUGIN_LIST
Expand Down
4 changes: 4 additions & 0 deletions macos/Flutter/GeneratedPluginRegistrant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ import file_picker
import file_selector_macos
import flutter_local_notifications
import package_info_plus
import screen_retriever_macos
import share_plus
import shared_preferences_foundation
import url_launcher_macos
import window_manager

func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
DesktopDropPlugin.register(with: registry.registrar(forPlugin: "DesktopDropPlugin"))
Expand All @@ -22,7 +24,9 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin"))
FlutterLocalNotificationsPlugin.register(with: registry.registrar(forPlugin: "FlutterLocalNotificationsPlugin"))
FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin"))
ScreenRetrieverMacosPlugin.register(with: registry.registrar(forPlugin: "ScreenRetrieverMacosPlugin"))
SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin"))
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
WindowManagerPlugin.register(with: registry.registrar(forPlugin: "WindowManagerPlugin"))
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading