How to change flutter plugin package name

2.7k views Asked by At

When I try to publish my plugin with pub publish --dry-run I got the following error.

Package name "SampleSDK" should be lower-case. Maybe use "sample_sdk"?

How can I change the package name ? There is lots of info to change the app package name but I think it is different. I tried but messed up several times to change the package name.

2

There are 2 answers

3
AudioBubble On

You can modify your package name in pubspec.yaml file.

1
ElsayedDev On

Yup you should modify the name of your plugin to lowercase

i.e:

flutter create --template--package sample_anything_in_the_world

check this : https://www.youtube.com/watch?v=9FA_fvRSoSE&list=PLhXZp00uXBk5TSY6YOdmpzp1yG3QbFvrN&index=42