flutter_flavorizr icon indicating copy to clipboard operation
flutter_flavorizr copied to clipboard

flutter web

Open kiaxseventh opened this issue 3 years ago • 1 comments

hello dear Do you have any plans to support flutter web ?

kiaxseventh avatar Apr 29 '21 18:04 kiaxseventh

Hi @kiaxseventh , since Flutter doesn't really want to support flavors for Flutter web it's a bit tricky to manage all the surrounding stuff directly by flutter_flavorizr. Anyway, it's still possible to launch custom targets after you flavorized your project

AngeloAvv avatar Apr 03 '22 14:04 AngeloAvv

you can use dart-define, example: flutter build web --dart-define FLAVOR="you-flavor"

inside the app: const flavor =String.fromEnvironment('FLAVOR', defaultValue: 'you-flavor');

rafagazani avatar Aug 18 '22 21:08 rafagazani

Hi @kiaxseventh , since Flutter doesn't really want to support flavors for Flutter web it's a bit tricky to manage all the surrounding stuff directly by flutter_flavorizr. Anyway, it's still possible to launch custom targets after you flavorized your project

Hi Sir, I am able to run web app with flavors but not able to build web app with flavors, is there any solution for this. Working: fvm flutter run --flavor flavor_name -t lib/main_flavor_name.dart -d chrome Not Working: fvm flutter build web --flavor flavor_name -t lib/main_flavor_name.dart

yogikorke avatar Nov 05 '23 17:11 yogikorke

related https://github.com/flutter/flutter/issues/141371

cedvdb avatar Jan 11 '24 14:01 cedvdb