init method Null safety

Future<ImageListController> init(
  1. int id,
  2. _ImageListState imageListState
)

Implementation

static Future<ImageListController> init(
  int id,
  _ImageListState imageListState,
) async {
  final MethodChannel channel =
      MethodChannel('plugins.flutter.io/image_list/$id');

  await channel.invokeMethod('waitForList');
  return ImageListController._(
    channel,
    imageListState,
  );
}