mirror of
https://github.com/immich-app/immich.git
synced 2025-07-09 03:04:16 -04:00
* enable border radius, switch exp, const constructor * regenerate provider * more formatting --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
21 lines
573 B
Dart
21 lines
573 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 name) async {
|
|
await HomeWidget.updateWidget(name: name, iOSName: name);
|
|
}
|
|
|
|
Future<void> setAppGroupId(String appGroupId) async {
|
|
await HomeWidget.setAppGroupId(appGroupId);
|
|
}
|
|
}
|