FLUTTER - DropzoneView: TargetPlatform.windows is not supported appears when hosted in firebase

I was using flutter_dropzone which supports flutter web application.

When run locally the Flutter Dropzone works normally wherein I can attach file. Please see attachment

enter image description here

However, when I finally hosted my flutter webapp to firebase hosting. the dropzone outputs an error "TargetPlatform.windows is not supported". Please see attachment

enter image description here

commands in deploying to hosting

  1. flutter build web

  2. firebase deploy --only hosting:<host-name>

pubspec.yaml - enter image description here

Tried searching for related bug, the only thing that I found was that the flutter project was running in windows application.

Upvotes: 1

Views: 543

Answers (2)

Dave
Dave

Reputation: 197

I had this problem. Since we are interacting with the DOM, have the build render in HTML (rather than CanvasKit) to get the native DOM features.

flutter build web --web-renderer=html

Upvotes: 1

Kurogoma939
Kurogoma939

Reputation: 51

I had the same problem with a web app deployed with Firebase Hosting. I was using Chrome as the browser.

I had the same phenomenon right after deployment, but it was resolved after clearing the browser cache and hard reloading.

If you are on a Mac, please try ⌘ + Shift + R or launching the browser's verification mode and doing a hard reset.

Upvotes: 0

Related Questions