The album
The design of Flutter Dojo
Flutter Dojo design approach — Build a sound open source project using Github
How to design Flutter Dojo – How to implement the Flutter screen animation
Flutter Dojo Design Approach — How to create a universal Playground
Flutter Dojo was intended to be a professional GitHub open source project from the very beginning.
A good GitHub open source project is not only a manifestation of the developer’s professional skills, but also a platform to show themselves. Professional GitHub open source project can attract more developers to participate in the collaborative development of the project, so that the project can be healthy and sustainable development.
Here’s how to build a good open source project with GitHub, based on my experience with Flutter Dojo.
Project Address:
Github.com/xuyisheng/f…
Personalized Personal homepage
The GitHub home page provides developers with a public display interface. You don’t need to set up a server to get a display page of your own for free, but this is one of GitHub’s extra features. First, you need to create a new Repository and name it your user name, as shown in the image above.
You’ll find that the repository of the same name is a GitHub egg, and you’ll just need to create your own home page in the readme.md Repo of the same name, such as mine, as shown in the figure below.
This page is actually presented in the readme.md mode, which is actually quite limited in functionality, but through
github-readme-stats
This project can also create some interesting things for the simple MD interface, such as GitHub Stats and project cards in my interface, using the Repo are written very clearly, you can build your own GitHub personal home page according to your needs.
Write the README. Md
A good README file is the basis of a good open source project. There are no requirements for the format of the README file, but just like writing an essay, I think a good README file should contain the following sections.
- The development experience and original intention of the project. Of course, this part is not necessary, just to give the developer a background on the project, so that everyone knows why the project is there.
- The functions and features of the project. This is important because GitHub is full of open source projects, and developers can easily tell what a project is about by looking at it, so introducing features and features is a great way to give other developers a first impression of your project.
- Access mode and use mode of the project. This is at the heart of enabling developers to use your open source project, and good access documentation can help developers feel good about the project.
- Figure. A picture is worth a thousand words. Open source projects must have some design diagrams, such as project screenshots, function display diagrams, flow charts, data flow diagrams and so on.
- CHANGELOG. CHANGELOG is an important tool for developers to maintain versions. A good version record enables users to understand the differences between different versions and understand the development process of projects.
The README for Flutter Dojo, while not perfect, basically covers the points I mentioned above for your reference.
The design of Flutter Dojo
Github shields
Shields are small ICONS displayed in README that are used in many open source projects, such as Shields in Dojo.
These shields are actually generated in SVG images. The following website is the creation website of Shields.
shields
This site makes it very easy to create interesting shields, for example enter the project address of Flutter Dojo and it will automatically generate suggested shields, as shown in the picture below.
You can display these links by Posting them directly into the README. The site is very powerful and can define a lot of Shields. Interested developers can match shields on the site.
Open source protocol selection
, the selection of open source license is an important part of open source projects, at home, may everyone on the understanding of open source licenses is not very deep, but in foreign countries, the constraints on open source licenses are very heavy, developers will spontaneously abide by source project open source licenses, borrow nguyen one picture here, simple to understand the types of open source licenses.
Build an automated CI using Github Action
GitHub Action is a very practical function, in our enterprise projects, CI is a very important part, it contains code review, submission, automatic compilation and other processes automation, and GitHub Action is such a simple CI function.
This feature is used in Flutter Dojo to automatically compile the latest Apk package after submitting a Tag.
Creating the Actions for your project is very simple. Just follow the instructions on the GitHub page. Here is a brief introduction to the Actions template for Flutter Dojo.
on: push: tags: - '*' name: Flutter dojo Release apk jobs: build: name: Build APK runs-on: ubuntu-latest steps: - uses: Actions /checkout@v2 - uses: Actions /[email protected] with: Java -version: '12.x' - uses: Subosito /[email protected] with: channel: 'stable' -run: flutter pub get-run: flutter build apk-name: Create a Release APK uses: ncipollo/release-action@v1 with: artifacts: "build/app/outputs/apk/release/*.apk" token: ${{ secrets.CI }}Copy the code
With GitHub Action, every time a Flutter Dojo is released, all you need to do is push a tag. The Action will trigger automatically and the corresponding Apk will be compiled.
According to the template provided by the official, it is very easy to complete the configuration of CI scripts. Basically, it is plug-in development. The corresponding functions can be completed by using the uses keyword to reference the relevant function of the Action plug-in.
GitHub also provides a marketplace for ready-made scripts, allowing most projects to quickly build their own script code by building blocks.
The official marketplace
Awesome – the actions by a third party
Flutter Dojo implements a complete development process using GitHub. In addition to the above mentioned parts, Dojo also creates a Wiki and an issue template. Wikis can manage more project description documents, and an issue template allows users to respond to problems easily. It also reduces the cost of communication between the developer and the feedback.
Of course, the Wiki is still being written, so the documentation is still in the process of being enriched. Flutter Dojo will be thoroughly analyzed at the rate of one article per week.
Feedback can choose from different issue templates and learn the information the developer needs to improve the issue and improve efficiency.
With all of this, Flutter Dojo is now a full-fledged GitHub open source project. Hopefully it will learn to fix bugs on its own soon.
Cultivate immortality
Since the Flutter Dojo is open source, it has been enjoyed by many Flutter learners and enthusiasts. More and more people have joined the Flutter study, so I started a Flutter community, but there were too many people. Therefore, there are three groups of “Guide to Flutter” [North] [East]. If you are interested in Flutter, you can add my wechat account and indicate that you want to join the Flutter group, or directly follow my wechat public account [Android Group English].
If you are interested, please add me to wechat [Tomcat_xu] and I will join you in the group.
Project Address:
Github.com/xuyisheng/f…