fromFire method

  1. @override
Future<Uint8List?> fromFire(
  1. dynamic value
)
override

Implementation

@override
Future<Uint8List?> fromFire(dynamic value) async {
  if (value == null) {
    return null;
  } else if (value is Blob) {
    return value.bytes;
  } else if (value is List) {
    // Convert List<dynamic> → Uint8List (safe for iOS)
    return Uint8List.fromList(value.cast<int>());
  } else {
    throw Exception(
        'BlobFireAdapter.fromFire: Unsupported type ${value.runtimeType}');
  }
}