Personal profile website developed by ChunhThanhDe - a software engineer, flutter developer
Show some ❤️ and star ⭐ the repo if you liked it.
contact for work, mail: chunhthanhde.dev@gmail.com
Alternatively, run flutter run
and code generation will take place automatically.
To use the latest translation changes, you will need to generate them:
- add a new Folder in
i18n
for each supported locale.
├── 1i8n
│ ├── vi
│ │ └── en
- Add the translated strings to each
.json
file:
en/about.json
{
"name": "Chung Nguyen Thanh",
"aboutMe": "As a skilled software developer..."
}
- Configure slang.yam file:
base_locale: vi
input_directory: i18n
input_file_pattern: .json
output_directory: lib/generated
output_file_name: translations.g.dart
output_format: single_file
translate_var: texts
string_interpolation: double_braces
namespaces: true
- Generate localizations for the current project:
To use the latest translation changes, you will need to generate them:
dart run slang build --delete-conflicting-outputs
I use Peanut via https://github.com/kevmoo/peanut.dart.
It's a tool that makes the application build and update/create a gh-pages branch.
In my case, I had to follow these steps
- Install peanut
flutter pub global activate peanut
- Run the peanut command line with one extra parameter, because my repository will be available at https://ChunhThanhDe.github.io/flutter_web/, which is different than the default that is /, that's why do I need to give this base-href extra parameter too
flutter pub global run peanut --extra-args "--base-href=/flutter_web/"
- In the end it will show that the gh-pages branch construction was completely successful, but you need to sync it in git.
git push -f origin --set-upstream gh-pages
- Go into your repository -> Settings -> Pages and select the branch you want to build your GitHub page
See details here: https://dev.to/rodrigocastro_o/publishing-your-flutter-apps-into-github-pages-1l61