Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getImage with 2 types at the same time #12

Closed
shinriyo opened this issue Jun 2, 2020 · 4 comments
Closed

getImage with 2 types at the same time #12

shinriyo opened this issue Jun 2, 2020 · 4 comments

Comments

@shinriyo
Copy link

shinriyo commented Jun 2, 2020

Hello

I'd like to getImage

    Image fromPicker = await ImagePickerWeb.getImage(outputType: ImageType.widget);

and

    Uint8List bytesFromPicker =
        await ImagePickerWeb.getImage(outputType: ImageType.bytes);

at the same time

is is possible?

Because, I wrote both of them. it open dialogs 2times.

@shinriyo
Copy link
Author

shinriyo commented Jun 3, 2020

I'm sorry.
Your full example will be helpfull.

html.File are versatile!

    html.File mediaFile =
        new html.File(mediaData.data, mediaData.fileName, {'type': mimeType});

    if (mediaFile != null) {
      setState(() {
        _cloudFile = mediaFile;
        _fileBytes = mediaData.data;
        _imageWidget = Image.memory(mediaData.data);
      });
    }

@TaikiAsa
Copy link

Sorry, please help me
I use this method and upload firebase storage but cloudfile was broken.

@shinriyo
Copy link
Author

@TaikiAsa did you try my new code?

@TaikiAsa
Copy link

@shinriyo Yes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants