encoded method Null safety

Future<ImageDescriptor> encoded(
  1. ImmutableBuffer buffer
)

Creates an image descriptor from encoded data in a supported format.

Implementation

static Future<ImageDescriptor> encoded(ImmutableBuffer buffer) {
  final ImageDescriptor descriptor = ImageDescriptor._();
  return _futurize((_Callback<void> callback) {
    return descriptor._initEncoded(buffer, callback);
  }).then((_) => descriptor);
}