StreamParam class

Declare param to trigger the stream. All of the params @StreamParam declaration will become the propety of ${action}Params class

Consider we have a two @StreamParam annotation declaration for class LoginStream

@StreamParam(String, 'username')
@StreamParam(String, 'password', optional: true)
class LoginStream {...}

will create

class LoginParams {
 final String username;
 final String password;
 const LoginParams(this.username, {this.password});
}

However a stream class without any @StreamParam annotation will create a ${action}Params class without any property

class LoginStream {...}

will create

class LoginParams {
 const LoginParams();
}

Constructors

StreamParam(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