Fix source default, hide health settings section when unavailable

This commit is contained in:
Roland Geider
2026-07-11 01:37:19 +02:00
parent f0a088eb0e
commit 7ebb97c462
7 changed files with 47 additions and 31 deletions

View File

@@ -5192,7 +5192,7 @@ class $MeasurementEntryTableTable extends MeasurementEntryTable
false,
type: DriftSqlType.string,
requiredDuringInsert: false,
defaultValue: const Constant('manual'),
defaultValue: const Constant('user'),
);
static const VerificationMeta _externalIdMeta = const VerificationMeta(
'externalId',

View File

@@ -71,9 +71,9 @@ class MeasurementEntryTable extends Table {
RealColumn get value => real()();
TextColumn get notes => text()();
/// Where the reading came from: `manual` or a health platform
/// (`apple_health`, `health_connect`).
TextColumn get source => text().withDefault(const Constant('manual'))();
/// Where the reading came from; one of the server's `source` values:
/// `user` for manual entries or a health platform (`apple`, `google`).
TextColumn get source => text().withDefault(const Constant('user'))();
/// Platform record UUID, used to deduplicate re-imports. `null` for manual
/// entries.