<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Parth Patel on Medium]]></title>
        <description><![CDATA[Stories by Parth Patel on Medium]]></description>
        <link>https://medium.com/@parthp582000?source=rss-9b2b6f23e0df------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*GG4QgBRwAlLKSCYF</url>
            <title>Stories by Parth Patel on Medium</title>
            <link>https://medium.com/@parthp582000?source=rss-9b2b6f23e0df------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 12:36:09 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@parthp582000/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to create Flutter Package and publish it on pub.dev]]></title>
            <link>https://medium.com/dscddu/how-to-create-flutter-package-and-publish-it-on-pub-dev-34913475cf55?source=rss-9b2b6f23e0df------2</link>
            <guid isPermaLink="false">https://medium.com/p/34913475cf55</guid>
            <category><![CDATA[app-development]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[pub]]></category>
            <category><![CDATA[dart]]></category>
            <dc:creator><![CDATA[Parth Patel]]></dc:creator>
            <pubDate>Wed, 10 Jun 2020 16:25:26 GMT</pubDate>
            <atom:updated>2020-06-12T08:02:26.168Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to create a Flutter Package and publish it on pub.dev</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*ysumn3deh8ueRnfV.png" /></figure><h3>In this article, We will see How We can create Flutter package and publish it on <a href="https://pub.dev/">pub.dev</a>.</h3><p>If you are working with Flutter, You probably have used a third-party package. Why not? Just search for the package you need on <a href="https://pub.dev/">pub.dev</a>, add the dependency in pubspec.yaml file (Fun Fact- Full form of yaml is Yaml Ain’t Markup Language), there you go. Why should we rewrite the whole code(logic) which has been already written by other developers? But how to develop these packages and publish it on <a href="https://pub.dev/">pub.dev</a>? We will see it in detail:</p><h3>Prerequisites</h3><blockquote><em>Flutter Installed</em></blockquote><blockquote><em>Basic Knowledge Of Flutter</em></blockquote><h3>Type Of Packages</h3><h4>Dart packages</h4><p>Packages that are written in Dart. They might contain Flutter specific functionality and depend on the Flutter Framework.</p><h4>Plugin packages</h4><p>Packages that contain an API written in Dart code combined with one or more platform-specific implementations. Plugin packages can be written for Android (using Kotlin or Java), iOS (using Swift or Objective-C), web (using Dart), macOS (using Dart).</p><p>In this article, we will focus on the Dart Package only. Let’s write our own Flutter package. We are creating a package that provides different social sign-in buttons. It will provide the buttons as shown in the below image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*8X9BzY8jLolHXvPi.png" /><figcaption>Example App</figcaption></figure><h3>Step 1: Create a package</h3><p>If you are using Android Studio, it will directly provide an option to create Flutter Package when you start a new Flutter Project.</p><p>Or you can just run this command on command prompt.</p><pre>flutter create --template=package social_signin_buttons</pre><p>It will create a new project social_signin_buttons. The project directory contains the following important files:</p><p><strong>lib/social_signin_buttons.dart:</strong> Dart starter app containing Dart code for the package.</p><p><strong>pubspec.yaml: </strong>A yaml file containing metadata that specifies the package’s dependencies. Used by the pub tool.</p><p><strong>README.md: </strong>A starter markdown file that briefly describes the package’s purpose.</p><p><strong>LICENSE: </strong>A (mostly) empty license text file.</p><p><strong>CHANGELOG.md: </strong>A (mostly) empty markdown file for tracking version changes to the package.</p><p><strong>test/hello_test.dart: </strong>The unit tests for the package.</p><h3>Step 2: Implement The Package</h3><p>First of all, We need icons of sign-in/OAuth providers so we add the <a href="https://pub.dev/packages/font_awesome_flutter">font_awesome_flutter</a> package in pubspec.yaml file for Icons.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/95bf850395c4ab7f88fd1facc56242ff/href">https://medium.com/media/95bf850395c4ab7f88fd1facc56242ff/href</a></iframe><p>Now we will create assets folder in the project directory and paste the images.</p><pre>-social_signin_buttons<br>    -assets<br>        -google_logo.png<br>        -microsoft_logo.png</pre><p>Next, we will write an implementation of our package in lib/social_signin_buttons.dart file.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0fd167a9fe3081c7c2f3ee2ab2b3e482/href">https://medium.com/media/0fd167a9fe3081c7c2f3ee2ab2b3e482/href</a></iframe><p>It is a pretty simple code, We are just returning Material Button Widget according to parameters.</p><h3>Step 3: Add Documentation</h3><p>Add the description of your package, How to Use it, screenshots, or animated gif, an example in <strong>README.md </strong>file.</p><p>Update the <strong>CHANGELOG.md</strong> file.</p><p>Add the <strong>LICENSE</strong> in the repository. You can add the license by following<a href="https://help.github.com/en/github/building-a-strong-community/adding-a-license-to-a-repository"> these </a>steps.</p><p>Add one <strong>example</strong> flutter project that uses the package. It is optional but I suggest you to add the example.</p><p>Add the homepage field as your link of GitHub repository in pubspec.yaml</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/60b5de9d1ea57aaadc34fddd607cc312/href">https://medium.com/media/60b5de9d1ea57aaadc34fddd607cc312/href</a></iframe><h3>Step 4: Publish Your Package</h3><p>First, sign in to <a href="https://pub.dev/">pub.dev</a> with your Google Account.</p><p>Before publishing, make sure to review the <strong>pubspec.yaml</strong>, <strong>README.md,</strong> and <strong>CHANGELOG.md</strong> files.</p><p>Next, run the publish command in <em>dry-run </em>mode to see if everything passes analysis:</p><pre>flutter pub publish --dry-run</pre><p>If there is any error solve it else we can publish it to <a href="https://pub.dev/">pub.dev</a>. But be sure that you are ready because publishing is forever. we can’t remove the package from there. So if you are ready, run following command:</p><pre>flutter pub publish</pre><p>For authentication, one link will be provided, just open in browser and select your google account.</p><p>Wait for uploading.</p><p>And it’s Done, Hurrah! You have created your own Futter Package.</p><p>You can search for your package on the <a href="https://pub.dev/">pub.dev</a> site after some time, It will take a few minutes.</p><p>Get the full source code here: <a href="https://github.com/parth58/Social-SignIn-Buttons">Social-SignIn-Buttons</a>.</p><p>Check out my package on <a href="https://pub.dev/">pub.dev</a>: <a href="https://pub.dev/packages/social_signin_buttons">Social-SignIn-Buttons</a>.</p><p>Comment If you have any doubts or issues and share it if you liked it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=34913475cf55" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dscddu/how-to-create-flutter-package-and-publish-it-on-pub-dev-34913475cf55">How to create Flutter Package and publish it on pub.dev</a> was originally published in <a href="https://medium.com/dscddu">DSC DDU</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>