mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2025-05-06 08:15:26 -04:00
short array operations
This commit is contained in:
parent
1907a15b0b
commit
57c366ef91
3 changed files with 241 additions and 57 deletions
|
@ -4,6 +4,9 @@ import 'dart:typed_data';
|
|||
T jsonDecodeBytes<T>(T Function(dynamic) fromJson, Uint8List data) =>
|
||||
fromJson(jsonDecode(utf8.decode(data)));
|
||||
|
||||
T? jsonDecodeOptBytes<T>(T Function(dynamic) fromJson, Uint8List? data) =>
|
||||
(data == null) ? null : fromJson(jsonDecode(utf8.decode(data)));
|
||||
|
||||
Uint8List jsonEncodeBytes(Object? object,
|
||||
{Object? Function(Object?)? toEncodable}) =>
|
||||
Uint8List.fromList(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue