showAssetPicker function

Future<List<AssetImageInfo>?> showAssetPicker(
  1. BuildContext context, {
  2. Key? key,
  3. AssetPickerConfig? config,
})

Implementation

Future<List<AssetImageInfo>?> showAssetPicker(
  BuildContext context, {
  Key? key,
  AssetPickerConfig? config,
}) async {
  if (config != null) {
    AssetPickerConfig.setInstance(config);
  }
  return await showCupertinoModalBottomSheet(
    context: context,
    duration: AssetPickerConfig.instance.transitionDuration,
    builder: (context) => AssetPicker(
      key: key,
      config: AssetPickerConfig.instance,
    ),
  );
}