ApiRequest.fromUtf8 constructor
Create a request using an encoded UTF-8 string as the data
.
Implementation
factory ApiRequest.fromUtf8({
required int id,
required String data,
}) {
return ApiRequest(id: id, data: Uint8List.fromList(utf8.encode(data)));
}