File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -46,20 +46,22 @@ mixin ComputedFlutterMixin on StatelessWidget {
4646 StatelessElement createElement () => ComputedFlutterElement (this );
4747}
4848
49+ /// Allows Computed to track reactive dependencies of the build method.
50+ mixin ComputedFlutterStatefulMixin on StatefulWidget {
51+ @override
52+ StatefulElement createElement () => ComputedFlutterStatefulElement (this );
53+ }
54+
4955/// A [StatelessWidget] the build method of which is tracked by Computed.
50- abstract class ComputedWidget extends StatelessWidget {
56+ abstract class ComputedWidget extends StatelessWidget
57+ with ComputedFlutterMixin {
5158 const ComputedWidget ({super .key});
52-
53- @override
54- StatelessElement createElement () => ComputedFlutterElement (this );
5559}
5660
5761/// A [StatefulWidget] the build method of which is tracked by Computed.
58- abstract class ComputedStatefulWidget extends StatefulWidget {
62+ abstract class ComputedStatefulWidget extends StatefulWidget
63+ with ComputedFlutterStatefulMixin {
5964 const ComputedStatefulWidget ({super .key});
60-
61- @override
62- StatefulElement createElement () => ComputedFlutterStatefulElement (this );
6365}
6466
6567/// As [Builder] , but the builder is tracked by Computed.
You can’t perform that action at this time.
0 commit comments