I have created a new flutter project in AS and for some reason the name in pubspec.yaml for my app is just app even when I named it something else when I created new app
name: app
description: My new application.
When I rename it to whatever I need then all my imports error out in my project.
Example:
import 'package:app/main.dart';
So how do you change the name in pubspec.yaml without crashing all imports
UPDATE After renaming name, AS doesn't show package option with the new name
For example, if the default app name is
name: defaultappname
description: My new application.
and you want to change it to
name: app
description: My new application.
then you have to just do the search and replace operation:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With