Files
MWClash/lib/widgets/keep_scope.dart
chen08209 e6da643186 Support desktop hotkey
Support android ipv6 inbound

Support android system dns

fix some bugs
2024-12-06 19:24:11 +08:00

28 lines
541 B
Dart

import 'package:flutter/material.dart';
class KeepScope extends StatefulWidget {
final Widget child;
final bool keep;
const KeepScope({
super.key,
required this.child,
this.keep = true,
});
@override
State<KeepScope> createState() => _KeepContainerState();
}
class _KeepContainerState extends State<KeepScope>
with AutomaticKeepAliveClientMixin {
@override
Widget build(BuildContext context) {
super.build(context);
return widget.child;
}
@override
bool get wantKeepAlive => widget.keep;
}