mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
chore(mobile): clean up linter problems (#1000)
This commit is contained in:
parent
bc9ee1d611
commit
39b7ab66d4
32 changed files with 188 additions and 173 deletions
|
|
@ -39,7 +39,8 @@ class AssetNotifier extends StateNotifier<List<Asset>> {
|
|||
stopwatch.start();
|
||||
state = await _assetCacheService.get();
|
||||
debugPrint(
|
||||
"Reading assets from cache: ${stopwatch.elapsedMilliseconds}ms");
|
||||
"Reading assets from cache: ${stopwatch.elapsedMilliseconds}ms",
|
||||
);
|
||||
stopwatch.reset();
|
||||
}
|
||||
|
||||
|
|
@ -145,7 +146,9 @@ class AssetNotifier extends StateNotifier<List<Asset>> {
|
|||
|
||||
final assetProvider = StateNotifierProvider<AssetNotifier, List<Asset>>((ref) {
|
||||
return AssetNotifier(
|
||||
ref.watch(assetServiceProvider), ref.watch(assetCacheServiceProvider));
|
||||
ref.watch(assetServiceProvider),
|
||||
ref.watch(assetCacheServiceProvider),
|
||||
);
|
||||
});
|
||||
|
||||
final assetGroupByDateTimeProvider = StateProvider((ref) {
|
||||
|
|
|
|||
|
|
@ -17,10 +17,11 @@ class ReleaseInfoNotifier extends StateNotifier<String> {
|
|||
try {
|
||||
String? localReleaseVersion = box.get(githubReleaseInfoKey);
|
||||
final res = await client.get(
|
||||
Uri.parse(
|
||||
"https://api.github.com/repos/immich-app/immich/releases/latest",
|
||||
),
|
||||
headers: {"Accept": "application/vnd.github.v3+json"});
|
||||
Uri.parse(
|
||||
"https://api.github.com/repos/immich-app/immich/releases/latest",
|
||||
),
|
||||
headers: {"Accept": "application/vnd.github.v3+json"},
|
||||
);
|
||||
|
||||
if (res.statusCode == 200) {
|
||||
final data = jsonDecode(res.body);
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
// ignore: depend_on_referenced_packages
|
||||
import 'package:flutter_cache_manager/flutter_cache_manager.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:immich_mobile/modules/settings/providers/app_settings.provider.dart';
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ class ImmichToast {
|
|||
final fToast = FToast();
|
||||
fToast.init(context);
|
||||
|
||||
Color _getColor(ToastType type, BuildContext context) {
|
||||
Color getColor(ToastType type, BuildContext context) {
|
||||
switch (type) {
|
||||
case ToastType.info:
|
||||
return Theme.of(context).primaryColor;
|
||||
|
|
@ -26,7 +26,7 @@ class ImmichToast {
|
|||
}
|
||||
}
|
||||
|
||||
Icon _getIcon(ToastType type) {
|
||||
Icon getIcon(ToastType type) {
|
||||
switch (type) {
|
||||
case ToastType.info:
|
||||
return Icon(
|
||||
|
|
@ -60,7 +60,7 @@ class ImmichToast {
|
|||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
_getIcon(toastType),
|
||||
getIcon(toastType),
|
||||
const SizedBox(
|
||||
width: 12.0,
|
||||
),
|
||||
|
|
@ -68,7 +68,7 @@ class ImmichToast {
|
|||
child: Text(
|
||||
msg,
|
||||
style: TextStyle(
|
||||
color: _getColor(toastType, context),
|
||||
color: getColor(toastType, context),
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 15,
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue