Fixing formatting

This commit is contained in:
naeem 2025-09-28 20:56:37 +01:00
parent 7a903d39c0
commit 9731a1a60f
6 changed files with 18 additions and 41 deletions

View file

@ -2,14 +2,7 @@ import 'dart:convert';
const _defaultRotationMinutes = 30;
enum RotationMode {
lockUnlock,
minutes,
hours,
daily,
}
enum RotationMode { lockUnlock, minutes, hours, daily }
extension RotationModeExtension on RotationMode {
String get label {
@ -39,8 +32,6 @@ extension RotationModeExtension on RotationMode {
}
}
class LiveWallpaperPreferences {
const LiveWallpaperPreferences({
required this.enabled,
@ -148,6 +139,4 @@ class LiveWallpaperPreferences {
return RotationMode.minutes;
}
}
}

View file

@ -86,8 +86,6 @@ class LiveWallpaperSetupPage extends HookConsumerWidget {
}
}
return Scaffold(
appBar: AppBar(title: Text('live_wallpaper_setup_title'.tr())),
body: Padding(
@ -132,7 +130,6 @@ class LiveWallpaperSetupPage extends HookConsumerWidget {
onPressed: onSetWallpaper,
),
),
],
),
),
@ -250,5 +247,3 @@ class _RotationControl extends StatelessWidget {
);
}
}

View file

@ -15,15 +15,14 @@ final liveWallpaperAssetServiceProvider = Provider<LiveWallpaperAssetService>((r
return LiveWallpaperAssetService(ref.watch(assetApiRepositoryProvider));
});
final liveWallpaperPreferencesProvider = StateNotifierProvider<LiveWallpaperPreferencesNotifier, LiveWallpaperPreferences>
((ref) {
final liveWallpaperPreferencesProvider =
StateNotifierProvider<LiveWallpaperPreferencesNotifier, LiveWallpaperPreferences>((ref) {
final service = ref.watch(liveWallpaperPreferencesServiceProvider);
return LiveWallpaperPreferencesNotifier(service);
});
});
class LiveWallpaperPreferencesNotifier extends StateNotifier<LiveWallpaperPreferences> {
LiveWallpaperPreferencesNotifier(this._service)
: super(_service.load()) {
LiveWallpaperPreferencesNotifier(this._service) : super(_service.load()) {
_subscription = _service.watch().listen((event) {
if (mounted) {
state = event;

View file

@ -42,9 +42,7 @@ class LiveWallpaperSetting extends HookConsumerWidget {
margin: const EdgeInsets.symmetric(horizontal: 12, vertical: 4),
child: ListTile(
title: Text('live_wallpaper_setting_manage'.tr()),
subtitle: statusText == null
? null
: Text(statusText, style: Theme.of(context).textTheme.bodySmall),
subtitle: statusText == null ? null : Text(statusText, style: Theme.of(context).textTheme.bodySmall),
trailing: const Icon(Icons.chevron_right),
onTap: () => context.pushRoute(const LiveWallpaperSetupRoute()),
),

View file

@ -30,11 +30,7 @@ class WallpaperStatusMessage {
final bool isActive;
final String? lastError;
const WallpaperStatusMessage({
this.isSupported = true,
this.isActive = false,
this.lastError,
});
const WallpaperStatusMessage({this.isSupported = true, this.isActive = false, this.lastError});
}
@HostApi()