Skip to content

Latest commit

 

History

History
55 lines (39 loc) · 3.46 KB

SHOWCASE_YOUR_WIDGETS.md

File metadata and controls

55 lines (39 loc) · 3.46 KB

Steps To Showcase Your Widgets

First of all, once your showcase deployed to production, you can share it to the world via:

Please see the following steps to showcase your fantastic widget in the Fluwix:

  1. Fork the fluwix repo and clone it to your local working directory

    git clone [email protected]:limcheekin/fluwix.git
    
  2. 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 of branch_name, module_name and route_name must be same. The route_name is for navigation purpose, I will elaborate more later. Let's called the name of the showcase as fantastic_widget.

  3. Run the following command in the fluwix directory:

    flutter pub run module_starter <module_name>
    
  4. Update the FantasticWidgetWidget class with your showcase code in the lib/fantastic_widget_screen.dart file.

  5. Update the README.md file in the module directory to describe the showcase. Then, add a LICENSE 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.

  6. In the module directory, run flutter analyze, then fix all reported coding issues.

  7. 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 of FantasticWidgetScreen class:

    ChildRoute('/fantastic_widget', child: (_, __) => FantasticWidgetScreen()),
  8. 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.