A simple, cross-platform Pomodoro timer app with WebHook support.
- β± Adjustable work, short break, and long break durations
- π Adjustable lap count
- π Webhook integration
- π Light/Dark theme
- π Themes in a variety of colors
- β° Customizable timer font
- π’ Customizable sounds
- Space or Enter to start/pause the timer
- s to skip the lap
- r or BackSpace to reset the timer
You can configure WebHooks from the Settings page. When a webhook is triggered, RGB color data in JSON format will be sent along (check below). This RGB color data corresponds to the color of the circular progress indicator on the home page. You can see an example of this data below:
{
"rgb": [
255, // RED Value
0, // GREEN Value
156, // BLUE Value
]
}
If you would like to trigger multiple WebHook URLs from a single event, you can enter multiple URLs separated by a comma. e.g.:
https://example.com/api/v1/webhooks/start,https://example2.com/api/v1/webhooks/toggle
The main reason I created this application was to use these WebHooks to control my ambient light using HomeAssistant. If you have an RGB(W) LED bulb connected to HomeAssistant, you can create a new WebHook automation, and use the sample configuration below to set your light bulb's color to the data provided by Pomo:
alias: Timer Tick Webhook
description: "Runs every second, whenever Pomo ticks."
trigger:
- platform: webhook
allowed_methods:
- POST
- PUT
local_only: true
webhook_id: "-YOUR_WEBHOOK_ID"
condition:
- condition: device
type: is_on
device_id: REPLACE_WITH_DEVICE_ID
entity_id: REPLACE_WITH_ENTITY_ID
domain: light
action:
- service: light.turn_on
metadata: {}
data:
rgb_color: "{{ trigger.json['rgb'] }}"
transition: 1
target:
entity_id: light.192_168_1_3
mode: single
You can either download and install one of the already-built releases, or build it yourself.
- Flutter 3.24.4
- Dart 3.5.4
This project contains 3 flavors:
- development
- staging
- production
To run the desired flavor either use the launch configuration in VSCode/Android Studio or use the following commands:
# Development
$ flutter run --flavor development --target lib/main_development.dart
# Staging
$ flutter run --flavor staging --target lib/main_staging.dart
# Production
$ flutter run --flavor production --target lib/main_production.dart
*Pomo works on iOS, Android, Web, Linux, MacOS, and Windows.
This project relies on flutter_localizations and follows the official internationalization guide for Flutter.
- To add a new localizable string, open the
app_en.arb
file atlib/l10n/arb/app_en.arb
.
{
"@@locale": "en",
"counterAppBarTitle": "Counter",
"@counterAppBarTitle": {
"description": "Text shown in the AppBar of the Counter Page"
}
}
- Then add a new key/value and description
{
"@@locale": "en",
"counterAppBarTitle": "Counter",
"@counterAppBarTitle": {
"description": "Text shown in the AppBar of the Counter Page"
},
"helloWorld": "Hello World",
"@helloWorld": {
"description": "Hello World Text"
}
}
- Use the new string
import 'package:pomo/l10n/l10n.dart';
@override
Widget build(BuildContext context) {
final l10n = context.l10n;
return Text(l10n.helloWorld);
}
Update the CFBundleLocalizations
array in the Info.plist
at ios/Runner/Info.plist
to include the new locale.
...
<key>CFBundleLocalizations</key>
<array>
<string>en</string>
</array>
...
- For each supported locale, add a new ARB file in
lib/l10n/arb
.
βββ l10n
β βββ arb
β β βββ app_en.arb
β β βββ app_es.arb
- Add the translated strings to each
.arb
file:
app_en.arb
{
"@@locale": "en",
"timer": "Timer"
...
}
To use the latest translations changes, you will need to generate them:
- Generate localizations for the current project:
flutter gen-l10n --arb-dir="lib/l10n/arb"
Alternatively, run flutter run
and code generation will take place automatically.
To use the latest splash screen changes, you will need to generate them:
dart run flutter_native_splash:create
To use the latest launcher icon (<project root>/assets/images/pomo_logo.png
) changes, you will need to generate them:
dart run flutter_launcher_icons
-
Enable web support:
$ flutter config --enable-web
-
Build the web app:
$ flutter build web --release -o docs
Follow the steps here. Make sure to create a keystore.
$ flutter build apk
-
Install and activate the
flutter_distributor
plugin:$ flutter pub global activate flutter_distributor
-
Install the OS dependencies:
$ sudo apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev gstreamer1.0-plugins-good gstreamer1.0-plugins-bad libgtk-3-0 libblkid1 liblzma5
-
Enable Linux desktop support:
$ flutter config --enable-linux-desktop
$ flutter_distributor release --name=dev --jobs=release-dev-linux-deb
$ sudo apt-get install rpm patchelf
$ flutter_distributor release --name=dev --jobs=release-dev-linux-rpm
By recoskyler - 2024
- Used Major Mono Display font by Emre Parlak.