INNER CODE UNIT · Dart
AppRestartScope
hacan359/tonkatsu_box · lib/main.dart:86
class AppRestartScope extends StatefulWidget {
const AppRestartScope({required this.child, super.key});
final Widget child;
/// Reloads profiles and recreates the ProviderScope.
static Future<void> restart(BuildContext context) async {
final _AppRestartScopeState? state =
context.findAncestorStateOfType<_AppRestartScopeState>();
await state?._restart();
}
@override
State<AppRestartScope> createState() => _AppRestartScopeState();
}
class _AppRestartScopeState extends State<AppRestartScope> {
Key _key = UniqueKey();