Implement App Icon selection

- added 2 additional app icons to choose from
- added translation string for settings screen
- smaller changes + formatting some touched files
This commit is contained in:
DJDoubleD
2025-06-11 20:03:47 +02:00
parent a6403ea638
commit 2bb8009bda
51 changed files with 982 additions and 226 deletions

View File

@@ -0,0 +1,25 @@
import 'package:flutter/services.dart';
import 'package:logging/logging.dart';
class AppIconChanger {
static const MethodChannel _channel = MethodChannel('change_icon');
static Future<void> changeIcon(LauncherIcon icon) async {
try {
await _channel.invokeMethod('changeIcon', {'iconName': icon.key});
} on PlatformException catch (e) {
Logger.root.severe('Failed to change icon: ${e.message}');
}
}
static List<LauncherIcon> get availableIcons => LauncherIcon.values;
}
enum LauncherIcon {
defaultIcon('DefaultIcon'),
catIcon('CatIcon'),
deezerIcon('DeezerBlueIcon');
final String key;
const LauncherIcon(this.key);
}