A time tracking application built with Flutter & Firebase:
This is a toy project based on Andrea Bizotto's starter architecture with Riverpod.
- Simple onboarding page
- Full authentication flow with email/password and other providers
- Topology: A user can define their own categories and jobs
- Entries: for each job, user can view, create, edit, and delete the corresponding entries (an entry is a task with a start and end time, with an optional comment)
- Timer: on the start page, the user can close one job and open another
- A report page (TBD) that shows a daily breakdown of all jobs, hours worked and pay, along with the totals.
All the data is persisted with Firestore and is kept in sync across multiple devices.
- more tests
- additional auth providers
- WearOS compagnion app
- report page/summary
- custom styling
firebase login
firebase configuredart run build_runner watch -d
firebase init firestore
firebase deploy --only firestore:rulesflutter build ios --release --no-codesign --config-only
cd ios
bundle exec fastlane ios build_and_distribute The Auth emulator is preseeded with two tester accounts. If those get regenerated, update the tests with the new uid
The Firestore emulator gets wiped and seeded multiple times during the test, but only for the UID matching the tester1@foo.bar account.
firebase emulators:start --export-on-exit --import ./dataThis is a bit tricky, since flutter emulator shows a list of available emulator ids but the tests
need to be started with the device id. That one is only available once the emulator has been
started, and it changes.
For best results, close all open emulators, then start one at a time which will likely use device
id emulator-5560
Available emulators (check with flutter emulators):
IOS
apple_ios_simulator • iOS Simulator • Apple • ios
Android
- Nexus_10_API_33 • Nexus 10 API 33 • Google • android
- Nexus_7_API_33 • Nexus 7 API 33 • Google • android
- Pixel_2_API_33 • Pixel 2 API 33 • Google • android
- Pixel_6_API_33 • Pixel 6 API 33 • User • android
To kill use adb devices. flutter devices works as well but the output is more chatty
adb devices
## for each emulator_55xx
adb -s emulator-5554 emu kill Or kill all with this:
adb devices | grep emulator | cut -f1 | while read line; do adb -s $line emu kill; doneflutter emulators --launch Nexus_10_API_33
## check that the id is really emulator-5554
flutter drive --driver=test_driver/integration_test.dart --target=integration_test/screenshots_test.dart -d emulator-5554
cp screenshots/tmp screenshots/nexus_10_portrait
| Android | |
|---|---|
| phoneScreenshots | Pixel_6_API_33 |
| sevenInchScreenshots | Nexus_7_API_33 |
| tenInchScreenshots | Nexus_10_API_33 |
| iOS | |
|---|---|
| iPhone 6.7 Display | iPhone 14 Pro Max (5DDF4716-EA15-4109-8F87-11E65126F940) |
| iPhone 6.5 Display | iPhone 14 Pro (466BFECA-CBBF-462F-AF8A-46BBF72487F5) |
| iPhone 5.5" Display | iPhone 8 Plus (19230BBC-5317-4E5B-A8D8-32381577C58E) |
| iPad Pro (6th Gen) 12.9" Display | iPad Pro (12.9-inch) (6th generation) (D5E47BC1-2BD6-4A7A-A489-9D066A70A8CC) |
| iPad Pro (2nd Gen) 12.9" Display | iPad Pro (12.9-inch) (2nd generation) (4C5F8D46-DBDA-4B07-9870-2F3E4624D4F2) |
Move the generated output to fastlane/metadata
bundle exec fastlane supply --skip_upload_changelogsGet a list of all available simulators. If the right one isn't available, create it.
xcrun simctl listFind the device id of the simulator you want. Start it, then run the tests
open -a simulator --args -CurrentDeviceUDID 5DDF4716-EA15-4109-8F87-11E65126F940
flutter drive --driver=test_driver/integration_test.dart --target=integration_test/screenshots_test.dart -d 5DDF4716-EA15-4109-8F87-11E65126F940the output needs to be renamed, can't just be dumped into a directory like with android
First download meta info once
bundle exec fastlane deliver init
bundle exec fastlane deliver download_screenshotsAfterwards, build and upload to testflight, check, fix assets, promote to appstore and include screenshots