This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| flutter pub run intl_translation:extract_to_arb --output-dir=i18n/messages i18n.dart | |
| # After this, 1 arb file will be generated per locale in i18n/messages |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // for intl_zh.arb | |
| "awesomeNewMessage": "一条新信息", | |
| "@awesomeNewMessage": { | |
| "description": "新信息例子", | |
| "type": "text" | |
| } | |
| // for intl_en.arb | |
| "awesomeNewMessage": "An awesome new message", | |
| "@awesomeNewMessage": { | |
| "description": "Example for how to add a new message", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| flutter pub run intl_translation:generate_from_arb --output-dir=i18n/wrappers i18n.dart i18n/messages/*.arb | |
| # After this more wrapper dart code will be generated in the wrappers directory |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| String get title { | |
| return Intl.message( | |
| 'Mini Donkey', | |
| name: 'title', | |
| desc: 'Title for the application', | |
| locale: localeName, | |
| ); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class PhotoChatApp extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return ChangeNotifierProvider<AppContext>( | |
| create: (context) => | |
| AppContext(appRunningStateOverride: this.appRunningState), | |
| child: MaterialApp( | |
| title: 'Mini Donkey', | |
| localizationsDelegates: [ | |
| AppLocalizationsDelegate(), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class HomeScreen extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return Scaffold( | |
| appBar: AppBar( | |
| title: Text(AppLocalizations.of(context).title), | |
| ), | |
| ); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| default_platform(:android) | |
| platform :android do | |
| lane :internal do | |
| gradle(task: 'bundle', build_type: 'Release') | |
| upload_to_play_store(track: 'internal', aab: 'path/to/your/app.aab') | |
| end | |
| lane :alpha do | |
| gradle(task: 'bundle', build_type: 'Release') | |
| upload_to_play_store(track: 'internal', track_promote_to: 'alpha') | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: release android app | |
| on: | |
| release: | |
| types: | |
| - "published" | |
| - "prereleased" | |
| push: | |
| branches: | |
| - "master" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| jobs: | |
| release-android: | |
| name: release android app | |
| runs-on: ubuntu-latest | |
| steps: | |
| - ... | |
| - name: release app to internal track | |
| if: contains(github.event_name,'push') | |
| run: bundle exec fastlane internal | |
| - name: promote to alpha track |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| jobs: | |
| release-android: | |
| name: release android app | |
| runs-on: ubuntu-latest | |
| steps: | |
| - ... | |
| - name: promote to beta track | |
| if: contains(github.event_name,'release')&&(github.event.release.prerelease) | |
| run: bundle exec fastlane beta | |
| - ... |