reduce rebuild

Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-03-17 14:38:10 +08:00
parent 8a8aa6c1e0
commit d6579b29ae
23 changed files with 254 additions and 214 deletions

View File

@@ -3,11 +3,11 @@ import 'package:flutter/material.dart';
class KeepAliveWrapper extends StatefulWidget {
const KeepAliveWrapper({
super.key,
required this.builder,
required this.child,
this.wantKeepAlive = true,
});
final WidgetBuilder builder;
final Widget child;
final bool wantKeepAlive;
@override
@@ -19,7 +19,7 @@ class _KeepAliveWrapperState extends State<KeepAliveWrapper>
@override
Widget build(BuildContext context) {
super.build(context);
return widget.builder(context);
return widget.child;
}
@override