├── .gitignore
├── LICENSE
├── README.md
├── app
├── .gitignore
├── .metadata
├── README.md
├── analysis_options.yaml
├── android
│ ├── .gitignore
│ ├── app
│ │ ├── build.gradle
│ │ ├── proguard-rules.pro
│ │ └── src
│ │ │ ├── debug
│ │ │ └── AndroidManifest.xml
│ │ │ ├── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── assets
│ │ │ │ ├── privacy_policy.html
│ │ │ │ └── privacy_policy_en.html
│ │ │ ├── kotlin
│ │ │ │ └── com
│ │ │ │ │ └── iHTCboy
│ │ │ │ │ └── iPomodoros
│ │ │ │ │ ├── AppWebviewAvtivity.kt
│ │ │ │ │ ├── DeviceUtils.kt
│ │ │ │ │ └── MainActivity.kt
│ │ │ └── res
│ │ │ │ ├── drawable-v21
│ │ │ │ └── launch_background.xml
│ │ │ │ ├── drawable
│ │ │ │ ├── app_icon.png
│ │ │ │ ├── app_share_icon.png
│ │ │ │ └── launch_background.xml
│ │ │ │ ├── layout
│ │ │ │ └── webview_layout.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── values-en-rUS
│ │ │ │ └── strings.xml
│ │ │ │ ├── values-en
│ │ │ │ └── strings.xml
│ │ │ │ ├── values-night
│ │ │ │ └── styles.xml
│ │ │ │ ├── values-zh-rHK
│ │ │ │ └── strings.xml
│ │ │ │ ├── values-zh-rTW
│ │ │ │ └── strings.xml
│ │ │ │ ├── values-zh
│ │ │ │ └── strings.xml
│ │ │ │ └── values
│ │ │ │ ├── colors.xml
│ │ │ │ ├── strings.xml
│ │ │ │ └── styles.xml
│ │ │ └── profile
│ │ │ └── AndroidManifest.xml
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ └── gradle-wrapper.properties
│ └── settings.gradle
├── assets
│ ├── fonts
│ │ ├── ChakraPetch-Bold.ttf
│ │ ├── ChakraPetch-Light.ttf
│ │ ├── ChakraPetch-Regular.ttf
│ │ ├── ChakraPetch-SemiBold.ttf
│ │ ├── MaShanZheng-Regular.ttf
│ │ └── NotoSansTC-Bold.otf
│ ├── images
│ │ └── app_logo.png
│ └── musics
│ │ ├── Afternoon.mp3
│ │ ├── Birds.mp3
│ │ ├── Campfire.mp3
│ │ ├── Cowbell.mp3
│ │ ├── Happiness.mp3
│ │ ├── Morning.mp3
│ │ ├── Ring.mp3
│ │ ├── RiverStream.mp3
│ │ ├── SeaWaves.mp3
│ │ ├── SummerNight.mp3
│ │ ├── Thunderstorm.mp3
│ │ ├── Ticking.mp3
│ │ ├── Vintage.mp3
│ │ └── WhiteNoise.mp3
├── ios
│ ├── .gitignore
│ ├── Flutter
│ │ ├── AppFrameworkInfo.plist
│ │ ├── Debug.xcconfig
│ │ ├── Release.xcconfig
│ │ └── flutter_export_environment.sh
│ ├── Podfile
│ ├── Runner.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ │ └── WorkspaceSettings.xcsettings
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ └── Runner.xcscheme
│ ├── Runner.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ └── WorkspaceSettings.xcsettings
│ └── Runner
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ ├── Contents.json
│ │ │ ├── icon-1024.jpg
│ │ │ ├── icon-120.png
│ │ │ ├── icon-152.png
│ │ │ ├── icon-167.png
│ │ │ ├── icon-180.png
│ │ │ ├── icon-40.png
│ │ │ ├── icon-58.png
│ │ │ ├── icon-60.png
│ │ │ ├── icon-76.png
│ │ │ ├── icon-80.png
│ │ │ └── icon-87.png
│ │ ├── Contents.json
│ │ └── LaunchImage.imageset
│ │ │ ├── Contents.json
│ │ │ ├── LaunchImage@2x.png
│ │ │ ├── LaunchImage@3x.png
│ │ │ └── README.md
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── FlutterNativePlugin.swift
│ │ ├── Info.plist
│ │ ├── Resource
│ │ ├── Images
│ │ │ └── App-share-Icon.png
│ │ └── files
│ │ │ └── iHTCboyApp.json
│ │ ├── Runner-Bridging-Header.h
│ │ ├── en.lproj
│ │ ├── InfoPlist.strings
│ │ └── Main.strings
│ │ ├── iPomodoro
│ │ ├── CommonDefine.swift
│ │ ├── IAppleServiceUtil.swift
│ │ ├── ITAdvancelDetailViewController.swift
│ │ ├── ITCommonAPI.swift
│ │ ├── TableHeaderView.swift
│ │ └── TableHeaderView.xib
│ │ ├── zh-Hans.lproj
│ │ ├── InfoPlist.strings
│ │ ├── LaunchScreen.strings
│ │ └── Main.strings
│ │ └── zh-Hant.lproj
│ │ ├── InfoPlist.strings
│ │ ├── LaunchScreen.strings
│ │ └── Main.strings
├── lib
│ ├── common
│ │ ├── channel
│ │ │ └── native_method_channel.dart
│ │ ├── constant
│ │ │ └── app_colors.dart
│ │ └── utils
│ │ │ ├── audio_utils.dart
│ │ │ ├── config_storage.dart
│ │ │ ├── database_utils.dart
│ │ │ ├── device_utils.dart
│ │ │ ├── notification_utils.dart
│ │ │ └── time_utils.dart
│ ├── config
│ │ └── app_config.dart
│ ├── generated
│ │ ├── intl
│ │ │ ├── messages_all.dart
│ │ │ ├── messages_en.dart
│ │ │ └── messages_zh.dart
│ │ └── l10n.dart
│ ├── l10n
│ │ ├── intl_en.arb
│ │ └── intl_zh.arb
│ ├── main.dart
│ ├── model
│ │ └── countdown_model.dart
│ └── ui
│ │ ├── page
│ │ ├── app_about_page.dart
│ │ ├── brightness_settings.dart
│ │ ├── countdown_page.dart
│ │ ├── countdown_settings.dart
│ │ ├── language_settings.dart
│ │ ├── me_page.dart
│ │ ├── pomodoro_page.dart
│ │ ├── pomodoro_settings.dart
│ │ ├── theme_style.dart
│ │ ├── timer_page.dart
│ │ └── timer_settings.dart
│ │ └── widget
│ │ ├── countdown_edit_picker.dart
│ │ ├── cupertino_alert.dart
│ │ ├── custom_picker.dart
│ │ ├── privacy_policy_dialog.dart
│ │ ├── time_dialog.dart
│ │ └── tips_dialog.dart
├── linux
│ ├── .gitignore
│ ├── CMakeLists.txt
│ ├── flutter
│ │ ├── CMakeLists.txt
│ │ ├── generated_plugin_registrant.cc
│ │ ├── generated_plugin_registrant.h
│ │ └── generated_plugins.cmake
│ ├── main.cc
│ ├── my_application.cc
│ └── my_application.h
├── macos
│ ├── .gitignore
│ ├── Flutter
│ │ ├── Flutter-Debug.xcconfig
│ │ ├── Flutter-Release.xcconfig
│ │ └── GeneratedPluginRegistrant.swift
│ ├── Podfile
│ ├── Runner.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ └── xcshareddata
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ └── Runner.xcscheme
│ ├── Runner.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── Runner
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ ├── Contents.json
│ │ │ ├── app_icon_1024.png
│ │ │ ├── app_icon_128.png
│ │ │ ├── app_icon_16.png
│ │ │ ├── app_icon_256.png
│ │ │ ├── app_icon_32.png
│ │ │ ├── app_icon_512.png
│ │ │ └── app_icon_64.png
│ │ ├── Base.lproj
│ │ └── MainMenu.xib
│ │ ├── Configs
│ │ ├── AppInfo.xcconfig
│ │ ├── Debug.xcconfig
│ │ ├── Release.xcconfig
│ │ └── Warnings.xcconfig
│ │ ├── DebugProfile.entitlements
│ │ ├── Info.plist
│ │ ├── MainFlutterWindow.swift
│ │ └── Release.entitlements
├── pubspec.yaml
├── test
│ └── widget_test.dart
├── web
│ ├── favicon.png
│ ├── icons
│ │ ├── Icon-192.png
│ │ ├── Icon-512.png
│ │ ├── Icon-maskable-192.png
│ │ └── Icon-maskable-512.png
│ ├── index.html
│ └── manifest.json
└── windows
│ ├── .gitignore
│ ├── CMakeLists.txt
│ ├── flutter
│ ├── CMakeLists.txt
│ ├── generated_plugin_registrant.cc
│ ├── generated_plugin_registrant.h
│ └── generated_plugins.cmake
│ └── runner
│ ├── CMakeLists.txt
│ ├── Runner.rc
│ ├── flutter_window.cpp
│ ├── flutter_window.h
│ ├── main.cpp
│ ├── resource.h
│ ├── resources
│ └── app_icon.ico
│ ├── runner.exe.manifest
│ ├── utils.cpp
│ ├── utils.h
│ ├── win32_window.cpp
│ └── win32_window.h
├── gen
└── GradleException.groovy
├── logo.png
└── screenshot
├── 01.png
├── 02.png
├── 03.png
├── 04.png
├── 05.png
├── 06.png
└── 07.png
/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.lock
4 | *.log
5 | *.pyc
6 | *.swp
7 | .DS_Store
8 | .atom/
9 | .buildlog/
10 | .history
11 | .svn/
12 |
13 | # IntelliJ related
14 | *.iml
15 | *.ipr
16 | *.iws
17 | .idea/
18 |
19 | # Visual Studio Code related
20 | .vscode/
21 |
22 | # Flutter/Dart/Pub related
23 | **/doc/api/
24 | .dart_tool/
25 | .flutter-plugins
26 | .packages
27 | .pub-cache/
28 | .pub/
29 | build/
30 |
31 | # Android related
32 | **/android/**/gradle-wrapper.jar
33 | **/android/.gradle
34 | **/android/captures/
35 | **/android/gradlew
36 | **/android/gradlew.bat
37 | **/android/local.properties
38 | **/android/**/GeneratedPluginRegistrant.java
39 |
40 | # iOS/XCode related
41 | **/ios/**/*.mode1v3
42 | **/ios/**/*.mode2v3
43 | **/ios/**/*.moved-aside
44 | **/ios/**/*.pbxuser
45 | **/ios/**/*.perspectivev3
46 | **/ios/**/*sync/
47 | **/ios/**/.sconsign.dblite
48 | **/ios/**/.tags*
49 | **/ios/**/.vagrant/
50 | **/ios/**/DerivedData/
51 | **/ios/**/Icon?
52 | **/ios/**/Pods/
53 | **/ios/**/.symlinks/
54 | **/ios/**/profile
55 | **/ios/**/xcuserdata
56 | **/ios/.generated/
57 | **/ios/Flutter/App.framework
58 | **/ios/Flutter/Flutter.framework
59 | **/ios/Flutter/Generated.xcconfig
60 | **/ios/Flutter/app.flx
61 | **/ios/Flutter/app.zip
62 | **/ios/Flutter/flutter_assets/
63 | **/ios/ServiceDefinitions.json
64 | **/ios/Runner/GeneratedPluginRegistrant.*
65 |
66 | # Exceptions to above rules.
67 | !**/ios/**/default.mode1v3
68 | !**/ios/**/default.mode2v3
69 | !**/ios/**/default.pbxuser
70 | !**/ios/**/default.perspectivev3
71 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
72 |
73 |
74 |
75 | # See https://www.dartlang.org/guides/libraries/private-files
76 |
77 | # Files and directories created by pub
78 | .dart_tool/
79 | .packages
80 | .pub/
81 | build/
82 | # If you're building an application, you may want to check-in your pubspec.lock
83 | pubspec.lock
84 |
85 | # Directory created by dartdoc
86 | # If you don't generate documentation locally you can remove this line.
87 | doc/api/
88 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | # 用户隐私政策
2 |
3 | 注:以下《隐私政策》协议为:个人开发者 iHTCboy,下文用“我们”代称。
4 |
5 | 您在使用我们的服务时,我们可能会收集和使用您的相关信息。
6 | 我们希望通过本《隐私政策》向您说明,在使用我们的服务时,我们如何收集、使用、储存和分享这些信息,以及我们为您提供的访问、更新、控制和保护这些信息的方式。
7 | 本《隐私政策》与您所使用的服务息息相关,希望您仔细阅读,在需要时,按照本《隐私政策》的指引,作出您认为适当的选择。
8 | 本《隐私政策》中涉及的相关技术词汇,我们尽量以简明扼要的表述,并提供进一步说明的链接,以便您的理解。
9 | 您使用或继续使用我们的服务,即意味着同意我们按照本《隐私政策》收集、使用、储存和分享您的相关信息。 如对本《隐私政策》或相关事宜有任何问题,请通过 iHTCdevelop@gmail.com 与我们联系。
10 |
11 | ### 我们可能收集的信息
12 |
13 | 我们提供服务时,可能会收集、储存和使用下列与您有关的信息。如果您不提供相关信息,可能无法享受我们提供的某些服务,或者无法达到相关服务拟达到的效果。
14 |
15 | ### 您提供的信息
16 |
17 | 您在使用我们的服务时,向我们提供的相关个人信息,例如电子邮件或评论内容等;
18 | 您通过我们的服务向其他方提供的分享,以及您使用我们的服务时所储存的信息。
19 |
20 | ### 其他方分享的您的信息
21 |
22 | 其他方使用我们的服务时所提供有关您的共享信息。
23 |
24 | ### 我们获取的您的信息
25 |
26 | 您使用服务时我们可能收集如下信息:
27 | 日志信息,指您使用我们的服务时,系统可能通过cookies或其他方式自动采集的技术信息,包括:
28 | 设备或软件信息,例如您的移动设备、网页浏览器或用于接入我们服务的其他程序所提供的配置信息、您的IP地址和移动设备所用的版本和设备识别码;
29 | 修改系统的权限在使用我们服务时,例如您需要调节应用内的屏幕亮度时,需要访问提供修改系统的权限;
30 | 推送的权限,只会用于番茄计时时,应用进入后台时,进行本地推送提示功能。
31 |
32 | ### 我们可能如何使用信息
33 |
34 | 我们可能将在向您提供服务的过程之中所收集的信息用作下列用途:
35 | 1、向您提供服务;
36 | 2、帮助我们设计新服务,改善我们现有服务;
37 | 3、让您参与有关我们产品和服务的调查。
38 | 4、在我们提供服务时,用于身份验证、客户服务、安全防范、诈骗监测、存档和备份用途,确保我们向您提供的产品和服务的安全性;
39 |
40 | 为了让您有更好的体验、改善我们的服务或您同意的其他用途,在符合相关法律法规的前提下,我们可能将通过某一项服务所收集的信息,以汇集信息或者个性化的方式,用于我们的其他服务。例如,在您使用我们的一项服务时所收集的信息,可能在另一服务中用于向您提供特定内容,或向您展示与您相关的、非普遍推送的信息。如果我们在相关服务中提供了相应选项,您也可以授权我们将该服务所提供和储存的信息用于我们的其他服务。
41 | 我们将尽一切可能采取适当的技术手段,保证您可以访问、更新和更正自己的注册信息或使用我们的服务时提供的其他个人信息。
42 |
43 | ### 信息安全
44 |
45 | 我们仅在本《隐私政策》所述目的所必需的期间和法律法规要求的时限内保留您的个人信息。 我们使用各种安全技术和程序,以防信息的丢失、不当使用、未经授权阅览或披露。例如,在某些服务中,我们将利用加密技术(例如SSL)来保护您提供的个人信息。但请您理解,由于技术的限制以及可能存在的各种恶意手段,在互联网行业,即便竭尽所能加强安全措施,也不可能始终保证信息百分之百的安全。您需要了解,您接入我们的服务所用的系统和通讯网络,有可能因我们可控范围外的因素而出现问题。
46 |
47 | ### 您分享的信息
48 |
49 | 我们的多项服务,可让您不仅与自己的社交网络,也与使用该服务的所有用户公开分享您的相关信息,例如,您在我们的服务中所上传或发布的信息(包括您公开的个人信息、您建立的任务)、您对其他人上传或发布的信息作出的回应,以及包括与这些信息有关的位置数据和日志信息。使用我们服务的其他用户也有可能分享与您有关的信息(包括位置数据和日志信息)。特别是,我们的社交媒体服务,是专为使您与世界各地的用户共享信息而设计,您可以使共享信息实时、广泛地传递。只要您不删除共享信息,有关信息会一直留存在公共领域;即使您删除共享信息,有关信息仍可能由其他用户或不受我们控制的非关联第三方独立地缓存、复制或储存,或由其他用户或该等第三方在公共领域保存。
50 | 因此,请您谨慎考虑通过我们的服务分享、发布和交流的信息内容。在一些情况下,您可通过我们某些服务的隐私设定来控制有权浏览您共享信息的用户范围。
51 |
52 | ### 隐私政策的适用例外
53 |
54 | 我们的服务可能包括或链接至第三方提供的社交媒体或其他服务(包括网站)。例如:
55 | 您利用 “分享”键将某些内容分享的服务,或您利用第三方连线服务登录我们的服务。这些功能可能会收集您的相关信息(包括您的日志信息),并可能在您的电脑装置cookies,从而正常运行上述功能;
56 | 我们通过广告或我们服务的其他方式向您提供链接,使您可以接入第三方的服务或网站。
57 | 该等第三方社交媒体或其他服务可能由相关的第三方或我们运营。您使用该等第三方的社交媒体服务或其他服务(包括您向该等第三方提供的任何个人信息),须受该第三方的服务条款及隐私政策(而非《通用服务条款》或本《隐私政策》)约束,您需要仔细阅读其条款。本《隐私政策》仅适用于我们所收集的信息,并不适用于任何第三方提供的服务或第三方的信息使用规则,我们对任何第三方使用由您提供的信息不承担任何责任。
58 |
59 | ### 未成年人使用我们的服务
60 |
61 | 我们鼓励父母或监护人指导未满十八岁的未成年人使用我们的服务。我们建议未成年人鼓励他们的父母或监护人阅读本《隐私政策》,并建议未成年人在提交的个人信息之前寻求父母或监护人的同意和指导。
62 |
63 | ### 隐私政策的适用范围
64 |
65 | 除某些特定服务外,我们所有的服务均适用本《隐私政策》。这些特定服务将适用特定的隐私政策。针对某些特定服务的特定隐私政策,将更具体地说明我们在该等服务中如何使用您的信息。该特定服务的隐私政策构成本《隐私政策》的一部分。如相关特定服务的隐私政策与本《隐私政策》有不一致之处,适用该特定服务的隐私政策。
66 | 请您注意,本《隐私政策》不适用于以下情况:
67 | 通过我们的服务而接入的第三方服务(包括任何第三方网站)收集的信息;
68 | 通过在我们服务中进行广告服务的其他公司或机构所收集的信息。
69 |
70 | ### 变更
71 | 我们可能适时修订本《隐私政策》的条款,该等修订构成本《隐私政策》的一部分。如该等修订造成您在本《隐私政策》下权利的实质减少,我们将在修订生效前通过在主页上显著位置提示或向您发送电子邮件或以其他方式通知您。在该种情况下,若您继续使用我们的服务,即表示同意受经修订的本《隐私政策》的约束。
72 |
73 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # iPomodoro-Flutter
2 |
3 |
4 |
5 | iPomodoro(爱番茄)。🍅 番茄工作法是一种时间管理法方法,在上世纪八十年代由Francesco Cirillo创立。 该方法使用一个定时器来分割出一个一般为25分钟的工作时间和5分钟的休息时间,而那些时间段被称为pomodori,为意大利语单词pomodoro之复数。
6 |
7 |
8 | ## iPomodoro(爱番茄🍅)
9 | 爱番茄是一个简单和有效的番茄工作法的应用,灵感来自 iOS app `我要当学霸` 和 macOS app `Promodoro Timer`,这2个App已经下架多年了,所以,想以此为基础,开发Android/iOS/macOS版本,并且开源,所有平台暂定免费下载,计划内置打赏机制,iOS/macOS版本不定时收费1人民币(苹果开发账号费)。
10 |
11 |
12 | ## 简介
13 |
14 | - 分心?❌
15 | - 拖延?❌
16 | - 高效?✅
17 | - 专注?✅
18 |
19 | iPomodoro(爱番茄)
20 |
21 | 【功能简介】
22 | 番茄时间管理和学习规划,妈妈再也不用担心我的学习啦!不再分心!不再拖延!高效!专注!,让大家在学习时可以更加专注也可以快速和简单的学习get!
23 |
24 | 【三大特点】
25 | 1、番茄学习模式,使用番茄工作法学习,让你劳逸结合!
26 | 2、计时学习模式,按照设定的时长学习,想学多久就学多久!
27 | 3、定时任务模式,倒数日、任务记录,每日学习任务!
28 |
29 | 杜绝学习没有目标!满足你对学习的求知欲望!
30 |
31 |
32 | **番茄学习**
33 | - 使用番茄工作法学习
34 |
35 | **计时学习**
36 | - 按照设定的时长学习
37 |
38 | 请不要
39 | 放弃治疗!
40 | 好好学习
41 | 你还有救!
42 |
43 |
44 | ### 下载&安装
45 |
46 | 1、商店安装
47 |
48 | | 已上架的商店 | 下载地址 | 备注 |
49 | |--------|---|---|
50 | | 苹果商店 | [https://apps.apple.com/cn/app/ipomodoro/id1439666929](https://apps.apple.com/cn/app/ipomodoro/id1439666929) | 可供下载 |
51 | | 谷歌商店 | [https://play.google.com/store/apps/details?id=com.iHTCboy.iPomodoros](https://play.google.com/store/apps/details?id=com.iHTCboy.iPomodoros) | 可供下载 |
52 | | ~~华为商店~~ | [https://appgallery.huawei.com/#/app/C103911977](https://appgallery.huawei.com/#/app/C103911977) | 不合规被下架 |
53 | | ~~小米商店~~ | [http://app.xiaomi.com/detail/1341005](http://app.xiaomi.com/detail/1341005) | 不合规被下架 |
54 | | ~~酷安商店~~ | [https://www.coolapk.com/apk/282769](https://www.coolapk.com/apk/282769) | 不合规被下架 |
55 | | APK下载 | [https://github.com/iHTCboy/iPomodoro-Flutter/releases](https://github.com/iHTCboy/iPomodoro-Flutter/releases) | 可供下载 |
56 |
57 | > 注:因为苹果开发者账号需要 ¥688 年费,所以 App Store下载收费1元。介意的朋友可以下载本项目代码在 macOS 系统编译安装。
58 |
59 |
60 | 2、编译安装
61 | iOS app 因为苹果开发者账号需要 ¥688 年费,所以 AppStore 为付费下载,请见谅。你可以下载本项目代码在macOS系统编译安装。
62 |
63 |
64 | ### 应用截图
65 |
66 | |  |  |
67 | | ----- | ----- |
68 | |  |  |
69 | |  |  |
70 | |  | |
71 |
72 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 |
12 | # IntelliJ related
13 | *.iml
14 | *.ipr
15 | *.iws
16 | .idea/
17 |
18 | # The .vscode folder contains launch configuration and tasks you configure in
19 | # VS Code which you may wish to be included in version control, so this line
20 | # is commented out by default.
21 | #.vscode/
22 |
23 | # Flutter/Dart/Pub related
24 | **/doc/api/
25 | **/ios/Flutter/.last_build_id
26 | .dart_tool/
27 | .flutter-plugins
28 | .flutter-plugins-dependencies
29 | .packages
30 | .pub-cache/
31 | .pub/
32 | /build/
33 |
34 | # Web related
35 | lib/generated_plugin_registrant.dart
36 |
37 | # Symbolication related
38 | app.*.symbols
39 |
40 | # Obfuscation related
41 | app.*.map.json
42 |
--------------------------------------------------------------------------------
/app/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled.
5 |
6 | version:
7 | revision: 135454af32477f815a7525073027a3ff9eff1bfd
8 | channel: stable
9 |
10 | project_type: app
11 |
12 | # Tracks metadata for the flutter migrate command
13 | migration:
14 | platforms:
15 | - platform: root
16 | create_revision: 135454af32477f815a7525073027a3ff9eff1bfd
17 | base_revision: 135454af32477f815a7525073027a3ff9eff1bfd
18 | - platform: android
19 | create_revision: 135454af32477f815a7525073027a3ff9eff1bfd
20 | base_revision: 135454af32477f815a7525073027a3ff9eff1bfd
21 | - platform: ios
22 | create_revision: 135454af32477f815a7525073027a3ff9eff1bfd
23 | base_revision: 135454af32477f815a7525073027a3ff9eff1bfd
24 | - platform: linux
25 | create_revision: 135454af32477f815a7525073027a3ff9eff1bfd
26 | base_revision: 135454af32477f815a7525073027a3ff9eff1bfd
27 | - platform: macos
28 | create_revision: 135454af32477f815a7525073027a3ff9eff1bfd
29 | base_revision: 135454af32477f815a7525073027a3ff9eff1bfd
30 | - platform: web
31 | create_revision: 135454af32477f815a7525073027a3ff9eff1bfd
32 | base_revision: 135454af32477f815a7525073027a3ff9eff1bfd
33 | - platform: windows
34 | create_revision: 135454af32477f815a7525073027a3ff9eff1bfd
35 | base_revision: 135454af32477f815a7525073027a3ff9eff1bfd
36 |
37 | # User provided section
38 |
39 | # List of Local paths (relative to this file) that should be
40 | # ignored by the migrate tool.
41 | #
42 | # Files that are not part of the templates will be ignored by default.
43 | unmanaged_files:
44 | - 'lib/main.dart'
45 | - 'ios/Runner.xcodeproj/project.pbxproj'
46 |
--------------------------------------------------------------------------------
/app/README.md:
--------------------------------------------------------------------------------
1 | # iPomodoro
2 |
3 | A new Flutter project.
4 |
5 | ## Getting Started
6 |
7 | This project is a starting point for a Flutter application.
8 |
9 | A few resources to get you started if this is your first Flutter project:
10 |
11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
13 |
14 | For help getting started with Flutter, view our
15 | [online documentation](https://flutter.dev/docs), which offers tutorials,
16 | samples, guidance on mobile development, and a full API reference.
17 |
--------------------------------------------------------------------------------
/app/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | # This file configures the analyzer, which statically analyzes Dart code to
2 | # check for errors, warnings, and lints.
3 | #
4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6 | # invoked from the command line by running `flutter analyze`.
7 |
8 | # The following line activates a set of recommended lints for Flutter apps,
9 | # packages, and plugins designed to encourage good coding practices.
10 | include: package:flutter_lints/flutter.yaml
11 |
12 | linter:
13 | # The lint rules applied to this project can be customized in the
14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml`
15 | # included above or to enable additional rules. A list of all available lints
16 | # and their documentation is published at
17 | # https://dart-lang.github.io/linter/lints/index.html.
18 | #
19 | # Instead of disabling a lint rule for the entire project in the
20 | # section below, it can also be suppressed for a single line of code
21 | # or a specific dart file by using the `// ignore: name_of_lint` and
22 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file
23 | # producing the lint.
24 | rules:
25 | # avoid_print: false # Uncomment to disable the `avoid_print` rule
26 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
27 |
28 | # Additional information about this file can be found at
29 | # https://dart.dev/guides/language/analysis-options
30 |
--------------------------------------------------------------------------------
/app/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 |
9 | # Remember to never publicly share your keystore.
10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11 | key.properties
12 |
--------------------------------------------------------------------------------
/app/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id "com.android.application"
3 | id "kotlin-android"
4 | // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
5 | id "dev.flutter.flutter-gradle-plugin"
6 | }
7 |
8 | def localProperties = new Properties()
9 | def localPropertiesFile = rootProject.file('local.properties')
10 | if (localPropertiesFile.exists()) {
11 | localPropertiesFile.withReader('UTF-8') { reader ->
12 | localProperties.load(reader)
13 | }
14 | }
15 |
16 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
17 | if (flutterVersionCode == null) {
18 | flutterVersionCode = '1'
19 | }
20 |
21 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
22 | if (flutterVersionName == null) {
23 | flutterVersionName = '1.0'
24 | }
25 |
26 | def keystoreProperties = new Properties()
27 | def keystorePropertiesFile = rootProject.file('key.properties')
28 | if (keystorePropertiesFile.exists()) {
29 | keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
30 | }
31 |
32 |
33 | android {
34 | namespace = "com.iHTCboy.iPomodoros"
35 | compileSdkVersion 35
36 |
37 | sourceSets {
38 | main.java.srcDirs += 'src/main/kotlin'
39 | }
40 |
41 | lintOptions {
42 | disable 'InvalidPackage'
43 | }
44 |
45 | defaultConfig {
46 | applicationId "com.iHTCboy.iPomodoros"
47 | minSdkVersion 21
48 | targetSdkVersion 35
49 | versionCode flutterVersionCode.toInteger()
50 | versionName flutterVersionName
51 | // Required when setting minSdkVersion to 20 or lower
52 | multiDexEnabled true
53 | }
54 |
55 | compileOptions {
56 | // Add these 3 lines inside [compileOptions]
57 | coreLibraryDesugaringEnabled true
58 | sourceCompatibility = JavaVersion.VERSION_21
59 | targetCompatibility = JavaVersion.VERSION_21
60 | }
61 |
62 | signingConfigs {
63 | release {
64 | keyAlias keystoreProperties['keyAlias']
65 | keyPassword keystoreProperties['keyPassword']
66 | storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
67 | storePassword keystoreProperties['storePassword']
68 | }
69 | }
70 |
71 | buildTypes {
72 | release {
73 | signingConfig signingConfigs.release
74 | ndk {
75 | //设置支持的SO库架构
76 | abiFilters 'arm64-v8a'
77 | //debugSymbolLevel 'SYMBOL_TABLE'
78 | }
79 | }
80 | debug {
81 | signingConfig signingConfigs.debug
82 | ndk {
83 | //设置支持的SO库架构
84 | abiFilters 'arm64-v8a', 'x86', 'x86_64'
85 | }
86 | }
87 | }
88 | }
89 |
90 | flutter {
91 | source '../..'
92 | }
93 |
94 | dependencies {
95 | coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.5'
96 | implementation 'androidx.appcompat:appcompat:1.7.0'
97 | implementation "me.leolin:ShortcutBadger:1.1.22@aar"
98 | }
99 |
--------------------------------------------------------------------------------
/app/android/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | ## Flutter wrapper
2 | -keep class io.flutter.app.** { *; }
3 | -keep class io.flutter.plugin.** { *; }
4 | -keep class io.flutter.util.** { *; }
5 | -keep class io.flutter.view.** { *; }
6 | -keep class io.flutter.** { *; }
7 | -keep class io.flutter.plugins.** { *; }
8 | -dontwarn io.flutter.embedding.**
9 | # Please add these rules to your existing keep rules in order to suppress warnings.
10 | # This is generated automatically by the Android Gradle plugin.
11 | -dontwarn com.google.android.play.core.splitcompat.SplitCompatApplication
--------------------------------------------------------------------------------
/app/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/app/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
15 |
23 |
24 |
25 |
26 |
27 |
28 |
33 |
34 |
37 |
38 |
40 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/app/android/app/src/main/assets/privacy_policy.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 用户隐私政策
6 |
7 |
8 | 用户隐私政策
9 | 注:以下《隐私政策》协议为:个人开发者 iHTCboy,下文用“我们”代称。
10 | 您在使用我们的服务时,我们可能会收集和使用您的相关信息。
11 |
我们希望通过本《隐私政策》向您说明,在使用我们的服务时,我们如何收集、使用、储存和分享这些信息,以及我们为您提供的访问、更新、控制和保护这些信息的方式。
12 |
本《隐私政策》与您所使用的服务息息相关,希望您仔细阅读,在需要时,按照本《隐私政策》的指引,作出您认为适当的选择。
13 |
本《隐私政策》中涉及的相关技术词汇,我们尽量以简明扼要的表述,并提供进一步说明的链接,以便您的理解。
14 |
您使用或继续使用我们的服务,即意味着同意我们按照本《隐私政策》收集、使用、储存和分享您的相关信息。
15 | 如对本《隐私政策》或相关事宜有任何问题,请通过 iHTCdevelop@gmail.com 与我们联系。
16 |
17 | 我们可能收集的信息
18 | 我们提供服务时,可能会收集、储存和使用下列与您有关的信息。如果您不提供相关信息,可能无法享受我们提供的某些服务,或者无法达到相关服务拟达到的效果。
19 |
20 | 您提供的信息
21 |
22 | 您在使用我们的服务时,向我们提供的相关个人信息,例如电子邮件或评论内容等;
23 |
您通过我们的服务向其他方提供的分享,以及您使用我们的服务时所储存的信息。
24 |
25 |
26 | 其他方分享的您的信息
27 |
28 | 其他方使用我们的服务时所提供有关您的共享信息。
29 |
30 |
31 | 我们获取的您的信息
32 | 您使用服务时我们可能收集如下信息:
33 |
日志信息,指您使用我们的服务时,系统可能通过cookies或其他方式自动采集的技术信息,包括:
34 |
设备或软件信息,例如您的移动设备、网页浏览器或用于接入我们服务的其他程序所提供的配置信息、您的IP地址和移动设备所用的版本和设备识别码;
35 |
修改系统的权限在使用我们服务时,例如您需要调节应用内的屏幕亮度时,需要访问提供修改系统的权限;
36 |
推送的权限,只会用于番茄计时时,应用进入后台时,进行本地推送提示功能。
37 |
38 |
39 | 我们可能如何使用信息
40 |
41 | 我们可能将在向您提供服务的过程之中所收集的信息用作下列用途:
42 |
1、向您提供服务;
43 |
2、帮助我们设计新服务,改善我们现有服务;
44 |
3、让您参与有关我们产品和服务的调查。
45 |
4、在我们提供服务时,用于身份验证、客户服务、安全防范、诈骗监测、存档和备份用途,确保我们向您提供的产品和服务的安全性;
46 |
47 |
48 | 为了让您有更好的体验、改善我们的服务或您同意的其他用途,在符合相关法律法规的前提下,我们将尽一切可能采取适当的技术手段,保证您可以访问、更新和更正自己的注册信息或使用我们的服务时提供的其他个人信息。
49 |
50 |
51 | 信息安全
52 | 我们仅在本《隐私政策》所述目的所必需的期间和法律法规要求的时限内保留您的个人信息。
53 | 我们使用各种安全技术和程序,以防信息的丢失、不当使用、未经授权阅览或披露。例如,在某些服务中,我们将利用加密技术(例如SSL)来保护您提供的个人信息。但请您理解,由于技术的限制以及可能存在的各种恶意手段,在互联网行业,即便竭尽所能加强安全措施,也不可能始终保证信息百分之百的安全。您需要了解,您接入我们的服务所用的系统和通讯网络,有可能因我们可控范围外的因素而出现问题。
54 |
55 |
56 | 您分享的信息
57 |
58 |
59 | 我们的多项服务,可让您不仅与自己的社交网络,也与使用该服务的所有用户公开分享您的相关信息,例如,您在我们的服务中所上传或发布的信息(包括您公开的个人信息、您建立的任务)、您对其他人上传或发布的信息作出的回应,以及包括与这些信息有关的位置数据和日志信息。使用我们服务的其他用户也有可能分享与您有关的信息(包括位置数据和日志信息)。特别是,我们的社交媒体服务,是专为使您与世界各地的用户共享信息而设计,您可以使共享信息实时、广泛地传递。只要您不删除共享信息,有关信息会一直留存在公共领域;即使您删除共享信息,有关信息仍可能由其他用户或不受我们控制的非关联第三方独立地缓存、复制或储存,或由其他用户或该等第三方在公共领域保存。
60 |
因此,请您谨慎考虑通过我们的服务分享、发布和交流的信息内容。在一些情况下,您可通过我们某些服务的隐私设定来控制有权浏览您共享信息的用户范围。
61 |
62 |
63 | 隐私政策的适用例外
64 |
65 | 我们的服务可能包括或链接至第三方提供的社交媒体或其他服务(包括网站)。例如:
66 |
您利用
67 | “分享”键将某些内容分享的服务,或您利用第三方连线服务登录我们的服务。这些功能可能会收集您的相关信息(包括您的日志信息),并可能在您的电脑装置cookies,从而正常运行上述功能;
68 |
我们通过广告或我们服务的其他方式向您提供链接,使您可以接入第三方的服务或网站。
69 |
该等第三方社交媒体或其他服务可能由相关的第三方或我们运营。您使用该等第三方的社交媒体服务或其他服务(包括您向该等第三方提供的任何个人信息),须受该第三方的服务条款及隐私政策(而非《通用服务条款》或本《隐私政策》)约束,您需要仔细阅读其条款。本《隐私政策》仅适用于我们所收集的信息,并不适用于任何第三方提供的服务或第三方的信息使用规则,我们对任何第三方使用由您提供的信息不承担任何责任。
70 |
71 |
72 | 未成年人使用我们的服务
73 |
74 | 我们鼓励父母或监护人指导未满十八岁的未成年人使用我们的服务。我们建议未成年人鼓励他们的父母或监护人阅读本《隐私政策》,并建议未成年人在提交的个人信息之前寻求父母或监护人的同意和指导。
75 |
76 |
77 | 隐私政策的适用范围
78 |
79 |
80 | 除某些特定服务外,我们所有的服务均适用本《隐私政策》。这些特定服务将适用特定的隐私政策。针对某些特定服务的特定隐私政策,将更具体地说明我们在该等服务中如何使用您的信息。该特定服务的隐私政策构成本《隐私政策》的一部分。如相关特定服务的隐私政策与本《隐私政策》有不一致之处,适用该特定服务的隐私政策。
81 |
请您注意,本《隐私政策》不适用于以下情况:
82 |
通过我们的服务而接入的第三方服务(包括任何第三方网站)收集的信息;
83 |
通过在我们服务中进行广告服务的其他公司或机构所收集的信息。
84 |
85 | 变更
86 |
87 |
88 | 我们可能适时修订本《隐私政策》的条款,该等修订构成本《隐私政策》的一部分。如该等修订造成您在本《隐私政策》下权利的实质减少,我们将在修订生效前通过在主页上显著位置提示或向您发送电子邮件或以其他方式通知您。在该种情况下,若您继续使用我们的服务,即表示同意受经修订的本《隐私政策》的约束。
89 |
90 |
91 |
--------------------------------------------------------------------------------
/app/android/app/src/main/kotlin/com/iHTCboy/iPomodoros/AppWebviewAvtivity.kt:
--------------------------------------------------------------------------------
1 | package com.iHTCboy.iPomodoros
2 |
3 | import android.os.Build
4 | import android.os.Bundle
5 | import android.view.WindowManager
6 | import android.webkit.WebView
7 | import androidx.appcompat.app.AppCompatActivity
8 | import androidx.core.content.ContextCompat
9 |
10 | class AppWebviewAvtivity : AppCompatActivity() {
11 | //定义变量
12 | private var myWebView: WebView? = null
13 |
14 | override fun onCreate(savedInstanceState: Bundle?) {
15 | super.onCreate(savedInstanceState)
16 | val intent = this.getIntent()
17 | val fileUrl = intent.getStringExtra("fileUrl") as kotlin.String
18 | setContentView(R.layout.webview_layout)
19 | myWebView = findViewById(R.id.webView) as WebView
20 | // 设置与Js交互的权限
21 | // myWebView!!.settings.javaScriptEnabled = true
22 | // //文本编码
23 | // myWebView!!.settings.defaultTextEncodingName = "utf-8"
24 | // //设置DOM存储已启用(注释后文本显示变成js代码)
25 | // myWebView!!.settings.domStorageEnabled = true
26 | // 设置允许JS弹窗
27 | //myWebView.settings.javaScriptCanOpenWindowsAutomatically = true
28 | // 先载入JS代码
29 | // 格式规定为:file:///android_asset/文件名.html
30 | myWebView!!.loadUrl(fileUrl)
31 | // mWebView!!.loadData(resources.getString(R.string.privacy_policy), "text/html", "base64")
32 | }
33 |
34 | // private fun setupStatusBar() {
35 | // if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
36 | // //需要设置这个 flag 才能调用 setStatusBarColor 来设置状态栏颜色
37 | // window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS)
38 | // window.statusBarColor = ContextCompat.getColor(this, R.color.colorPrimaryDark)
39 | // }
40 | // }
41 | }
--------------------------------------------------------------------------------
/app/android/app/src/main/kotlin/com/iHTCboy/iPomodoros/DeviceUtils.kt:
--------------------------------------------------------------------------------
1 | package com.iHTCboy.iPomodoros
2 | import android.os.Build
3 | import java.lang.reflect.Method
4 |
5 | object DeviceUtils {
6 | //emuiApiLevel>0 即华为系统
7 | //判断是否是华为系统 官网提供
8 | val isEMUI: Boolean
9 | get() {
10 | //emuiApiLevel>0 即华为系统
11 | var emuiApiLevel: Int = 0
12 | try {
13 | val cls = Class.forName("android.os.SystemProperties")
14 | val method: Method = cls.getDeclaredMethod("get", *arrayOf>(String::class.java))
15 | emuiApiLevel = (method.invoke(cls, arrayOf("ro.build.hw_emui_api_level")) as String).toInt()
16 | } catch (e: Exception) {
17 | e.printStackTrace()
18 | }
19 | return emuiApiLevel > 0
20 | }//这个字符串可以自己定义,例如判断华为就填写huawei,魅族就填写meizu
21 |
22 | //判官是否是小米系统 官网提供
23 | val isMIUI: Boolean
24 | get() {
25 | val manufacturer: String = Build.MANUFACTURER
26 | //这个字符串可以自己定义,例如判断华为就填写huawei,魅族就填写meizu
27 | if ("xiaomi".equals(manufacturer, ignoreCase = true)) {
28 | return true
29 | }
30 | return false
31 | }
32 | }
33 |
34 |
--------------------------------------------------------------------------------
/app/android/app/src/main/res/drawable-v21/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/app/android/app/src/main/res/drawable/app_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iHTCboy/iPomodoro-Flutter/3a05ca4f01bc1f9bc1c1d8a9cb63da54876d6634/app/android/app/src/main/res/drawable/app_icon.png
--------------------------------------------------------------------------------
/app/android/app/src/main/res/drawable/app_share_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iHTCboy/iPomodoro-Flutter/3a05ca4f01bc1f9bc1c1d8a9cb63da54876d6634/app/android/app/src/main/res/drawable/app_share_icon.png
--------------------------------------------------------------------------------
/app/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/app/android/app/src/main/res/layout/webview_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
10 |
--------------------------------------------------------------------------------
/app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iHTCboy/iPomodoro-Flutter/3a05ca4f01bc1f9bc1c1d8a9cb63da54876d6634/app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iHTCboy/iPomodoro-Flutter/3a05ca4f01bc1f9bc1c1d8a9cb63da54876d6634/app/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iHTCboy/iPomodoro-Flutter/3a05ca4f01bc1f9bc1c1d8a9cb63da54876d6634/app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iHTCboy/iPomodoro-Flutter/3a05ca4f01bc1f9bc1c1d8a9cb63da54876d6634/app/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iHTCboy/iPomodoro-Flutter/3a05ca4f01bc1f9bc1c1d8a9cb63da54876d6634/app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iHTCboy/iPomodoro-Flutter/3a05ca4f01bc1f9bc1c1d8a9cb63da54876d6634/app/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iHTCboy/iPomodoro-Flutter/3a05ca4f01bc1f9bc1c1d8a9cb63da54876d6634/app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iHTCboy/iPomodoro-Flutter/3a05ca4f01bc1f9bc1c1d8a9cb63da54876d6634/app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iHTCboy/iPomodoro-Flutter/3a05ca4f01bc1f9bc1c1d8a9cb63da54876d6634/app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iHTCboy/iPomodoro-Flutter/3a05ca4f01bc1f9bc1c1d8a9cb63da54876d6634/app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/android/app/src/main/res/values-en-rUS/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | iPomodoro
4 |
--------------------------------------------------------------------------------
/app/android/app/src/main/res/values-en/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | iPomodoro
4 |
--------------------------------------------------------------------------------
/app/android/app/src/main/res/values-night/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/app/android/app/src/main/res/values-zh-rHK/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 愛蕃茄
4 |
--------------------------------------------------------------------------------
/app/android/app/src/main/res/values-zh-rTW/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 愛蕃茄
4 |
--------------------------------------------------------------------------------
/app/android/app/src/main/res/values-zh/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 爱番茄
4 |
--------------------------------------------------------------------------------
/app/android/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #DC5C5D
4 | #D74A49
5 | #4F97E0
6 |
7 |
--------------------------------------------------------------------------------
/app/android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | iPomodoro
4 |
5 |
--------------------------------------------------------------------------------
/app/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
23 |
28 |
29 |
--------------------------------------------------------------------------------
/app/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/app/android/build.gradle:
--------------------------------------------------------------------------------
1 | allprojects {
2 | repositories {
3 | google()
4 | mavenCentral()
5 | }
6 | }
7 |
8 | rootProject.buildDir = "../build"
9 | subprojects {
10 | project.buildDir = "${rootProject.buildDir}/${project.name}"
11 | }
12 | subprojects {
13 | project.evaluationDependsOn(":app")
14 | }
15 |
16 | tasks.register("clean", Delete) {
17 | delete rootProject.buildDir
18 | }
19 |
--------------------------------------------------------------------------------
/app/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.enableR8=true
3 | android.useAndroidX=true
4 | android.enableJetifier=true
5 |
--------------------------------------------------------------------------------
/app/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Sat Feb 27 15:19:12 CST 2021
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip
7 |
8 |
--------------------------------------------------------------------------------
/app/android/settings.gradle:
--------------------------------------------------------------------------------
1 | pluginManagement {
2 | def flutterSdkPath = {
3 | def properties = new Properties()
4 | file("local.properties").withInputStream { properties.load(it) }
5 | def flutterSdkPath = properties.getProperty("flutter.sdk")
6 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
7 | return flutterSdkPath
8 | }()
9 |
10 | includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
11 |
12 | repositories {
13 | google()
14 | mavenCentral()
15 | gradlePluginPortal()
16 | }
17 | }
18 |
19 | plugins {
20 | id "dev.flutter.flutter-plugin-loader" version "1.0.0"
21 | id "com.android.application" version "8.4.2" apply false
22 | id "org.jetbrains.kotlin.android" version "1.9.20" apply false
23 | }
24 |
25 | include ":app"
26 |
--------------------------------------------------------------------------------
/app/assets/fonts/ChakraPetch-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iHTCboy/iPomodoro-Flutter/3a05ca4f01bc1f9bc1c1d8a9cb63da54876d6634/app/assets/fonts/ChakraPetch-Bold.ttf
--------------------------------------------------------------------------------
/app/assets/fonts/ChakraPetch-Light.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iHTCboy/iPomodoro-Flutter/3a05ca4f01bc1f9bc1c1d8a9cb63da54876d6634/app/assets/fonts/ChakraPetch-Light.ttf
--------------------------------------------------------------------------------
/app/assets/fonts/ChakraPetch-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iHTCboy/iPomodoro-Flutter/3a05ca4f01bc1f9bc1c1d8a9cb63da54876d6634/app/assets/fonts/ChakraPetch-Regular.ttf
--------------------------------------------------------------------------------
/app/assets/fonts/ChakraPetch-SemiBold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iHTCboy/iPomodoro-Flutter/3a05ca4f01bc1f9bc1c1d8a9cb63da54876d6634/app/assets/fonts/ChakraPetch-SemiBold.ttf
--------------------------------------------------------------------------------
/app/assets/fonts/MaShanZheng-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iHTCboy/iPomodoro-Flutter/3a05ca4f01bc1f9bc1c1d8a9cb63da54876d6634/app/assets/fonts/MaShanZheng-Regular.ttf
--------------------------------------------------------------------------------
/app/assets/fonts/NotoSansTC-Bold.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iHTCboy/iPomodoro-Flutter/3a05ca4f01bc1f9bc1c1d8a9cb63da54876d6634/app/assets/fonts/NotoSansTC-Bold.otf
--------------------------------------------------------------------------------
/app/assets/images/app_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iHTCboy/iPomodoro-Flutter/3a05ca4f01bc1f9bc1c1d8a9cb63da54876d6634/app/assets/images/app_logo.png
--------------------------------------------------------------------------------
/app/assets/musics/Afternoon.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iHTCboy/iPomodoro-Flutter/3a05ca4f01bc1f9bc1c1d8a9cb63da54876d6634/app/assets/musics/Afternoon.mp3
--------------------------------------------------------------------------------
/app/assets/musics/Birds.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iHTCboy/iPomodoro-Flutter/3a05ca4f01bc1f9bc1c1d8a9cb63da54876d6634/app/assets/musics/Birds.mp3
--------------------------------------------------------------------------------
/app/assets/musics/Campfire.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iHTCboy/iPomodoro-Flutter/3a05ca4f01bc1f9bc1c1d8a9cb63da54876d6634/app/assets/musics/Campfire.mp3
--------------------------------------------------------------------------------
/app/assets/musics/Cowbell.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iHTCboy/iPomodoro-Flutter/3a05ca4f01bc1f9bc1c1d8a9cb63da54876d6634/app/assets/musics/Cowbell.mp3
--------------------------------------------------------------------------------
/app/assets/musics/Happiness.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iHTCboy/iPomodoro-Flutter/3a05ca4f01bc1f9bc1c1d8a9cb63da54876d6634/app/assets/musics/Happiness.mp3
--------------------------------------------------------------------------------
/app/assets/musics/Morning.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iHTCboy/iPomodoro-Flutter/3a05ca4f01bc1f9bc1c1d8a9cb63da54876d6634/app/assets/musics/Morning.mp3
--------------------------------------------------------------------------------
/app/assets/musics/Ring.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iHTCboy/iPomodoro-Flutter/3a05ca4f01bc1f9bc1c1d8a9cb63da54876d6634/app/assets/musics/Ring.mp3
--------------------------------------------------------------------------------
/app/assets/musics/RiverStream.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iHTCboy/iPomodoro-Flutter/3a05ca4f01bc1f9bc1c1d8a9cb63da54876d6634/app/assets/musics/RiverStream.mp3
--------------------------------------------------------------------------------
/app/assets/musics/SeaWaves.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iHTCboy/iPomodoro-Flutter/3a05ca4f01bc1f9bc1c1d8a9cb63da54876d6634/app/assets/musics/SeaWaves.mp3
--------------------------------------------------------------------------------
/app/assets/musics/SummerNight.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iHTCboy/iPomodoro-Flutter/3a05ca4f01bc1f9bc1c1d8a9cb63da54876d6634/app/assets/musics/SummerNight.mp3
--------------------------------------------------------------------------------
/app/assets/musics/Thunderstorm.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iHTCboy/iPomodoro-Flutter/3a05ca4f01bc1f9bc1c1d8a9cb63da54876d6634/app/assets/musics/Thunderstorm.mp3
--------------------------------------------------------------------------------
/app/assets/musics/Ticking.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iHTCboy/iPomodoro-Flutter/3a05ca4f01bc1f9bc1c1d8a9cb63da54876d6634/app/assets/musics/Ticking.mp3
--------------------------------------------------------------------------------
/app/assets/musics/Vintage.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iHTCboy/iPomodoro-Flutter/3a05ca4f01bc1f9bc1c1d8a9cb63da54876d6634/app/assets/musics/Vintage.mp3
--------------------------------------------------------------------------------
/app/assets/musics/WhiteNoise.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iHTCboy/iPomodoro-Flutter/3a05ca4f01bc1f9bc1c1d8a9cb63da54876d6634/app/assets/musics/WhiteNoise.mp3
--------------------------------------------------------------------------------
/app/ios/.gitignore:
--------------------------------------------------------------------------------
1 | **/dgph
2 | *.mode1v3
3 | *.mode2v3
4 | *.moved-aside
5 | *.pbxuser
6 | *.perspectivev3
7 | **/*sync/
8 | .sconsign.dblite
9 | .tags*
10 | **/.vagrant/
11 | **/DerivedData/
12 | Icon?
13 | **/Pods/
14 | **/.symlinks/
15 | profile
16 | xcuserdata
17 | **/.generated/
18 | Flutter/App.framework
19 | Flutter/Flutter.framework
20 | Flutter/Flutter.podspec
21 | Flutter/Generated.xcconfig
22 | Flutter/ephemeral/
23 | Flutter/app.flx
24 | Flutter/app.zip
25 | Flutter/flutter_assets/
26 | Flutter/flutter_export_environment.sh
27 | ServiceDefinitions.json
28 | Runner/GeneratedPluginRegistrant.*
29 |
30 | # Exceptions to above rules.
31 | !default.mode1v3
32 | !default.mode2v3
33 | !default.pbxuser
34 | !default.perspectivev3
35 |
--------------------------------------------------------------------------------
/app/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 12.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/app/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/app/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/app/ios/Flutter/flutter_export_environment.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # This is a generated file; do not edit or check into version control.
3 | export "FLUTTER_ROOT=/Users/htc/Documents/Programing/Flutter/flutter"
4 | export "FLUTTER_APPLICATION_PATH=/Users/HTC/Documents/Programing/Flutter/iPomodoro-Flutter/app"
5 | export "COCOAPODS_PARALLEL_CODE_SIGN=true"
6 | export "FLUTTER_TARGET=lib/main.dart"
7 | export "FLUTTER_BUILD_DIR=build"
8 | export "FLUTTER_BUILD_NAME=4.0.0"
9 | export "FLUTTER_BUILD_NUMBER=240825"
10 | export "DART_OBFUSCATION=false"
11 | export "TRACK_WIDGET_CREATION=false"
12 | export "TREE_SHAKE_ICONS=true"
13 | export "PACKAGE_CONFIG=/Users/HTC/Documents/Programing/Flutter/iPomodoro-Flutter/app/.dart_tool/package_config.json"
14 |
--------------------------------------------------------------------------------
/app/ios/Podfile:
--------------------------------------------------------------------------------
1 | # Uncomment this line to define a global platform for your project
2 | # platform :ios, '12.0'
3 |
4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true'
6 |
7 | project 'Runner', {
8 | 'Debug' => :debug,
9 | 'Profile' => :release,
10 | 'Release' => :release,
11 | }
12 |
13 | def flutter_root
14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
15 | unless File.exist?(generated_xcode_build_settings_path)
16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
17 | end
18 |
19 | File.foreach(generated_xcode_build_settings_path) do |line|
20 | matches = line.match(/FLUTTER_ROOT\=(.*)/)
21 | return matches[1].strip if matches
22 | end
23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
24 | end
25 |
26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
27 |
28 | flutter_ios_podfile_setup
29 |
30 | target 'Runner' do
31 | use_frameworks!
32 | use_modular_headers!
33 |
34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
35 | end
36 |
37 | post_install do |installer|
38 | installer.pods_project.targets.each do |target|
39 | flutter_additional_ios_build_settings(target)
40 | end
41 | end
42 |
--------------------------------------------------------------------------------
/app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
37 |
38 |
39 |
40 |
41 |
42 |
52 |
54 |
60 |
61 |
62 |
63 |
69 |
71 |
77 |
78 |
79 |
80 |
82 |
83 |
86 |
87 |
88 |
--------------------------------------------------------------------------------
/app/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/app/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/ios/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import Flutter
3 |
4 | @main
5 | @objc class AppDelegate: FlutterAppDelegate {
6 | override func application(
7 | _ application: UIApplication,
8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9 | ) -> Bool {
10 |
11 | // flutter与原生桥接
12 | let controller = self.window.rootViewController as! FlutterViewController
13 | FlutterNativePlugin.shared.flutterController = controller
14 | FlutterNativePlugin.register(with: self.registrar(forPlugin: "FlutterNativePlugin")!)
15 |
16 | //push
17 | if #available(iOS 10.0, *) {
18 | UNUserNotificationCenter.current().delegate = self
19 | }
20 |
21 | // flutter插件通道代理
22 | GeneratedPluginRegistrant.register(with: self)
23 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
24 | }
25 | }
26 |
27 | //
28 | //FlutterViewController* controller =
29 | //(FlutterViewController*)self.window.rootViewController;
30 | //FlutterMethodChannel* channel =
31 | //[FlutterMethodChannel methodChannelWithName:@"io.baizi.flutter_open_native"
32 | // binaryMessenger:controller];
33 | //[channel setMethodCallHandler:^(FlutterMethodCall* call, FlutterResult result) {
34 | // if ([@"open_webview" isEqualToString:call.method]) { // 修改了方法名
35 | // UIViewController *vc = [[UIViewController alloc] init]; // 使用最简单的viewcontroller
36 | // vc.view.backgroundColor = [UIColor whiteColor]; // 不设置背景颜色,会出现空白,并且掉帧情
37 | // UINavigationController* navigationController =
38 | // [[UINavigationController alloc] initWithRootViewController:vc];
39 | // navigationController.navigationBar.topItem.title = @"浏览器";
40 | // [controller presentViewController:navigationController animated:YES completion:nil];// 增加动画,否则不容易看出来变化
41 | // } else {
42 | // result(FlutterMethodNotImplemented);
43 | // }
44 | //}];
45 |
--------------------------------------------------------------------------------
/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "icon-40.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "icon-60.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "icon-58.png",
19 | "scale" : "2x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "icon-87.png",
25 | "scale" : "3x"
26 | },
27 | {
28 | "size" : "40x40",
29 | "idiom" : "iphone",
30 | "filename" : "icon-80.png",
31 | "scale" : "2x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "icon-120.png",
37 | "scale" : "3x"
38 | },
39 | {
40 | "size" : "60x60",
41 | "idiom" : "iphone",
42 | "filename" : "icon-120.png",
43 | "scale" : "2x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "icon-180.png",
49 | "scale" : "3x"
50 | },
51 | {
52 | "idiom" : "ipad",
53 | "size" : "20x20",
54 | "scale" : "1x"
55 | },
56 | {
57 | "size" : "20x20",
58 | "idiom" : "ipad",
59 | "filename" : "icon-40.png",
60 | "scale" : "2x"
61 | },
62 | {
63 | "idiom" : "ipad",
64 | "size" : "29x29",
65 | "scale" : "1x"
66 | },
67 | {
68 | "size" : "29x29",
69 | "idiom" : "ipad",
70 | "filename" : "icon-58.png",
71 | "scale" : "2x"
72 | },
73 | {
74 | "idiom" : "ipad",
75 | "size" : "40x40",
76 | "scale" : "1x"
77 | },
78 | {
79 | "size" : "40x40",
80 | "idiom" : "ipad",
81 | "filename" : "icon-80.png",
82 | "scale" : "2x"
83 | },
84 | {
85 | "idiom" : "ipad",
86 | "size" : "76x76",
87 | "filename" : "icon-76.png",
88 | "scale" : "1x"
89 | },
90 | {
91 | "size" : "76x76",
92 | "idiom" : "ipad",
93 | "filename" : "icon-152.png",
94 | "scale" : "2x"
95 | },
96 | {
97 | "size" : "83.5x83.5",
98 | "idiom" : "ipad",
99 | "filename" : "icon-167.png",
100 | "scale" : "2x"
101 | },
102 | {
103 | "size" : "1024x1024",
104 | "idiom" : "ios-marketing",
105 | "filename" : "icon-1024.jpg",
106 | "scale" : "1x"
107 | }
108 | ],
109 | "info" : {
110 | "version" : 1,
111 | "author" : "xcode"
112 | }
113 | }
114 |
--------------------------------------------------------------------------------
/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-1024.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iHTCboy/iPomodoro-Flutter/3a05ca4f01bc1f9bc1c1d8a9cb63da54876d6634/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-1024.jpg
--------------------------------------------------------------------------------
/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-120.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iHTCboy/iPomodoro-Flutter/3a05ca4f01bc1f9bc1c1d8a9cb63da54876d6634/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-120.png
--------------------------------------------------------------------------------
/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-152.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iHTCboy/iPomodoro-Flutter/3a05ca4f01bc1f9bc1c1d8a9cb63da54876d6634/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-152.png
--------------------------------------------------------------------------------
/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-167.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iHTCboy/iPomodoro-Flutter/3a05ca4f01bc1f9bc1c1d8a9cb63da54876d6634/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-167.png
--------------------------------------------------------------------------------
/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-180.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iHTCboy/iPomodoro-Flutter/3a05ca4f01bc1f9bc1c1d8a9cb63da54876d6634/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-180.png
--------------------------------------------------------------------------------
/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iHTCboy/iPomodoro-Flutter/3a05ca4f01bc1f9bc1c1d8a9cb63da54876d6634/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-40.png
--------------------------------------------------------------------------------
/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-58.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iHTCboy/iPomodoro-Flutter/3a05ca4f01bc1f9bc1c1d8a9cb63da54876d6634/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-58.png
--------------------------------------------------------------------------------
/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-60.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iHTCboy/iPomodoro-Flutter/3a05ca4f01bc1f9bc1c1d8a9cb63da54876d6634/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-60.png
--------------------------------------------------------------------------------
/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iHTCboy/iPomodoro-Flutter/3a05ca4f01bc1f9bc1c1d8a9cb63da54876d6634/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-76.png
--------------------------------------------------------------------------------
/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-80.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iHTCboy/iPomodoro-Flutter/3a05ca4f01bc1f9bc1c1d8a9cb63da54876d6634/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-80.png
--------------------------------------------------------------------------------
/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-87.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iHTCboy/iPomodoro-Flutter/3a05ca4f01bc1f9bc1c1d8a9cb63da54876d6634/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-87.png
--------------------------------------------------------------------------------
/app/ios/Runner/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "filename" : "LaunchImage@2x.png",
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "filename" : "LaunchImage@3x.png",
14 | "idiom" : "universal",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "author" : "xcode",
20 | "version" : 1
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iHTCboy/iPomodoro-Flutter/3a05ca4f01bc1f9bc1c1d8a9cb63da54876d6634/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iHTCboy/iPomodoro-Flutter/3a05ca4f01bc1f9bc1c1d8a9cb63da54876d6634/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md:
--------------------------------------------------------------------------------
1 | # Launch Screen Assets
2 |
3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory.
4 |
5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
--------------------------------------------------------------------------------
/app/ios/Runner/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/app/ios/Runner/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/app/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CADisableMinimumFrameDurationOnPhone
6 |
7 | CFBundleDevelopmentRegion
8 | $(DEVELOPMENT_LANGUAGE)
9 | CFBundleDisplayName
10 | iPomodoro
11 | CFBundleExecutable
12 | $(EXECUTABLE_NAME)
13 | CFBundleIdentifier
14 | $(PRODUCT_BUNDLE_IDENTIFIER)
15 | CFBundleInfoDictionaryVersion
16 | 6.0
17 | CFBundleName
18 | iPomodoro
19 | CFBundlePackageType
20 | APPL
21 | CFBundleShortVersionString
22 | $(FLUTTER_BUILD_NAME)
23 | CFBundleSignature
24 | ????
25 | CFBundleVersion
26 | $(FLUTTER_BUILD_NUMBER)
27 | LSRequiresIPhoneOS
28 |
29 | UIApplicationSupportsIndirectInputEvents
30 |
31 | UILaunchStoryboardName
32 | LaunchScreen
33 | UIMainStoryboardFile
34 | Main
35 | UISupportedInterfaceOrientations
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationLandscapeLeft
39 | UIInterfaceOrientationLandscapeRight
40 | UIInterfaceOrientationPortraitUpsideDown
41 |
42 | UISupportedInterfaceOrientations~ipad
43 |
44 | UIInterfaceOrientationPortrait
45 | UIInterfaceOrientationPortraitUpsideDown
46 | UIInterfaceOrientationLandscapeLeft
47 | UIInterfaceOrientationLandscapeRight
48 |
49 | UIViewControllerBasedStatusBarAppearance
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/app/ios/Runner/Resource/Images/App-share-Icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iHTCboy/iPomodoro-Flutter/3a05ca4f01bc1f9bc1c1d8a9cb63da54876d6634/app/ios/Runner/Resource/Images/App-share-Icon.png
--------------------------------------------------------------------------------
/app/ios/Runner/Resource/files/iHTCboyApp.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "issue_title": "Apps",
4 | "issue_subtitle": "开发者应用",
5 | "issue_list": [
6 | {
7 | "title": "iCoder",
8 | "url": "https://itunes.apple.com/cn/app/iLeetCoder/id1458259471?l=zh&ls=1&mt=8",
9 | "author": "一款精心的算法题目学习App,迅速找到工作"
10 | },
11 | {
12 | "title": "iTer",
13 | "url": "https://itunes.apple.com/us/app/italker-it/id1224934068?l=zh&ls=1&mt=8",
14 | "author": "10000+ IT企业题库,为升职面试准备"
15 | },
16 | {
17 | "title": "爱五笔",
18 | "url": "https://itunes.apple.com/cn/app/iWuBi/id1459028801?l=zh&ls=1&mt=8",
19 | "author": "五笔学习App,支持86版和98版/简体和繁体"
20 | },
21 | {
22 | "title": "iEnglish",
23 | "url": "https://itunes.apple.com/cn/app/iEnglish/id1236558125?l=zh&ls=1&mt=8",
24 | "author": "初学者必备词汇,3000入门单词和词汇分类学习"
25 | },
26 | {
27 | "title": "SecurityNote",
28 | "url": "https://itunes.apple.com/cn/app/mi-ji-yu-zhong-bu-tong-ji/id925021570?l=zh&mt=8",
29 | "author": "简单简洁简明简便的生活小密记"
30 | }
31 | ]
32 | },
33 | {
34 | "issue_title": "开源项目",
35 | "issue_subtitle": "GitHub",
36 | "issue_list": [
37 | {
38 | "title": "OneMindMap",
39 | "url": "https://github.com/iHTCboy/OneMindMap/blob/master/README.md",
40 | "author": "一张思维导图的知识"
41 | },
42 | {
43 | "title": "iTalker",
44 | "url": "https://github.com/iHTCboy/iTalker",
45 | "author": "IT学习、求职面试必备,IT面试基础必备试题指南"
46 | },
47 | {
48 | "title": "English",
49 | "url": "https://github.com/iHTCboy/iEnglish",
50 | "author": "初学者必备词汇,3000入门单词和词汇分类学习"
51 | },
52 | {
53 | "title": "iWuBi",
54 | "url": "https://github.com/iHTCboy/iWuBi",
55 | "author": "五笔输入法知识的学习App,方便初学者学习和快速查询拆字等"
56 | },
57 | {
58 | "title": "iLeetcode-iOS",
59 | "url": "https://github.com/iHTCboy/iLeetcode-iOS",
60 | "author": "一款IT工程师们提供算法知识充电的应用"
61 | },
62 | {
63 | "title": "FullScreenBrowser",
64 | "url": "https://github.com/iHTCboy/FullScreenBrowser",
65 | "author": "一个超简单的全屏浏览器,真实无边"
66 | },
67 | {
68 | "title": "SecurityNote",
69 | "url": "https://github.com/iHTCboy/SecurityNote",
70 | "author": "超级简单和好用的笔记事本App"
71 | },
72 | {
73 | "title": "CampusOfGLUT",
74 | "url": "https://github.com/iHTCboy/CampusOfGLUT",
75 | "author": "桂林理工大学——校园通App"
76 | },
77 | {
78 | "title": "GLUTCloud",
79 | "url": "https://github.com/iHTCboy/GLUTCloud",
80 | "author": "桂林理工大学云图——桂工导航App"
81 | },
82 | {
83 | "title": "GLUTJW",
84 | "url": "https://github.com/iHTCboy/GLUTJWStuderForiPhone",
85 | "author": "桂林理工大学教务系统-学生版"
86 | }
87 | ]
88 | }
89 | ]
90 |
--------------------------------------------------------------------------------
/app/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/app/ios/Runner/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /*
2 | InfoPlist.strings
3 | Runner
4 |
5 | Created by HTC on 2021/2/23.
6 |
7 | */
8 |
--------------------------------------------------------------------------------
/app/ios/Runner/en.lproj/Main.strings:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/ios/Runner/iPomodoro/ITCommonAPI.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ITCommonAPI.swift
3 | // iTalker
4 | //
5 | // Created by HTC on 2017/4/23.
6 | // Copyright © 2017年 ihtc.cc @iHTCboy. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import MessageUI
11 |
12 |
13 | class ITCommonAPI: NSObject {
14 |
15 | static let shared = ITCommonAPI()
16 | private override init() {} //This prevents others from using the default '()' initializer for this class.
17 |
18 | }
19 |
20 | // update
21 | extension ITCommonAPI
22 | {
23 |
24 | }
25 |
26 | extension ITCommonAPI : MFMailComposeViewControllerDelegate
27 | {
28 | func sendEmail(recipients: Array, subject: String, messae: String, vc: UIViewController) {
29 | if MFMailComposeViewController.canSendMail() {
30 | let mail = MFMailComposeViewController()
31 | mail.mailComposeDelegate = self
32 | mail.setToRecipients(recipients)
33 | mail.setSubject(subject)
34 | mail.setMessageBody(messae, isHTML: false)
35 | vc.present(mail, animated: true, completion: nil)
36 | } else {
37 | // show failure alert
38 | }
39 | }
40 |
41 | func mailComposeController(_ controller: MFMailComposeViewController, didFinishWith result: MFMailComposeResult, error: Error?) {
42 | controller.dismiss(animated: true)
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/app/ios/Runner/iPomodoro/TableHeaderView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // TableHeaderView.swift
3 | // iTalker
4 | //
5 | // Created by HTC on 2019/4/24.
6 | // Copyright © 2019 ihtc.cc @iHTCboy. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class TableHeaderView: UIView {
12 |
13 | @IBOutlet var contentView: UIView!
14 | @IBOutlet weak var titleLbl: UILabel!
15 | @IBOutlet weak var subtitleLbl: UILabel!
16 |
17 | override init(frame: CGRect) {
18 | super.init(frame: frame)
19 | setupUI()
20 | }
21 |
22 | required init?(coder aDecoder: NSCoder) {
23 | super.init(coder: aDecoder)
24 | setupUI()
25 | }
26 |
27 | private func setupUI() {
28 | Bundle.main.loadNibNamed("TableHeaderView", owner: self, options: nil)
29 | addSubview(contentView)
30 | contentView.frame = self.frame
31 | contentView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
32 | }
33 |
34 | class func initView(title: String, subtitle: String, height: CGFloat) -> TableHeaderView {
35 | let hview = TableHeaderView.init(frame: CGRect.init(x: 0, y: 0, width: UIScreen.main.bounds.width, height: height))
36 | hview.titleLbl.text = title
37 | hview.subtitleLbl.text = subtitle
38 | if UIDevice.current.userInterfaceIdiom == .pad {
39 | hview.titleLbl.font = UIFont.systemFont(ofSize: 17)
40 | hview.subtitleLbl.font = UIFont.systemFont(ofSize: 14)
41 | }
42 | return hview
43 | }
44 |
45 | }
46 |
47 |
--------------------------------------------------------------------------------
/app/ios/Runner/iPomodoro/TableHeaderView.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
28 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/app/ios/Runner/zh-Hans.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /*
2 | InfoPlist.strings
3 | Runner
4 |
5 | Created by HTC on 2021/2/23.
6 |
7 | */
8 |
9 |
10 | "CFBundleName" = "爱番茄";
11 | "CFBundleDisplayName" = "爱番茄";
12 |
--------------------------------------------------------------------------------
/app/ios/Runner/zh-Hans.lproj/LaunchScreen.strings:
--------------------------------------------------------------------------------
1 |
2 | /* Class = "UILabel"; text = "iPomodoro"; ObjectID = "XSp-Ly-PkP"; */
3 | "XSp-Ly-PkP.text" = "爱番茄";
4 |
--------------------------------------------------------------------------------
/app/ios/Runner/zh-Hans.lproj/Main.strings:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/ios/Runner/zh-Hant.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /*
2 | InfoPlist.strings
3 | Runner
4 |
5 | Created by HTC on 2021/2/23.
6 |
7 | */
8 |
9 |
10 | "CFBundleName" = "愛蕃茄";
11 | "CFBundleDisplayName" = "愛蕃茄";
12 |
--------------------------------------------------------------------------------
/app/ios/Runner/zh-Hant.lproj/LaunchScreen.strings:
--------------------------------------------------------------------------------
1 |
2 | /* Class = "UILabel"; text = "iPomodoro"; ObjectID = "XSp-Ly-PkP"; */
3 | "XSp-Ly-PkP.text" = "愛蕃茄";
4 |
--------------------------------------------------------------------------------
/app/ios/Runner/zh-Hant.lproj/Main.strings:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/lib/common/channel/native_method_channel.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/services.dart';
2 |
3 |
4 | //调用原生方法
5 | class NativeChannel {
6 |
7 | static Future invokeMethod(String method) async {
8 | const platform = const MethodChannel('iPomodoro');
9 | var result;
10 | try {
11 | result = await platform.invokeMethod(method);
12 | return Future.value(result);
13 | } on PlatformException catch (e) {
14 | return Future.error(e.toString());
15 | }
16 | }
17 |
18 | static Future requestReview() async {
19 | const platform = const MethodChannel('iPomodoro');
20 | var result;
21 | try {
22 | result = await platform.invokeMethod('requestReview');
23 | return Future.value(result);
24 | } on PlatformException catch (e) {
25 | return Future.error(e.toString());
26 | }
27 | }
28 |
29 | static Future gotoStoreReview() async {
30 | const platform = const MethodChannel('iPomodoro');
31 | var result;
32 | try {
33 | result = await platform.invokeMethod('gotoStoreReview');
34 | return Future.value(result);
35 | } on PlatformException catch (e) {
36 | return Future.error(e.toString());
37 | }
38 | }
39 |
40 | static Future shareApp(String url, String content) async {
41 | const platform = const MethodChannel('iPomodoro');
42 | var result;
43 | try {
44 | result = await platform.invokeMethod('shareApp', {'url': url, 'content': content});
45 | return Future.value(result);
46 | } on PlatformException catch (e) {
47 | return Future.error(e.toString());
48 | }
49 | }
50 |
51 | static Future emailConnect(String appname, String email) async {
52 | const platform = const MethodChannel('iPomodoro');
53 | var result;
54 | try {
55 | result = await platform.invokeMethod('email', {'appname': appname, 'email': email});
56 | return Future.value(result);
57 | } on PlatformException catch (e) {
58 | return Future.error(e.toString());
59 | }
60 | }
61 |
62 | static Future moreLearn() async {
63 | const platform = const MethodChannel('iPomodoro');
64 | var result;
65 | try {
66 | result = await platform.invokeMethod('more');
67 | return Future.value(result);
68 | } on PlatformException catch (e) {
69 | return Future.error(e.toString());
70 | }
71 | }
72 |
73 | static Future appVersion() async {
74 | const platform = const MethodChannel('iPomodoro');
75 | var result;
76 | try {
77 | result = await platform.invokeMethod('version');
78 | return Future.value(result);
79 | } on PlatformException catch (e) {
80 | return Future.error(e.toString());
81 | }
82 | }
83 |
84 | static Future timeZone() async {
85 | const platform = const MethodChannel('iPomodoro');
86 | var result;
87 | try {
88 | result = await platform.invokeMethod('timeZone');
89 | return Future.value(result);
90 | } on PlatformException catch (e) {
91 | return Future.error(e.toString());
92 | }
93 | }
94 |
95 | static Future changeBadgeNumber(int badgeNumber) async {
96 | const platform = const MethodChannel('iPomodoro');
97 | var result;
98 | try {
99 | result = await platform.invokeMethod('badgeNumber', {'badgeNumber': badgeNumber});
100 | return Future.value(result);
101 | } on PlatformException catch (e) {
102 | return Future.error(e.toString());
103 | }
104 | }
105 |
106 | static Future idleTimerDisabled(bool idDisabled) async {
107 | const platform = const MethodChannel('iPomodoro');
108 | var result;
109 | try {
110 | result = await platform.invokeMethod('idleTimer', {'idleTimer': idDisabled});
111 | return Future.value(result);
112 | } on PlatformException catch (e) {
113 | return Future.error(e.toString());
114 | }
115 | }
116 |
117 | static Future changeBrightness(String brightness, {String getBrightness="0"}) async {
118 | const platform = const MethodChannel('iPomodoro');
119 | var result;
120 | try {
121 | result = await platform.invokeMethod('brightness', {'brightness': brightness, 'getBrightness': getBrightness});
122 | return Future.value(result);
123 | } on PlatformException catch (e) {
124 | return Future.error(e.toString());
125 | }
126 | }
127 |
128 | static Future openPrivacyView(String languageCode) async {
129 | const platform = const MethodChannel('iPomodoro');
130 | var result;
131 | try {
132 | result = await platform.invokeMethod('privacy_policy', {'languageCode': languageCode});
133 | return Future.value(result);
134 | } on PlatformException catch (e) {
135 | return Future.error(e.toString());
136 | }
137 | }
138 |
139 | }
140 |
--------------------------------------------------------------------------------
/app/lib/common/constant/app_colors.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class AppColors {
4 | //主色
5 | static const Color PRIMARY_MAIN_COLOR = const Color(0xFFD74A49);
6 | static const Color PRIMARY_SUB_COLOR = const Color(0xFFDC5C5D);
7 | static const Color TIMER_MAIN_COLOR = const Color(0xFF4F97E0);
8 | static const Color TIMER_SUB_COLOR = const Color(0xFF579DE5);
9 | static const Color COUNTDOWN_MAIN_COLOR = const Color(0xFFFF8900);
10 | static const Color COUNTDOWN_SUB_COLOR = const Color(0xFFFF9F40);
11 | static const Color ME_MAIN_COLOR = const Color(0xFF007C21);
12 | static const Color ME_SUB_COLOR = const Color(0xFF248F40);
13 |
14 | static bool isDarkMode(BuildContext context){
15 | return Theme.of(context).brightness == Brightness.dark;
16 | }
17 | }
--------------------------------------------------------------------------------
/app/lib/common/utils/audio_utils.dart:
--------------------------------------------------------------------------------
1 | import 'package:audioplayers/audioplayers.dart';
2 |
3 | // https://pub.dev/packages/audioplayers/example
4 | class AudioPlayerUtil {
5 | static AudioPlayer player = AudioPlayer();
6 | AudioPlayer audioPlayer = AudioPlayer();
7 | final AudioContext audioContext = AudioContext(
8 | iOS: AudioContextIOS(
9 | category: AVAudioSessionCategory.playback,
10 | options: [
11 | AVAudioSessionOptions.defaultToSpeaker,
12 | AVAudioSessionOptions.allowAirPlay,
13 | AVAudioSessionOptions.allowBluetooth,
14 | AVAudioSessionOptions.allowBluetoothA2DP,
15 | AVAudioSessionOptions.mixWithOthers,
16 | ],
17 | ),
18 | android: AudioContextAndroid(
19 | isSpeakerphoneOn: true,
20 | stayAwake: true,
21 | contentType: AndroidContentType.music,
22 | usageType: AndroidUsageType.media,
23 | audioFocus: AndroidAudioFocus.gain,
24 | ),
25 | );
26 |
27 | static playAudio(url) {
28 | if (url == null) {
29 | return player.resume();
30 | } else {
31 | return player.play(AssetSource(url));
32 | }
33 | }
34 |
35 | static stopAudio() {
36 | return player.stop();
37 | }
38 | setCache(url) {
39 | AudioPlayer.global.setGlobalAudioContext(audioContext);
40 | audioPlayer.setPlayerMode(PlayerMode.lowLatency);
41 | return audioPlayer.setSource(AssetSource(url));
42 | }
43 |
44 | play(url) {
45 | if (url == null) {
46 | if (audioPlayer.state == PlayerState.playing) {
47 | return;
48 | }
49 | return audioPlayer.resume();
50 | } else {
51 | return audioPlayer.play(AssetSource(url));
52 | }
53 | }
54 |
55 | seek(duration) {
56 | return audioPlayer.seek(duration);
57 | }
58 |
59 | loop(bool isLoop) {
60 | audioPlayer.setReleaseMode(isLoop ? ReleaseMode.loop : ReleaseMode.stop);
61 | }
62 |
63 | stop() {
64 | return audioPlayer.stop();
65 | }
66 |
67 | pause() {
68 | return audioPlayer.pause();
69 | }
70 |
71 | release() {
72 | return audioPlayer.release();
73 | }
74 |
75 | }
--------------------------------------------------------------------------------
/app/lib/common/utils/config_storage.dart:
--------------------------------------------------------------------------------
1 | import 'package:shared_preferences/shared_preferences.dart';
2 |
3 | class AppStorage {
4 |
5 | static const String K_STRING_POMODORO_HOURS = "k_string_pomodoro_hours";
6 | static const String K_STRING_POMODORO_MINUTES = "k_string_pomodoro_minutes";
7 | static const String K_STRING_POMODORO_BREAK_SHORT = "k_string_pomodoro_break_short";
8 | static const String K_STRING_POMODORO_BREAK_LONG = "k_string_pomodoro_break_long";
9 | static const String K_STRING_POMODORO_BREAK_LONG_DELAY = "k_string_pomodoro_break_long_delay";
10 | static const String K_STRING_POMODORO_NOTIFICATION = "k_string_pomodoro_notification";
11 | static const String K_STRING_POMODORO_TICKING_SOUND = "k_string_pomodoro_tick_sound";
12 | static const String K_STRING_POMODORO_ALARM_SOUND = "k_string_pomodoro_alarm_sound";
13 | static const String K_STRING_POMODORO_TITLE_BAR_COLOR = "k_string_pomodoro_title_bar_color";
14 | static const String K_STRING_POMODORO_BACKGROUND_COLOR = "k_string_pomodoro_background_color";
15 | static const String K_STRING_TIMER_HOURS = "k_string_timer_hours";
16 | static const String K_STRING_TIMER_MINUTES = "k_string_timer_minutes";
17 | static const String K_STRING_TIMER_NOTIFICATION = "k_string_timer_notification";
18 | static const String K_STRING_TIMER_TICKING_SOUND = "k_string_timer_tick_sound";
19 | static const String K_STRING_TIMER_ALARM_SOUND = "k_string_timer_alarm_sound";
20 | static const String K_STRING_TIMER_TITLE_BAR_COLOR = "k_string_timer_title_bar_color";
21 | static const String K_STRING_TIMER_BACKGROUND_COLOR = "k_string_timer_background_color";
22 | static const String K_STRING_COUNTDOWN_ORDER_INDEX = "k_string_countdown_order_idex";
23 | static const String K_STRING_COUNTDOWN_TITLE_BAR_COLOR = "k_string_countdown_title_bar_color";
24 | static const String K_STRING_COUNTDOWN_BACKGROUND_COLOR = "k_string_countdown_background_color";
25 | static const String K_STRING_LANGUAGE_SETTINGS = "k_string_language_settings";
26 | static const String K_STRING_PRIVACY_SHOW_TIPS = "k_string_privacy_show_tips";
27 |
28 |
29 | static Future setInt(String key, int value) async {
30 | final prefs = await SharedPreferences.getInstance();
31 | bool status = await prefs.setInt(key, value);
32 | return status;
33 | }
34 |
35 | static Future setBool(String key, bool value) async {
36 | final prefs = await SharedPreferences.getInstance();
37 | bool status = await prefs.setBool(key, value);
38 | return status;
39 | }
40 |
41 | static Future setString(String key, String value) async {
42 | final prefs = await SharedPreferences.getInstance();
43 | bool status = await prefs.setString(key, value);
44 | return status;
45 | }
46 |
47 | static Future getInt(String key) async {
48 | final prefs = await SharedPreferences.getInstance();
49 | int? result = prefs.getInt(key);
50 | return result;
51 | }
52 |
53 | static Future getBool(String key) async {
54 | final prefs = await SharedPreferences.getInstance();
55 | bool? result = prefs.getBool(key);
56 | return result;
57 | }
58 |
59 | static Future getString(String key) async {
60 | final prefs = await SharedPreferences.getInstance();
61 | String? result = prefs.getString(key);
62 | return result;
63 | }
64 |
65 | }
66 |
--------------------------------------------------------------------------------
/app/lib/common/utils/database_utils.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/cupertino.dart';
2 | import 'package:sqflite/sqflite.dart';
3 | import 'package:path/path.dart';
4 |
5 | class DataBaseUtils {
6 | static Database _database = openDatabase("") as Database;
7 |
8 | ///创建数据库db
9 | static db_createDb(String dbName, int vers, String dbTables) async {
10 | //获取数据库路径
11 | var databasesPath = await getDatabasesPath();
12 | String path = join(databasesPath, dbName);
13 | debugPrint("DataBase:$path ,version:$vers");
14 | //打开数据库
15 | _database = await openDatabase(path,
16 | version: vers,
17 | onUpgrade: (Database db, int oldVersion, int newVersion) async {
18 | //数据库升级,只回调一次
19 | debugPrint("数据库需要升级!旧版:$oldVersion,新版:$newVersion");
20 | }, onCreate: (Database db, int vers) async {
21 | // print('创建数据库表');
22 | //创建表,只回调一次
23 | await db.execute(dbTables);
24 | await db.close();
25 | });
26 | }
27 |
28 | static Future getCurrentDatabase(String dbName) async {
29 | if (!_database.isOpen) {
30 | // _database = null;
31 | var databasesPath = await getDatabasesPath();
32 | String path = join(databasesPath, dbName);
33 | _database = await openDatabase(path);
34 | }
35 | return _database;
36 | }
37 |
38 | ///增(事务方式)
39 | static db_add(String dbName, String sql) async {
40 | //获取数据库路径
41 | var databasesPath = await getDatabasesPath();
42 | String path = join(databasesPath, dbName);
43 | Database db = await openDatabase(path);
44 |
45 | await db.transaction((txn) async {
46 | int count = await txn.rawInsert(sql);
47 | });
48 | await db.close();
49 | }
50 |
51 | /// 插入
52 | static Future db_insert(String dbName, String table, Map values) async {
53 | //获取数据库路径
54 | var databasesPath = await getDatabasesPath();
55 | String path = join(databasesPath, dbName);
56 | Database db = await openDatabase(path);
57 |
58 | int id = await db.insert(table, values);
59 | await db.close();
60 | return id; //返回最后插入的记录ID
61 | }
62 | /*
63 | int id0 = await db.insert('Test', {'name': 'another', 'value': '18', 'num': '456.7'});
64 | int id1 = await db.rawInsert('INSERT INTO Test(name, value, num) VALUES("some name", 1234, 456.789)');
65 | int id2 = await db.rawInsert('INSERT INTO Test(name, value, num) VALUES(?, ?, ?)', ['another', 12345678, 3.1416]);
66 | */
67 |
68 | ///删
69 | static Future db_delete(String dbName, String sql, List arg) async {
70 | var databasesPath = await getDatabasesPath();
71 | String path = join(databasesPath, dbName);
72 | Database db = await openDatabase(path);
73 |
74 | int count = await db.rawDelete(sql, arg);
75 | await db.close();
76 | return count; //返回受影响的的数量,即删除的条目数量
77 | }
78 |
79 | ///改
80 | static Future db_update(String dbName, String sql, List arg) async {
81 | var databasesPath = await getDatabasesPath();
82 | String path = join(databasesPath, dbName);
83 | Database db = await openDatabase(path);
84 |
85 | int count = await db.rawUpdate(sql, arg); //修改条件,对应参数值
86 | await db.close();
87 | return count; //返回受影响的的数量
88 | }
89 |
90 | ///查条数
91 | static Future db_getQueryNum(String dbName, String sql) async {
92 | var databasesPath = await getDatabasesPath();
93 | String path = join(databasesPath, dbName);
94 | Database db = await openDatabase(path);
95 |
96 | int? count = Sqflite.firstIntValue(await db.rawQuery(sql));
97 | await db.close();
98 | return count ?? 0;
99 | }
100 |
101 | ///查全部
102 | static Future> db_query(String dbName, String sql) async {
103 | var databasesPath = await getDatabasesPath();
104 | String path = join(databasesPath, dbName);
105 | Database db = await openDatabase(path);
106 | List