Skip to content
This repository was archived by the owner on Apr 12, 2022. It is now read-only.
This repository was archived by the owner on Apr 12, 2022. It is now read-only.

Encounter an error when calling metadata  #10

Description

@husen-hn

Bug Report

multi_image_picker version: 5.0.2

Is it happening on Android: Yes

Is it happening on iOS: not tested

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.2.3, on Linux, locale en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[✓] Linux toolchain - develop for Linux desktop
[✓] Android Studio (version 4.2)
[✓] Android Studio (version 2020.3)
[✓] Android Studio (version 2020.3)
[✓] Connected device (2 available)

! Doctor found issues in 1 category.

Describe the bug
Encounter error ‍‍type 'Future<dynamic>' is not a subtype of type 'FutureOr<Map<dynamic, dynamic>>' in type cast when calling metadata

List<Asset> _images = <Asset>[];
List<Asset> _selectet_images = <Asset>[];
_images = await MultiImagePicker.pickImages(
        maxImages: 300,
        enableCamera: true,
        selectedAssets: _selectet_images,
        cupertinoOptions: CupertinoOptions(
          takePhotoIcon: "chat",
          doneButtonTitle: "Fatto",
        ),
        materialOptions: MaterialOptions(
          actionBarColor: "#abcdef",
          actionBarTitle: "Example App",
          allViewTitle: "All Photos",
          useDetailsView: false,
          selectCircleStrokeColor: "#000000",
        ),
      );

var pr;
try {
    pr = await _images[0].metadata;
} catch (e) {
    print(e.toString());
}

DEBUG CONSOLE

type 'Future<dynamic>' is not a subtype of type 'FutureOr<Map<dynamic, dynamic>>' in type cast

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions