randomBytesBuf method

  1. @override
Future<Uint8List> randomBytesBuf(
  1. int size
)
override

Implementation

@override
Future<Uint8List> randomBytesBuf(int size) async {
  final data = await methodChannel.invokeMethod<List<dynamic>>(
    randomBytesBufMethod,
    <String, dynamic>{
      'size': size,
    },
  );
  if (data != null) {
    return Uint8List.fromList(data.map((obj) => obj as int).toList());
  }
  return Uint8List(0);
}