ClientRequest class
class ClientRequest { final dynamic args; final String type; /** * Creates a [ClientRequest] with specified [type] and [args] * [type] is the name of the requested server function * [args] is a map of arguments for the specified server function */ ClientRequest(this.type, this.args); /** * Create a [ClientRequest] from JSON map {'name' : something, 'args': somethingElse} */ factory ClientRequest.fromJson(Map data) => new ClientRequest(data['type'], data['args']); /** * Converts this [ClientRequest] to JSON serializable map. */ Map toJson() => {'type': type, 'args': args}; }
Constructors
new ClientRequest(String type, args) #
Creates a ClientRequest with specified type and [args] [type] is the name of the requested server function args is a map of arguments for the specified server function
ClientRequest(this.type, this.args);
factory ClientRequest.fromJson(Map data) #
Create a ClientRequest from JSON map {'name' : something, 'args': somethingElse}
factory ClientRequest.fromJson(Map data) => new ClientRequest(data['type'], data['args']);
Methods
Map toJson() #
Converts this ClientRequest to JSON serializable map.
Map toJson() => {'type': type, 'args': args};