Skip to main content

gopromotional_siplog 1.0.1 copy "gopromotional_siplog: ^1.0.1" to clipboard
gopromotional_siplog: ^1.0.1 copied to clipboard

Daily water goal estimate and a simple hydration log with streaks.

gopromotional_siplog #

A small hydration tracker: estimate a daily water goal from weight, exercise and weather, log drinks in ml, cl, litres or US fl oz, and see today's progress, the last 7 days, your average and your streak. The log is a plain JSON file.

  • Daily goal estimate: weight × 33 ml + 12 ml per active minute (+500 ml in hot weather), rounded to 50 ml. A general guide, not medical advice.
  • Flexible amounts: 250, 500ml, 33cl, 0.5l, 16oz.
  • Progress, 7-day history, average and streak of days on target.
  • Undo the last entry, set your own goal.
  • Plain JSON log ({goal, entries:[{date, ml}]}), the same format in every language version.

Install #

dart pub add gopromotional_siplog

Usage #

import 'dart:convert';
import 'dart:io';

import 'package:gopromotional_siplog/gopromotional_siplog.dart';

void main() {
  print(dailyGoal(weightKg: 70, activityMinutes: 30, hot: true)); // 3150
  final file = File('log.json');                                   // same file as the CLI versions
  final log = file.existsSync() ? HydrationLog.fromJson(file.readAsStringSync()) : HydrationLog();
  log.add('500ml', date: '2026-10-19');
  print(log.progress(date: '2026-10-19').toJson());                // {date: 2026-10-19, total: 500, goal: 2000, percent: 25, ...}
  file.writeAsStringSync(jsonEncode(log));
}

Pure Dart, no dependencies; works on the VM, Flutter and the web. Run the tests with dart test.

0
likes
160
points
40
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Daily water goal estimate and a simple hydration log with streaks.

Homepage
Repository (GitHub)
View/report issues

Topics

#health #hydration #tracker #utility #json

License

MIT (license)

More

Packages that depend on gopromotional_siplog