INNER CODE UNIT · Dart

_RestartWidgetState

Hash-Studios/e-learning-app · lib/main.dart:72

class _RestartWidgetState extends State<RestartWidget> {
  Key key = UniqueKey();

  void restartApp() {
    setState(() {
      key = UniqueKey();
    });
  }

  @override
  Widget build(BuildContext context) {
    return KeyedSubtree(
      key: key,
      child: widget.child!,
    );
  }
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…