AngeloAvv / flutter_flavorizr

A flutter utility to easily create flavors in your flutter application
https://pub.dev/packages/flutter_flavorizr
MIT License
469 stars 85 forks source link

Rerunning `flutter pub run flutter_flavorizr` recreates main.dart #276

Open mikemilla opened 2 months ago

mikemilla commented 2 months ago

Hey, maybe I am the only one getting this, or I may be doing something wrong, but rerunning flutter pub run flutter_flavorizr will destroy my main.dart, remove all my code in it and recreate the file.

The flow I want to use is every now and then rerun the command because I add a new api key or something else. Just want to recreate my flavor files and what not. Not nuke my main.dart.

Any help is useful. Thanks

kmrosiek commented 2 days ago

it also recreates pages/ flavors.dart app.dart and modifies other mains by changing import from import 'package:common/flavors/flavors.dart'; to import 'flavors.dart'; How to prevent that?

lucapan commented 2 days ago

Same issue here. It would be nice to avoid overwriting main.dart and app.dart. Thanks!