photobooth:实践指南
真正理解photobooth,要从它处理的任务开始:Google I/O 2021 Photo Booth 使用 Flutter 和 Firebase 构建。把它放到日常自动化流程中,最容易暴露的是输入边界、依赖和失败处理如果不清楚就很难稳定复用,不能只看演示是否顺利。与其反复读介绍,不如用一项范围明确的真实任务完成最小试跑,再依据配置时间、输出质量、异常信息和维护痕迹做取舍。我会把它列入愿意先做小范围验证并复查原始文档的团队的候选清单,而不是仅凭项目介绍直接纳入生产。
I/O 照相亭
[![io_photobooth][build_status_badge]][workflow_link]
![style: very good analysis][very_good_analysis_badge] [![License: MIT][license_badge]][license_link]
A Photo Booth built with Flutter and Firebase for Google I/O 2021.
Try it now and learn about how it's made.
Built by Very Good Ventures in partnership with Google
Created using Very Good CLI
Getting Started
To run the desired project either use the launch configuration in VSCode/Android Studio or use the following commands:
$ flutter run -d chrome
*I/O Photo Booth works on Web.
Running Tests
To run all unit and widget tests use the following command:
$ flutter test --coverage --test-randomize-ordering-seed random
To view the generated coverage report you can use lcov.
# Generate Coverage Report
$ genhtml coverage/lcov.info -o coverage/
# Open Coverage Report
$ open coverage/index.html
使用翻译
该项目依赖于 flutter_localizations 并遵循 Flutter 官方国际化指南。
添加字符串
- 要添加新的本地化字符串,请打开位于
lib/l10n/arb/app_en.arb的app_en.arb文件。
{
"@@locale": "en",
"counterAppBarTitle": "Counter",
"@counterAppBarTitle": {
"description": "Text shown in the AppBar of the Counter Page"
}
}
- 然后添加新的key/value和描述
{
"@@locale": "en",
"counterAppBarTitle": "Counter",
"@counterAppBarTitle": {
"description": "Text shown in the AppBar of the Counter Page"
},
"helloWorld": "Hello World",
"@helloWorld": {
"description": "Hello World Text"
}
}
- 使用新字符串
import 'package:io_photobooth/l10n/l10n.dart';
@override
Widget build(BuildContext context) {
final l10n = context.l10n;
return Text(l10n.helloWorld);
}
添加翻译
- 对于每个受支持的区域设置,在
lib/l10n/arb中添加新的 ARB 文件。
├── l10n
│ ├── arb
│ │ ├── app_en.arb
│ │ └── app_es.arb
- 将翻译后的字符串添加到每个
.arb文件中:
app_en.arb
{
"@@locale": "en",
"counterAppBarTitle": "Counter",
"@counterAppBarTitle": {
"description": "Text shown in the AppBar of the Counter Page"
}
}
app_es.arb
{
"@@locale": "es",
"counterAppBarTitle": "Contador",
"@counterAppBarTitle": {
"description": "Texto mostrado en la AppBar de la página del contador"
}
}
-
09.10
hand-drawn-video-prompts:实践指南
-
09.10
ha-evcc:实践指南
-
09.10
Dex:实践指南
-
09.10
TrackMeNot:实践指南
-
09.10
tailscale-synology:实践指南
-
09.10
solo5:实践指南
-
- scala.rx:实践指南
- 09.10
-
- 32feet:实践指南
- 09.10
-
- winrarsc:实践指南
- 09.10
-
- seti-ui:实践指南
- 09.10
-
-
下载
- |
-
-
下载
- 《行尸走肉第一章》免安装中文汉化硬盘版下载
- 单机|436 MB
- 一款以动作冒险为主题的游戏
-
-
下载
- 《街头霸王X铁拳》免安装中文汉化硬盘版下载
- 单机|111MB
- 一款非常好玩的格斗游戏
-
-
下载
- |
-
-
下载
- 《暗黑破坏神3》免安装繁体中文正式版下载
- 单机|7630 MB
- 一款以角色扮演为主题的游戏
-
-
下载
- 《马克思佩恩3》免安装硬盘版下载
- 单机|27033 MB
- 一款以第三人称射击为主题的游戏