First of all, once your showcase deployed to production, you can share it to the world via:
-
Android app
-
Web Direct Link
For example, you can share the following URL for the material_design_showcase module: https://www.fluwix.com/material_design_showcase
-
Embed HTML (The way I shared in my blog)
Please see the following steps to showcase your fantastic widget in the Fluwix:
-
Fork the fluwix repo and clone it to your local working directory
git clone [email protected]:limcheekin/fluwix.git
-
Create a branch for your showcase with the following command:
git checkout -b <branch_name>
Think twice about the
branch_name
. As per naming convention, the name ofbranch_name
,module_name
androute_name
must be same. Theroute_name
is for navigation purpose, I will elaborate more later. Let's called the name of the showcase asfantastic_widget
. -
Run the following command in the fluwix directory:
flutter pub run module_starter <module_name>
-
Update the
FantasticWidgetWidget
class with your showcase code in thelib/fantastic_widget_screen.dart
file. -
Update the
README.md
file in the module directory to describe the showcase. Then, add aLICENSE
file for licensing information of the showcase. By the way, these two files can be located in your own GitHub repository instead of the module directory, please see material_design_showcase for example.- README.md: Support standard Markdown syntax only, inline HTML not supported, please see flutter_markdown package for more information. All URLs must be an absolute URL, for example https://github.com/limcheekin/fluwix/raw/showcase_view/showcase_view/images/screenshots.gif.
- LICENSE: must be a plain text file.
-
In the module directory, run
flutter analyze
, then fix all reported coding issues. -
Test the module by running module's
lib/main.dart
, if the module running fine, you can "link" the module to the project's pubspec.yaml file with the following configurations:fantastic_widget: path: fantastic_widget
Then, add the showcase to main listing screen by append the following code to
routes
in main.dart file and resolve the import error ofFantasticWidgetScreen
class:ChildRoute('/fantastic_widget', child: (_, __) => FantasticWidgetScreen()),
-
Finally, the module integration is completed. Execute the project's
main.dart
file to test your showcase. Everything seems working fine? Great! Your showcase is ready to go live, push the changes to remote repository and send me pull request.