StreamResult class
Declare param to trigger the stream.
All of the params @StreamResult
declaration will become the propety of ${action}Results
class
Consider we have a two @StreamResult
annotation declaration for class LoginStream
@StreamResult(UserProfile, 'userProfile')
@StreamResult(bool, 'isFirstLogin', optional: true)
class LoginStream {...}
will create
class LoginResults {
final UserProfile userProfile;
final bool isFirstLogin;
const LoginResults(this.isFirstLogin, {this.isFirstLogin});
}
However a stream class without any @StreamResult
annotation will create a ${action}Results
class
without any property
class LoginStream {...}
will create
class LoginResults {
const LoginResults();
}
Constructors
-
StreamResult(Type propertyType,
String propertyName, {bool optional: false} ) -
const
Properties
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
- optional → bool
-
final
- propertyName → String
-
final
- propertyType → Type
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
noSuchMethod(
Invocation invocation ) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
toString(
) → String -
Returns a string representation of this object.
inherited
Operators
-
operator ==(
Object other ) → bool -
The equality operator. [...]
inherited