short array operations

This commit is contained in:
Christien Rioux 2023-07-30 13:57:00 -04:00
parent 1907a15b0b
commit 57c366ef91
3 changed files with 241 additions and 57 deletions

View file

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