MVC_ProxyProvider<T, R> class abstract

V2 Sugar syntax to declare a ProxyProvider When you need to share an instance's method or property with a given type

Sample declaration (in a MVC_MODULE.providers property OR in a MultiProvider Widget) :

[...
  MyUserProfileService().create,
...]

Sample use :

String loggedUserName = MyUserProfileService(context).get["name"];

Sample class :

class MyUserProfileService extends MVC_ProxyProvider<MyUserProfileService, Map<String, dynamic>> {

  MyUserProfileService([context]) : super(context); // The constructor which call the inherited "super" constructor

  @override
  Map<String, dynamic> builder(BuildContext context) {
    return MyAuthenticationService(context).get.loggedUser;
  }
}

Constructors

MVC_ProxyProvider([BuildContext? context])
The MVC_ProxyProvider's constructor which will return an MVC_ProxyProvider instance with given context

Properties

context BuildContext?
The MVC_ProxyProvider's property which will store the current context
getter/setter pair
create SingleChildWidget
A MVC_ProxyProvider's getter which will return the MultiProvider instance which will init the MVC_ProxyProvider's instance which will be used at a lower widget level
no setter
get → R?
The MVC_ProxyProvider's getter which will return something with the given R type provided by the MVC_ProxyProvider instance declared at higher level
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

builder(BuildContext? context) → R
The MVC_ProxyProvider's method which should be overrided in order to return something with the given R type
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
update(BuildContext? context) → T
The MVC_ProxyProvider's method which will update context of current MVC_ProxyProvider instance

Operators

operator ==(Object other) bool
The equality operator.
inherited