{"id":29100,"date":"2023-09-18T11:37:13","date_gmt":"2023-09-18T06:07:13","guid":{"rendered":"https:\/\/mobisoftinfotech.com\/resources\/?p=29100"},"modified":"2026-03-11T18:30:16","modified_gmt":"2026-03-11T13:00:16","slug":"how-to-create-packages-for-flutter-a-developers-guide","status":"publish","type":"post","link":"https:\/\/mobisoftinfotech.com\/resources\/blog\/how-to-create-packages-for-flutter-a-developers-guide","title":{"rendered":"How to Create Packages for Flutter: A Developer\u2019s Guide"},"content":{"rendered":"<p>Flutter packages are a powerful way to share and reuse code in your Flutter projects. Whether you want to contribute to the Flutter community or streamline your <a href=\"https:\/\/mobisoftinfotech.com\/services\/flutter-app-development-company\">Flutter app development<\/a> process, creating Flutter packages is the key.&nbsp;<\/p>\n\n\n\n<p>In this post, I will take you through the process of creating Flutter packages, from setting up your development environment to publishing your package on Dart&#8217;s package repository, pub.dev. Whether you&#8217;re a <a href=\"https:\/\/mobisoftinfotech.com\/services\/hire-flutter-developers\">seasoned Flutter developer<\/a> looking to share your expertise or a newcomer eager to contribute to the Flutter community, this post will walk you through the steps to package your Flutter code effectively.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">About Flutter Package<\/h2>\n\n\n\n<p>A <a href=\"https:\/\/mobisoftinfotech.com\/services\/flutter-consulting-development\">Flutter application development services<\/a> package is a broader term that refers to any self-contained piece of code that can be imported and used in a Flutter project. Packages can contain widgets, utility functions, plugins, or any other code that can be reused across multiple Flutter projects.&nbsp;<\/p>\n\n\n\n<p><\/p><h2><strong>Advantages of creating packages:<\/strong><\/h2>\n\n\n\n<p>Flutter packages are a cornerstone of the Flutter framework, offering developers a wide array of benefits that significantly streamline development and boost productivity.&nbsp;<\/p>\n\n\n\n<p><strong>Reusability:<\/strong> By creating packages, you enable the reuse of code across multiple projects. This is particularly useful for sharing common functionalities or maintaining a consistent design language across different apps. This helps save time because you don&#8217;t have to recreate the same things over and over.<\/p>\n\n\n\n<p><strong>Decoupling:<\/strong> Packages can be developed in a way that they are decoupled from the specific app&#8217;s context. This makes it easier to replace or update individual components without affecting the entire application.<\/p>\n\n\n\n<p><strong>Code Sharing:<\/strong> Developers within your organization can easily share packages among different projects, leading to faster development cycles and reduced duplication of effort.<\/p>\n\n\n\n<p><strong>Focused Development:<\/strong> Package development allows teams to focus on specific modules without being overwhelmed by the entire application&#8217;s codebase.<\/p>\n\n\n\n<p><strong>Versioning and Updates:<\/strong> Packages can have their own versioning and update cycles, which can be beneficial when different parts of the application evolve at different rates.<\/p>\n\n\n\n<p><strong>Maintenance:<\/strong> If a module requires updates or fixes, you can address them within the context of the package without affecting the rest of the application.<\/p>\n\n\n\n<p>Now, let\u2019s get started with a step-by-step practical guide on how to create packages for Flutter.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1: Create a Flutter Package<\/h2>\n\n\n\n<p>To create a package used in flutter app development services, open your command line interface or directory where you want to create the Flutter package and run the command mentioned below:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">flutter create --template=package mi_flutter_package<\/code><\/span><\/pre>\n\n\n<p>Replace <code>mi_flutter_package<\/code> with the desired name for your package.<\/p>\n\n\n\n<p>This command will create a Flutter package project with the mi_flutter_package folder below the mentioned folder structure.<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">package_name\/\n\u251c\u2500\u2500 lib\/\n\u2502   \u2514\u2500\u2500 mi_flutter_package.dart\n\u251c\u2500\u2500 pubspec.yaml\n\u251c\u2500\u2500 README.md\n\u2514\u2500\u2500 example\/\n    \u251c\u2500\u2500 lib\/\n    \u2514\u2500\u2500 \u2026\n<\/code><\/span><\/pre>\n\n\n<p><strong>LICENSE<\/strong><\/p>\n\n\n\n<p>This file is mostly blank and is meant for adding legal terms regarding package usage.<\/p>\n\n\n\n<p><strong>test\/<\/strong><strong>mi_flutter_package<\/strong><strong>_test.dart<\/strong><\/p>\n\n\n\n<p>The <a href=\"https:\/\/docs.flutter.dev\/testing\/overview#unit-tests\" rel=\"nofollow noopener\">unit tests<\/a> for the package.<\/p>\n\n\n\n<p><strong>mi_flutter_package.iml<\/strong><\/p>\n\n\n\n<p>A configuration file used by the IntelliJ IDEs.<\/p>\n\n\n\n<p><strong>.gitignore<\/strong><\/p>\n\n\n\n<p>&nbsp;A hidden file that tells Git what files or folders it should ignore when tracking changes in a project.<\/p>\n\n\n\n<p>.<strong>metadata<\/strong><\/p>\n\n\n\n<p>A hidden file is used by IDEs to track the properties of the Flutter project.<\/p>\n\n\n\n<p><strong>Pubspec.yaml<\/strong><\/p>\n\n\n\n<p>A YAML file containing metadata that specifies the package\u2019s dependencies. Used by the pub tool.<\/p>\n\n\n\n<p><strong>README.md<\/strong><\/p>\n\n\n\n<p>A markdown file that briefly describes the package\u2019s purpose and its usage.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2: Implementing Your Package<\/h2>\n\n\n\n<p>We need to write the code for our package inside the lib folder. This is where you&#8217;ll define your package&#8217;s classes, functions, widgets, or other functionality.<\/p>\n\n\n\n<p>In our package, we will add a class to define a flexible custom app bar widget named MIAppBarWidget for Flutter applications. Developers can use this widget and customize various aspects of the app bar&#8217;s appearance and behavior by providing values through the constructor parameters. This allows for greater flexibility in designing the app&#8217;s user interface.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">import <span class=\"hljs-string\">'package:flutter\/material.dart'<\/span>;\nimport <span class=\"hljs-string\">'package:flutter\/services.dart'<\/span>;\n\n\n<span class=\"hljs-class\"><span class=\"hljs-keyword\">class<\/span> <span class=\"hljs-title\">MIAppBarWidget<\/span> <span class=\"hljs-keyword\">extends<\/span> <span class=\"hljs-title\">StatelessWidget<\/span> <span class=\"hljs-keyword\">implements<\/span> <span class=\"hljs-title\">PreferredSizeWidget<\/span> <\/span>{\n <span class=\"hljs-keyword\">final<\/span> Widget? leading;\n <span class=\"hljs-keyword\">final<\/span> double? leadingWidth;\n <span class=\"hljs-keyword\">final<\/span> bool automaticallyImplyLeading;\n <span class=\"hljs-keyword\">final<\/span> Widget title;\n <span class=\"hljs-keyword\">final<\/span> <span class=\"hljs-function\"><span class=\"hljs-keyword\">Function<\/span><span class=\"hljs-params\">(BuildContext context)<\/span> <span class=\"hljs-title\">onBackButtonTapped<\/span><\/span>;\n <span class=\"hljs-keyword\">final<\/span> TextStyle? titleTextStyle;\n <span class=\"hljs-keyword\">final<\/span> <span class=\"hljs-keyword\">List<\/span>&lt;Widget&gt;? actions;\n <span class=\"hljs-keyword\">final<\/span> bool centerTitle;\n <span class=\"hljs-keyword\">final<\/span> double toolbarHeight;\n <span class=\"hljs-keyword\">final<\/span> double toolbarOpacity;\n <span class=\"hljs-keyword\">final<\/span> ShapeBorder? shapeBorder;\n <span class=\"hljs-keyword\">final<\/span> double? elevation;\n <span class=\"hljs-keyword\">final<\/span> Color? backgroundColor;\n <span class=\"hljs-keyword\">final<\/span> IconThemeData? actionsIconTheme;\n <span class=\"hljs-keyword\">final<\/span> Color? shadowColor;\n <span class=\"hljs-keyword\">final<\/span> double sideMargin;\n <span class=\"hljs-keyword\">final<\/span> Color? statusBarColor;\n <span class=\"hljs-keyword\">final<\/span> Gradient? gradient;\n <span class=\"hljs-keyword\">final<\/span> BorderRadiusGeometry? gradientRadius;\n\n\n <span class=\"hljs-keyword\">const<\/span> MIAppBarWidget(\n     {Key? key,\n     this.leading,\n     this.automaticallyImplyLeading = <span class=\"hljs-keyword\">false<\/span>,\n     required this.onBackButtonTapped,\n     required this.title,\n     this.titleTextStyle,\n     this.actions,\n     this.centerTitle = <span class=\"hljs-keyword\">false<\/span>,\n     this.toolbarHeight = <span class=\"hljs-number\">60<\/span>,\n     this.toolbarOpacity = <span class=\"hljs-number\">1<\/span>,\n     this.shapeBorder,\n     this.elevation = <span class=\"hljs-number\">8<\/span>,\n     this.backgroundColor,\n     this.leadingWidth = <span class=\"hljs-number\">56<\/span>,\n     this.actionsIconTheme =\n         <span class=\"hljs-keyword\">const<\/span> IconThemeData(color: Colors.black, size: <span class=\"hljs-number\">36<\/span>),\n     this.shadowColor,\n     this.sideMargin = <span class=\"hljs-number\">0<\/span>,\n     this.gradient,\n     this.gradientRadius,\n     this.statusBarColor})\n     : super(key: key);\n\n\n @override\n Widget build(BuildContext context) {\n   <span class=\"hljs-keyword\">return<\/span> Container(\n     margin: EdgeInsets.only(left: sideMargin, right: sideMargin),\n     child: Center(\n       child: AppBar(\n           leading: InkWell(\n             onTap: () =&gt; {onBackButtonTapped(context)},\n             child: leading,\n           ),\n           flexibleSpace: Container(\n               decoration: BoxDecoration(\n                   gradient: gradient, borderRadius: gradientRadius)),\n           leadingWidth: leadingWidth,\n           iconTheme: actionsIconTheme,\n           automaticallyImplyLeading: automaticallyImplyLeading,\n           title: title,\n           titleTextStyle: titleTextStyle,\n           centerTitle: centerTitle,\n           actions: actions,\n           actionsIconTheme: actionsIconTheme,\n           elevation: elevation,\n           toolbarHeight: toolbarHeight,\n           toolbarOpacity: toolbarOpacity,\n           backgroundColor: backgroundColor,\n           shadowColor: shadowColor,\n           systemOverlayStyle: SystemUiOverlayStyle(\n             statusBarColor: statusBarColor, <span class=\"hljs-comment\">\/\/ Status bar only for android.<\/span>\n           ),\n           shape: shapeBorder),\n     ),\n   );\n }\n\n\n @override\n Size get preferredSize =&gt; Size.fromHeight(toolbarHeight);\n}\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Make sure you add the <b>export &#8216;mi_app_bar_widget.dart&#8217;;<\/b> line in your mi_flutter_package.dart file. By doing this you will make the contents of the specified file (mi_app_bar_widget.dart in this case) available for use in other parts of your application.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\"><span class=\"hljs-keyword\">export<\/span> <span class=\"hljs-string\">'mi_app_bar_widget.dart'<\/span>;<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p><b>Important:<\/b><span style=\"font-weight: 400;\"> When developing custom widgets within your package, ensure that you export these files. This action enables other applications utilizing your package to access and use these custom widgets.<\/span><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/mobisoftinfotech.com\/resources\/blog\/how-to-add-flutter-screens-to-native-app\"><noscript><img decoding=\"async\" width=\"855\" height=\"150\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/09\/inline-cta-1.webp\" alt=\"How to Add Screens Designed in Flutter into Your Native App\" class=\"wp-image-29106\" srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/09\/inline-cta-1.webp 855w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/09\/inline-cta-1-300x53.webp 300w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/09\/inline-cta-1-768x135.webp 768w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/09\/inline-cta-1-640x112.webp 640w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/09\/inline-cta-1-150x26.webp 150w\" sizes=\"(max-width: 855px) 100vw, 855px\"><\/noscript><img decoding=\"async\" width=\"855\" height=\"150\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20855%20150%22%3E%3C%2Fsvg%3E\" alt=\"How to Add Screens Designed in Flutter into Your Native App\" class=\"wp-image-29106 lazyload\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20855%20150%22%3E%3C%2Fsvg%3E 855w\" sizes=\"(max-width: 855px) 100vw, 855px\" data-srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/09\/inline-cta-1.webp 855w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/09\/inline-cta-1-300x53.webp 300w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/09\/inline-cta-1-768x135.webp 768w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/09\/inline-cta-1-640x112.webp 640w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/09\/inline-cta-1-150x26.webp 150w\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/09\/inline-cta-1.webp\"><\/a><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><span style=\"font-weight: 400;\"><strong>Step 3: Adding Example Application to Our Package<\/strong><\/span><\/h2>\n\n\n\n<p><span style=\"font-weight: 400;\">To create an Example application within your package, go to your command line interface and root project folder and run the command mentioned below:<\/span><\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">flutter create example<\/code><\/span><\/pre>\n\n\n<p><span style=\"font-weight: 400;\">This command will create a Flutter example app within your package folder.<\/span><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span style=\"font-weight: 400;\"><strong>Step 4: Using MIAppBarWidget in the Example App<\/strong><\/span><\/h2>\n\n\n\n<p><span style=\"font-weight: 400;\">&#8211; Add this package to your example app, <\/span><span style=\"font-weight: 400;\">go to your pubspec.yaml file under example app add <\/span><b>mi_flutter_package <\/b><span style=\"font-weight: 400;\">under dependencies.<\/span><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><span style=\"font-weight: 400;\">If you&#8217;re using the terminal, execute the command `flutter pub get`.<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">In VS Code, simply click on &#8220;Get Packages&#8221; found on the right side of the action ribbon at the top of your `pubspec.yaml` file. This is represented by a Download icon.<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">If you&#8217;re working in Android Studio\/IntelliJ, navigate to the action ribbon at the top of your `pubspec.yaml` file and select &#8220;Pub get&#8221; to retrieve the necessary packages.<\/span><\/li>\n<\/ul>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">dependencies:\n  flutter:\n    sdk: flutter\n  mi_flutter_package:\n    path: ..\/\n<\/code><\/span><\/pre>\n\n\n<p><span style=\"font-weight: 400;\">&#8211; <\/span><span style=\"font-weight: 400;\">Add MIAppWidget in your example app. Here is how our updated AppBar code looks like &#8211;<\/span><\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">Scaffold(\n    appBar: MIAppBarWidget(\n      automaticallyImplyLeading: <span class=\"hljs-literal\">true<\/span>,\n      <span class=\"hljs-attr\">title<\/span>: <span class=\"hljs-keyword\">const<\/span> Text(\n        <span class=\"hljs-string\">\"MI AppBar\"<\/span>,\n        <span class=\"hljs-attr\">style<\/span>: TextStyle(color: Colors.white),\n      ),\n      <span class=\"hljs-attr\">toolbarHeight<\/span>: <span class=\"hljs-number\">56<\/span>,\n      <span class=\"hljs-attr\">leadingWidth<\/span>: <span class=\"hljs-number\">50<\/span>,\n      <span class=\"hljs-attr\">centerTitle<\/span>: <span class=\"hljs-literal\">true<\/span>,\n      <span class=\"hljs-attr\">backgroundColor<\/span>: Colors.blue,\n      <span class=\"hljs-attr\">statusBarColor<\/span>: Colors.blueGrey,\n      <span class=\"hljs-attr\">elevation<\/span>: <span class=\"hljs-number\">10<\/span>,\n      <span class=\"hljs-attr\">shadowColor<\/span>: Colors.black,\n      <span class=\"hljs-comment\">\/\/sideMargin: 10,<\/span>\n      <span class=\"hljs-attr\">shapeBorder<\/span>: <span class=\"hljs-keyword\">const<\/span> RoundedRectangleBorder(\n        borderRadius: BorderRadius.only(\n          bottomRight: Radius.circular(<span class=\"hljs-number\">10<\/span>),\n          <span class=\"hljs-attr\">bottomLeft<\/span>: Radius.circular(<span class=\"hljs-number\">10<\/span>),\n        ),\n      ),\n      <span class=\"hljs-attr\">onBackButtonTapped<\/span>: (BuildContext context) {},\n    ),\n  );\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h2 class=\"wp-block-heading\"><span style=\"font-weight: 400;\"><strong>Step 5: Running Example App in iOS\/Android Simulator\/Emulator<\/strong><\/span><\/h2>\n\n\n\n<p><span style=\"font-weight: 400;\">If you can\u2019t see any simulator or emulator option to run your code in Android Studio, Please follow the steps mentioned below.<\/span><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><span style=\"font-weight: 400;\">Click on Add Configuration -&gt; Add New Configuration -&gt; Fluter<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">Enter \u2018Name\u2019 as main<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">For Dart Entrypoint -&gt; Select the path of the main.dart file in your example app<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">Click on Apply and press Ok<\/span><\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><noscript><img decoding=\"async\" width=\"1024\" height=\"690\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/09\/Screenshot-1024x690.webp\" alt=\"Running Example App\" class=\"wp-image-29134\" srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/09\/Screenshot-1024x690.webp 1024w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/09\/Screenshot-300x202.webp 300w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/09\/Screenshot-768x517.webp 768w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/09\/Screenshot-1536x1034.webp 1536w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/09\/Screenshot-2048x1379.webp 2048w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/09\/Screenshot-640x431.webp 640w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/09\/Screenshot-150x101.webp 150w\" sizes=\"(max-width: 1024px) 100vw, 1024px\"><\/noscript><img decoding=\"async\" width=\"1024\" height=\"690\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201024%20690%22%3E%3C%2Fsvg%3E\" alt=\"Running Example App\" class=\"wp-image-29134 lazyload\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201024%20690%22%3E%3C%2Fsvg%3E 1024w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" data-srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/09\/Screenshot-1024x690.webp 1024w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/09\/Screenshot-300x202.webp 300w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/09\/Screenshot-768x517.webp 768w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/09\/Screenshot-1536x1034.webp 1536w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/09\/Screenshot-2048x1379.webp 2048w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/09\/Screenshot-640x431.webp 640w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/09\/Screenshot-150x101.webp 150w\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/09\/Screenshot-1024x690.webp\"><\/figure>\n\n\n\n<p><span style=\"font-weight: 400;\">We\u2019re all set! You can now run the application and Voila!<\/span><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><noscript><img decoding=\"async\" width=\"855\" height=\"400\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/09\/Simulator-screen.png\" alt=\"Simulator\" class=\"wp-image-29142\" srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/09\/Simulator-screen.png 855w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/09\/Simulator-screen-300x140.png 300w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/09\/Simulator-screen-768x359.png 768w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/09\/Simulator-screen-640x299.png 640w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/09\/Simulator-screen-150x70.png 150w\" sizes=\"(max-width: 855px) 100vw, 855px\"><\/noscript><img decoding=\"async\" width=\"855\" height=\"400\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20855%20400%22%3E%3C%2Fsvg%3E\" alt=\"Simulator\" class=\"wp-image-29142 lazyload\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20855%20400%22%3E%3C%2Fsvg%3E 855w\" sizes=\"(max-width: 855px) 100vw, 855px\" data-srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/09\/Simulator-screen.png 855w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/09\/Simulator-screen-300x140.png 300w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/09\/Simulator-screen-768x359.png 768w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/09\/Simulator-screen-640x299.png 640w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/09\/Simulator-screen-150x70.png 150w\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/09\/Simulator-screen.png\"><\/figure>\n\n\n\n<p><span style=\"font-weight: 400;\">We have now successfully integrated <\/span>mi_flutter_package<span style=\"font-weight: 400;\"> in our example application.<\/span><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span style=\"font-weight: 400;\"><strong>Step 6: Using your Flutter Package in Other Applications<\/strong><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><b>Adding mi_flutter_package locally in your other flutter applications:<\/b><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">For adding&nbsp; <\/span><code>mi_flutter_package<\/code> <span style=\"font-weight: 400;\">to your application, Go to your application\u2019s pubsec.yaml file and add it<\/span> <span style=\"font-weight: 400;\">under dependencies.<\/span><\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">mi_flutter_package:\n<\/code><\/span><\/pre>\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">path: <span class=\"hljs-regexp\">\/Users\/<\/span>..\/mi_flutter_package\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-4\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p><span style=\"font-weight: 400;\">Above, <\/span>mi_flutter_package<span style=\"font-weight: 400;\"> is defined as a dependency in a pubspec.yaml file. It&#8217;s specified as a local dependency, which means that the package will be fetched from the local path located at the provided path (\/Users\/..\/mi_flutter_package)<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><b>Adding mi_flutter_package in your flutter applications via private Git Repository:<\/b><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">For adding&nbsp; <\/span><b>mi_flutter_package <\/b><span style=\"font-weight: 400;\">to your application, Go to your application\u2019s pubsec.yaml file and add it<\/span> <span style=\"font-weight: 400;\">under dependencies.<\/span><\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">mi_flutter_package:\n  git:\n    url: git@gitlab.com:flutter_package\/miflutterpackage.git\n    ref: main\n<\/code><\/span><\/pre>\n\n\n<p><span style=\"font-weight: 400;\">Above, mi_flutter_package is defined as a dependency in a pubspec.yaml file. It&#8217;s specified as a Git dependency, which means that the package will be fetched from the Git repository located at the provided URL (git@gitlab.com:flutter_package\/miflutterpackage.git). The ref property specifies the branch or commit reference (in this case, main) to use from the Git repository. This allows the Flutter project to pull in the code and assets from the specified Git repository and use them within the project.<\/span><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span style=\"font-weight: 400;\"><strong>Step 7: Publish your Package to pub.dev<\/strong><\/span><\/h2>\n\n\n\n<p><span style=\"font-weight: 400;\">To publish your package on pub.dev, you&#8217;ll need to use the <\/span><b>pub<\/b><span style=\"font-weight: 400;\"> command-line tool, which is the Dart package manager.&nbsp;<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Open your terminal and navigate to your package&#8217;s directory.<\/span><\/p>\n\n\n\n<p><b>&#8211; Login to Pub.dev:<\/b><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Before you can publish, you need to authenticate with your pub.dev account using the following command:<\/span><\/p>\n\n\n\n<p><b>pub login<\/b><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Follow the prompts to log in with your Dart\/Google account.<\/span><\/p>\n\n\n\n<p><b>&#8211; Publish Your Package: <\/b><span style=\"font-weight: 400;\">To publish your package, use the following command:<\/span><\/p>\n\n\n\n<p><b>pub publish &#8211;dry-run<\/b><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">The &#8211;dry-run flag allows you to check if your package can be successfully published without actually publishing it. It&#8217;s a good practice to use this flag first to catch any issues. If the dry run is successful, remove the &#8211;dry-run flag and publish your package:<\/span><\/p>\n\n\n\n<p><b>pub publish<\/b><\/p>\n\n\n\n<p><b>Verify the Publish: <\/b><span style=\"font-weight: 400;\">After publishing, visit <a href=\"https:\/\/pub.dev\/\" rel=\"nofollow noopener\">pub.dev<\/a> to make sure your package is listed correctly. You can search for your package by name to find it.<\/span><\/p>\n\n\n\n<p><b>Note:<\/b><span style=\"font-weight: 400;\"> Make sure your `<\/span><b>pubspec.yaml<\/b><span style=\"font-weight: 400;\">` file is correctly filled out. It should include essential information about your package, such as name, version, description, author, and dependencies.<\/span><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span style=\"font-weight: 400;\"><strong>Summing It Up<\/strong><\/span><\/h2>\n\n\n\n<p><span style=\"font-weight: 400;\">I hope you enjoyed this tutorial on Creating Packages for Flutter. To download the code for this app, please <a href=\"https:\/\/mobisoftinfotech.com\/assets\/images\/blog\/flutter-package\/mi_flutter_package.zip\" download>click here<\/a>.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Flutter packages are essential tools for developers, fostering collaboration and efficiency. With this guide, you&#8217;re now well-prepared to create and use packages effectively. By sharing your code or leveraging existing packages, you can streamline your <\/span><a href=\"https:\/\/mobisoftinfotech.com\/services\/flutter-app-development-company\"><span style=\"font-weight: 400;\">Flutter development<\/span><\/a><span style=\"font-weight: 400;\"> process and deliver an intuitive user experience. If you have any questions or feedback, don&#8217;t hesitate to reach out. We&#8217;re here to help you enhance the performance of your Flutter app.<\/span><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/mobisoftinfotech.com\/contact-us?utm_source=blog&amp;utm_medium=referral&amp;utm_campaign=how-to-create-packages-for-flutter-a-developers-guide-cta1\"><noscript><img decoding=\"async\" width=\"800\" height=\"340\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/01\/cta2.jpg\" alt class=\"wp-image-37665\"><\/noscript><img decoding=\"async\" width=\"800\" height=\"340\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20800%20340%22%3E%3C%2Fsvg%3E\" alt class=\"wp-image-37665 lazyload\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/01\/cta2.jpg\"><\/a><\/figure>\n\n\n<div class=\"modern-author-card\">\n    <div class=\"author-card-content\">\n        <div class=\"author-info-section\">\n            <div class=\"author-avatar\">\n                <noscript><img decoding=\"async\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/08\/prashant.png\" alt=\"Prashant Telangi\"><\/noscript><img decoding=\"async\" src=\"data:image\/gif;base64,R0lGODlhAQABAIAAAAAAAP\/\/\/yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" alt=\"Prashant Telangi\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/08\/prashant.png\" class=\" lazyload\">\n            <\/div>\n            <div class=\"author-details\">\n                <h3 class=\"author-name\">Prashant Telangi<\/h3>\n                <p class=\"author-title\">Head of Technology, Mobile<\/p>\n                <a href=\"javascript:void(0);\" class=\"read-more-link read-more-btn\" onclick=\"toggleAuthorBio(this); return false;\">Read more <noscript><img decoding=\"async\" src=\"\/assets\/images\/blog\/Vector.png\" alt=\"expand\" class=\"read-more-arrow down-arrow\"><\/noscript><img decoding=\"async\" src=\"data:image\/gif;base64,R0lGODlhAQABAIAAAAAAAP\/\/\/yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" alt=\"expand\" class=\"read-more-arrow down-arrow lazyload\" data-src=\"\/assets\/images\/blog\/Vector.png\"><\/a>\n                <div class=\"author-bio-expanded\">\n                    <p>Prashant Telangi brings over 15 years of experience in Mobile Technology, He is currently serving as Head of Technology, Mobile at <a href=\"https:\/\/mobisoftinfotech.com\" target=\"_blank\">Mobisoft Infotech<\/a>. With a proven history in IT and services, he is a skilled, passionate developer specializing in Mobile Applications. His strong engineering background underscores his commitment to crafting innovative solutions in the ever-evolving tech landscape.<\/p>\n                    <div class=\"author-social-links\"><div class=\"social-icon\"><a href=\"https:\/\/www.linkedin.com\/in\/prashant-telangi-83816918\/\" target=\"_blank\" rel=\"nofollow noopener\"><i class=\"icon-sprite linkedin\"><\/i><\/a>\n                     <a href=\"https:\/\/twitter.com\/PrashantAnna\" target=\"_blank\" rel=\"nofollow noopener\"><i class=\"icon-sprite twitter\"><\/i><\/a>\n                     <a href=\"https:\/\/www.facebook.com\/prashant.telangi\/\" target=\"_blank\" rel=\"nofollow noopener\"><i class=\"icon-sprite facebook\"><\/i><\/a><\/div><\/div>\n                    <a href=\"javascript:void(0);\" class=\"read-more-link read-less-btn\" onclick=\"toggleAuthorBio(this); return false;\" style=\"display: none;\">Read less <noscript><img decoding=\"async\" src=\"\/assets\/images\/blog\/Vector.png\" alt=\"collapse\" class=\"read-more-arrow up-arrow\"><\/noscript><img decoding=\"async\" src=\"data:image\/gif;base64,R0lGODlhAQABAIAAAAAAAP\/\/\/yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" alt=\"collapse\" class=\"read-more-arrow up-arrow lazyload\" data-src=\"\/assets\/images\/blog\/Vector.png\"><\/a>\n                <\/div>\n            <\/div>\n        <\/div>\n        <div class=\"share-section\">\n            <span class=\"share-label\">Share Article<\/span>\n            <div class=\"social-share-buttons\">\n                <a href=\"https:\/\/www.facebook.com\/sharer\/sharer.php?u=https%3A%2F%2Fmobisoftinfotech.com%2Fresources%2Fblog%2Fhow-to-create-packages-for-flutter-a-developers-guide\" target=\"_blank\" class=\"share-btn facebook-share\"><i class=\"fa fa-facebook-f\"><\/i><\/a>\n                <a href=\"https:\/\/www.linkedin.com\/sharing\/share-offsite\/?url=https%3A%2F%2Fmobisoftinfotech.com%2Fresources%2Fblog%2Fhow-to-create-packages-for-flutter-a-developers-guide\" target=\"_blank\" class=\"share-btn linkedin-share\"><i class=\"fa fa-linkedin\"><\/i><\/a>\n            <\/div>\n        <\/div>\n    <\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Flutter packages are a powerful way to share and reuse code in your Flutter projects. Whether you want to contribute to the Flutter community or streamline your Flutter app development process, creating Flutter packages is the key.&nbsp; In this post, I will take you through the process of creating Flutter packages, from setting up your [&hellip;]<\/p>\n","protected":false},"author":15,"featured_media":29104,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_s2mail":"","footnotes":""},"categories":[286],"tags":[3964,1808,3434,3961,3962,3963,3965],"class_list":["post-29100","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-dart-package","tag-flutter-app-development","tag-flutter-developers","tag-flutter-framework","tag-flutter-package","tag-flutter-packages","tag-pub-dev"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Create Packages for Flutter: A Developer\u2019s Guide<\/title>\n<meta name=\"description\" content=\"Learn how to create Flutter packages effectively in this practical developer&#039;s guide. Streamline your Flutter app development process using these simple steps.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/mobisoftinfotech.com\/resources\/blog\/how-to-create-packages-for-flutter-a-developers-guide\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Create Packages for Flutter: A Developer\u2019s Guide\" \/>\n<meta property=\"og:description\" content=\"Learn how to create Flutter packages effectively in this practical developer&#039;s guide. Streamline your Flutter app development process using these simple steps.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/mobisoftinfotech.com\/resources\/blog\/how-to-create-packages-for-flutter-a-developers-guide\" \/>\n<meta property=\"og:site_name\" content=\"Mobisoft Infotech\" \/>\n<meta property=\"article:published_time\" content=\"2023-09-18T06:07:13+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-03-11T13:00:16+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/09\/og-How-to-Create-Packages-for-Flutter.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"525\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Prashant Telangi\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/09\/og-How-to-Create-Packages-for-Flutter.png\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Prashant Telangi\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/how-to-create-packages-for-flutter-a-developers-guide#article\",\"isPartOf\":{\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/how-to-create-packages-for-flutter-a-developers-guide\"},\"author\":{\"name\":\"Prashant Telangi\",\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/#\/schema\/person\/d7a32c3195dc5efe2829391045ffc070\"},\"headline\":\"How to Create Packages for Flutter: A Developer\u2019s Guide\",\"datePublished\":\"2023-09-18T06:07:13+00:00\",\"dateModified\":\"2026-03-11T13:00:16+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/how-to-create-packages-for-flutter-a-developers-guide\"},\"wordCount\":1471,\"image\":{\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/how-to-create-packages-for-flutter-a-developers-guide#primaryimage\"},\"thumbnailUrl\":\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/09\/How-to-Create-Packages-for-Flutter.webp\",\"keywords\":[\"dart package\",\"Flutter app development\",\"flutter developers\",\"flutter framework\",\"flutter package\",\"flutter packages\",\"pub.dev\"],\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/how-to-create-packages-for-flutter-a-developers-guide\",\"url\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/how-to-create-packages-for-flutter-a-developers-guide\",\"name\":\"How to Create Packages for Flutter: A Developer\u2019s Guide\",\"isPartOf\":{\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/how-to-create-packages-for-flutter-a-developers-guide#primaryimage\"},\"image\":{\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/how-to-create-packages-for-flutter-a-developers-guide#primaryimage\"},\"thumbnailUrl\":\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/09\/How-to-Create-Packages-for-Flutter.webp\",\"datePublished\":\"2023-09-18T06:07:13+00:00\",\"dateModified\":\"2026-03-11T13:00:16+00:00\",\"author\":{\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/#\/schema\/person\/d7a32c3195dc5efe2829391045ffc070\"},\"description\":\"Learn how to create Flutter packages effectively in this practical developer's guide. Streamline your Flutter app development process using these simple steps.\",\"breadcrumb\":{\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/how-to-create-packages-for-flutter-a-developers-guide#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/mobisoftinfotech.com\/resources\/blog\/how-to-create-packages-for-flutter-a-developers-guide\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/how-to-create-packages-for-flutter-a-developers-guide#primaryimage\",\"url\":\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/09\/How-to-Create-Packages-for-Flutter.webp\",\"contentUrl\":\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/09\/How-to-Create-Packages-for-Flutter.webp\",\"width\":855,\"height\":392,\"caption\":\"How to Create Packages for Flutter\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/how-to-create-packages-for-flutter-a-developers-guide#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/mobisoftinfotech.com\/resources\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Create Packages for Flutter: A Developer\u2019s Guide\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/#website\",\"url\":\"https:\/\/mobisoftinfotech.com\/resources\/\",\"name\":\"Mobisoft Infotech\",\"description\":\"Discover Mobility\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/mobisoftinfotech.com\/resources\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/#\/schema\/person\/d7a32c3195dc5efe2829391045ffc070\",\"name\":\"Prashant Telangi\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/cdde432a920f6002154a0769008dfecabe1f464d11187612020b889ad41808e7?s=96&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/cdde432a920f6002154a0769008dfecabe1f464d11187612020b889ad41808e7?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/cdde432a920f6002154a0769008dfecabe1f464d11187612020b889ad41808e7?s=96&r=g\",\"caption\":\"Prashant Telangi\"},\"sameAs\":[\"http:\/\/www.mobisoftinfotech.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Create Packages for Flutter: A Developer\u2019s Guide","description":"Learn how to create Flutter packages effectively in this practical developer's guide. Streamline your Flutter app development process using these simple steps.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/mobisoftinfotech.com\/resources\/blog\/how-to-create-packages-for-flutter-a-developers-guide","og_locale":"en_US","og_type":"article","og_title":"How to Create Packages for Flutter: A Developer\u2019s Guide","og_description":"Learn how to create Flutter packages effectively in this practical developer's guide. Streamline your Flutter app development process using these simple steps.","og_url":"https:\/\/mobisoftinfotech.com\/resources\/blog\/how-to-create-packages-for-flutter-a-developers-guide","og_site_name":"Mobisoft Infotech","article_published_time":"2023-09-18T06:07:13+00:00","article_modified_time":"2026-03-11T13:00:16+00:00","og_image":[{"width":1000,"height":525,"url":"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/09\/og-How-to-Create-Packages-for-Flutter.png","type":"image\/png"}],"author":"Prashant Telangi","twitter_card":"summary_large_image","twitter_image":"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/09\/og-How-to-Create-Packages-for-Flutter.png","twitter_misc":{"Written by":"Prashant Telangi","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/how-to-create-packages-for-flutter-a-developers-guide#article","isPartOf":{"@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/how-to-create-packages-for-flutter-a-developers-guide"},"author":{"name":"Prashant Telangi","@id":"https:\/\/mobisoftinfotech.com\/resources\/#\/schema\/person\/d7a32c3195dc5efe2829391045ffc070"},"headline":"How to Create Packages for Flutter: A Developer\u2019s Guide","datePublished":"2023-09-18T06:07:13+00:00","dateModified":"2026-03-11T13:00:16+00:00","mainEntityOfPage":{"@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/how-to-create-packages-for-flutter-a-developers-guide"},"wordCount":1471,"image":{"@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/how-to-create-packages-for-flutter-a-developers-guide#primaryimage"},"thumbnailUrl":"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/09\/How-to-Create-Packages-for-Flutter.webp","keywords":["dart package","Flutter app development","flutter developers","flutter framework","flutter package","flutter packages","pub.dev"],"articleSection":["Blog"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/how-to-create-packages-for-flutter-a-developers-guide","url":"https:\/\/mobisoftinfotech.com\/resources\/blog\/how-to-create-packages-for-flutter-a-developers-guide","name":"How to Create Packages for Flutter: A Developer\u2019s Guide","isPartOf":{"@id":"https:\/\/mobisoftinfotech.com\/resources\/#website"},"primaryImageOfPage":{"@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/how-to-create-packages-for-flutter-a-developers-guide#primaryimage"},"image":{"@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/how-to-create-packages-for-flutter-a-developers-guide#primaryimage"},"thumbnailUrl":"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/09\/How-to-Create-Packages-for-Flutter.webp","datePublished":"2023-09-18T06:07:13+00:00","dateModified":"2026-03-11T13:00:16+00:00","author":{"@id":"https:\/\/mobisoftinfotech.com\/resources\/#\/schema\/person\/d7a32c3195dc5efe2829391045ffc070"},"description":"Learn how to create Flutter packages effectively in this practical developer's guide. Streamline your Flutter app development process using these simple steps.","breadcrumb":{"@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/how-to-create-packages-for-flutter-a-developers-guide#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/mobisoftinfotech.com\/resources\/blog\/how-to-create-packages-for-flutter-a-developers-guide"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/how-to-create-packages-for-flutter-a-developers-guide#primaryimage","url":"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/09\/How-to-Create-Packages-for-Flutter.webp","contentUrl":"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/09\/How-to-Create-Packages-for-Flutter.webp","width":855,"height":392,"caption":"How to Create Packages for Flutter"},{"@type":"BreadcrumbList","@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/how-to-create-packages-for-flutter-a-developers-guide#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/mobisoftinfotech.com\/resources\/"},{"@type":"ListItem","position":2,"name":"How to Create Packages for Flutter: A Developer\u2019s Guide"}]},{"@type":"WebSite","@id":"https:\/\/mobisoftinfotech.com\/resources\/#website","url":"https:\/\/mobisoftinfotech.com\/resources\/","name":"Mobisoft Infotech","description":"Discover Mobility","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/mobisoftinfotech.com\/resources\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/mobisoftinfotech.com\/resources\/#\/schema\/person\/d7a32c3195dc5efe2829391045ffc070","name":"Prashant Telangi","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/cdde432a920f6002154a0769008dfecabe1f464d11187612020b889ad41808e7?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/cdde432a920f6002154a0769008dfecabe1f464d11187612020b889ad41808e7?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cdde432a920f6002154a0769008dfecabe1f464d11187612020b889ad41808e7?s=96&r=g","caption":"Prashant Telangi"},"sameAs":["http:\/\/www.mobisoftinfotech.com"]}]}},"_links":{"self":[{"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/posts\/29100","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/users\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/comments?post=29100"}],"version-history":[{"count":32,"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/posts\/29100\/revisions"}],"predecessor-version":[{"id":47560,"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/posts\/29100\/revisions\/47560"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/media\/29104"}],"wp:attachment":[{"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/media?parent=29100"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/categories?post=29100"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/tags?post=29100"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}