mirror of
https://github.com/immich-app/immich.git
synced 2025-08-11 09:16:31 -04:00
* chore: bump dart sdk to 3.8 * chore: make build * make pigeon * chore: format files --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
21 lines
622 B
Dart
21 lines
622 B
Dart
import 'package:home_widget/home_widget.dart';
|
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
|
|
|
final widgetRepositoryProvider = Provider((_) => const WidgetRepository());
|
|
|
|
class WidgetRepository {
|
|
const WidgetRepository();
|
|
|
|
Future<void> saveData(String key, String value) async {
|
|
await HomeWidget.saveWidgetData<String>(key, value);
|
|
}
|
|
|
|
Future<void> refresh(String iosName, String androidName) async {
|
|
await HomeWidget.updateWidget(iOSName: iosName, qualifiedAndroidName: androidName);
|
|
}
|
|
|
|
Future<void> setAppGroupId(String appGroupId) async {
|
|
await HomeWidget.setAppGroupId(appGroupId);
|
|
}
|
|
}
|