Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save om-chauhan/4605653e6f2e41b8a0a46d6ab8e33b30 to your computer and use it in GitHub Desktop.
Save om-chauhan/4605653e6f2e41b8a0a46d6ab8e33b30 to your computer and use it in GitHub Desktop.
Create Flutter Package and Publish to the Pub.dev Beginner Friendly Steps

1. Create flutter package

flutter create --template=package package_name

2. Add/Edit following details in pubspec.yaml (of package)

Step 2

3. Add package name in example code

Step 3

4. After completion above steps

  • run CMD to test run or all terms and condtions meets or not. if yes then flutter pub publish --dry-run else check console resolve problems.

  • To publish package on Pub.dev run CMD flutter pub publish

5. Publish code on GitHub

  1. Initalize Git - git init
  2. Message/Commit - git commit -m "Type Commit/Msg here"
  3. Add Project to your Repositry git remote add origin Repositry_URL
  4. Push Code - git push -u origin master

In case you stuck anywhere please follows this Repo Flat Banners

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment