We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#PartialbuildsView rebuilds everything
class PartialBuildsView extends StatelessWidget { const PartialBuildsView({Key key}) : super(key: key); @override Widget build(BuildContext context) { return ViewModelBuilder<PartialBuildsViewModel>.nonReactive( builder: (context, model, child) { print('PartialBuildsView rebuilt'); return Scaffold( body: Column( mainAxisSize: MainAxisSize.max, mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ _StringForm(), _TitleAndValue(), ], ), ); }, viewModelBuilder: () => PartialBuildsViewModel(), ); } } class _StringForm extends HookViewModelWidget<PartialBuildsViewModel> { _StringForm({Key key}) : super(key: key, reactive: false); @override Widget buildViewModelWidget( BuildContext context, PartialBuildsViewModel model, ) { print('_StringForm rebuilt'); var text = useTextEditingController(); return TextField( controller: text, onChanged: model.updateString, ); } } class _TitleAndValue extends ViewModelWidget<PartialBuildsViewModel> { const _TitleAndValue({Key key}) : super(key: key, reactive: true); @override Widget build( BuildContext context, PartialBuildsViewModel model ) { print('_TitleAndValue rebuilt'); return Column( children: <Widget>[ Text( model.title ?? '', style: TextStyle(fontSize: 40), ) ], ); } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
#PartialbuildsView rebuilds everything
The text was updated successfully, but these errors were encountered: