add app reset option

This commit is contained in:
Fabian Freund
2025-10-13 04:09:19 +02:00
parent e7c57971fb
commit fa6fa28491
6 changed files with 118 additions and 1 deletions
+16
View File
@@ -0,0 +1,16 @@
import 'package:flutter/widgets.dart';
import 'package:riverpod_annotation/riverpod_annotation.dart';
part 'app_state.g.dart';
@Riverpod(keepAlive: true)
class AppStateKey extends _$AppStateKey {
void reset() {
state = GlobalKey(debugLabel: 'RootKey');
}
@override
GlobalKey build() {
return GlobalKey(debugLabel: 'RootKey');
}
}