Onehour
使用 Flutter 构建的时间跟踪应用。
屏幕
| 一级标题 | 二级标题 |
|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
技术栈
- Flutter
- Flutter Bloc with Hydrated Bloc
- Firebase
- Admob
特点
- 跟踪您所有任务的时间。
- 离线支持。
- 社交登录(Google、Facebook)
- 支持浅色和深色主题。
- 使用远程配置配置广告。
入门
- Fork 仓库,并在本地克隆您的 fork
- 安装 Flutter 1.7.8
- 安装 Android Studio / IntelliJ / VSCode
- 准备 Android 发布
- 准备 iOS 发布
项目构建
Android
缺少 Key.Properties 文件
如果您直接尝试构建项目,您将收到一个错误,抱怨缺少 key.properties 文件,并且来自 /Onehour-appp/android/gradlew app:properties: 的退出代码为 1。要解决此问题,
-
遵循本指南 生成 Keystor,然后将其移动到 Onehour-appp/android/app
-
打开 Onehour-appp/android 并创建一个新文件
key.properties,其中包含您的密钥信息
storePassword=STORE_PASSWORD
keyPassword=KEY_PASSWORD
keyAlias=key
storeFile=key.jks
-
为 Android 集成 Firebase
-
打开 AndroidManifest.xml 并将
ADMOB_ID替换为您的 ID。
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ADMOB_ID"/>
- 打开 strings.xml 并将
0000000000替换为您的 ID。
<!-- Replace "000000000000" with your Facebook App ID here. -->
<string name="facebook_app_id">000000000000</string>
<!--
Replace "000000000000" with your Facebook App ID here.
**NOTE**: The scheme needs to start with `fb` and then your ID.
-->
<string name="fb_login_protocol_scheme">fb000000000000</string>
iOS
-
为 iOS 集成 Firebase
-
打开 Info.plist,替换
REVERSED_CLIENT_ID,
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<!--
Replace "000000000000" with your Facebook App ID here.
**NOTE**: The scheme needs to start with `fb` and then your ID.
-->
<string>fb000000000000</string>
<!--Replace REVERSED_CLIENT_ID with your googleservice.plist REVERSED_CLIENT_ID-->
<string>REVERSED_CLIENT_ID</string>
</array>
</dict>
</array>
<!--Replace 000000000000 with your facebook app id-->
<key>FacebookAppID</key>
<string>000000000000</string>
<!--Replace FACEBOOK_DISPLAY_NAME with your facebook display name -->
<key>FacebookDisplayName</key>
<string>FACEBOOK_DISPLAY_NAME</string>
<!--Replace 00000ADMOB_ID0000000 with your admob id-->
<key>GADApplicationIdentifier</key>
<string>ADMOB_ID</string>







