mirror of
https://github.com/kuhyx/diet-guard.git
synced 2026-11-10 19:07:15 +01:00
Some checks failed
dependency freshness / dependencies on newest stable (push) Has been cancelled
file-length / file length <= 250 lines (push) Has been cancelled
md-naming / markdown naming convention (push) Has been cancelled
pre-commit / pre-commit (${{ matrix.group }}) (mypy, mypy, ) (push) Has been cancelled
pre-commit / pre-commit (${{ matrix.group }}) (pylint, pylint, ) (push) Has been cancelled
pre-commit / pre-commit (${{ matrix.group }}) (rest, , mypy,pylint) (push) Has been cancelled
Tests / test (push) Has been cancelled
release-apk / release (APK) (push) Has been cancelled
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
26 lines
645 B
Dart
26 lines
645 B
Dart
/// Web half of `health_steps_source.dart`: no Health Connect in a browser.
|
|
library;
|
|
|
|
import 'package:diet_guard_app/services/health_steps.dart';
|
|
|
|
/// A source that never reads anything.
|
|
StepsSource createStepsSource() => const NoStepsSource();
|
|
|
|
/// Reports "unsupported" and reads nothing.
|
|
class NoStepsSource implements StepsSource {
|
|
/// Creates the source.
|
|
const NoStepsSource();
|
|
|
|
@override
|
|
bool get supported => false;
|
|
|
|
@override
|
|
Future<bool> hasPermission() async => false;
|
|
|
|
@override
|
|
Future<bool> requestPermission() async => false;
|
|
|
|
@override
|
|
Future<List<StepInterval>> read(DateTime from, DateTime to) async => [];
|
|
}
|