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
Thank you for your valuable advice on the architecture。
I'm looking at your code, there are still many things I can't understand. Need to ask you。
return BaseWidget<HomeViewModel>( viewModel: HomeViewModel(), onModelReady: (model) => model.initialise(), child: ScreenTypeLayout( mobile: OrientationLayout( //ioc view portrait: (context) => HomeMobilePortrait(), landscape: (context) => HomeMobileLandscape(), ), tablet: HomeViewTablet(), ), );
BaseWidget need provider ViewModel type . why not create instance according to this ViewModel type ? like java invoke.
abstract class BaseModelWidget<T> extends Widget { @protected Widget build(BuildContext context, T model); @override DataProviderElement<T> createElement() => DataProviderElement<T>(this); } // class DataProviderElement<T> extends ComponentElement { DataProviderElement(BaseModelWidget widget) : super(widget); @override BaseModelWidget get widget => super.widget; @override Widget build() => widget.build(this, Provider.of<T>(this)); @override void update(BaseModelWidget newWidget) { super.update(newWidget); assert(widget == newWidget); rebuild(); } }
BaseModelWidget Does it really have a meaning, more often, I think it just comes from provider .
Sometimes, I get confused by its name, whether this is a widget or a viewmodel or even a model .
Please forgive me, this bad English
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Thank you for your valuable advice on the architecture。
I'm looking at your code, there are still many things I can't understand. Need to ask you。
BaseWidget need provider ViewModel type . why not create instance according to this ViewModel type ? like java invoke.
BaseModelWidget Does it really have a meaning, more often, I think it just comes from provider .
Sometimes, I get confused by its name, whether this is a widget or a viewmodel or even a model .
Please forgive me, this bad English
The text was updated successfully, but these errors were encountered: