Resolve all lints and deprecation warnings
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
import 'package:health/health.dart';
|
||||
import 'package:collection/collection.dart';
|
||||
import 'dart:io';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import '../models/cycle_entry.dart';
|
||||
|
||||
@@ -10,14 +8,12 @@ class HealthService {
|
||||
HealthService._internal();
|
||||
|
||||
final Health _health = Health();
|
||||
|
||||
|
||||
// ignore: unused_field
|
||||
List<HealthDataType> _requestedTypes = [];
|
||||
|
||||
// TODO: Fix HealthDataType for menstruation in newer health package versions
|
||||
static const List<HealthDataType> _menstruationDataTypes = [
|
||||
// HealthDataType.MENSTRUATION - Not found in recent versions?
|
||||
HealthDataType.STEPS, // Placeholder to avoid compile error
|
||||
HealthDataType.MENSTRUATION_FLOW,
|
||||
];
|
||||
|
||||
Future<bool> requestAuthorization(List<HealthDataType> types) async {
|
||||
@@ -37,9 +33,10 @@ class HealthService {
|
||||
|
||||
Future<bool> writeMenstruationData(List<CycleEntry> entries) async {
|
||||
// This feature is currently disabled until compatible HealthDataType is identified
|
||||
debugPrint("writeMenstruationData: Currently disabled due to package version incompatibility.");
|
||||
debugPrint(
|
||||
"writeMenstruationData: Currently disabled due to package version incompatibility.");
|
||||
return false;
|
||||
|
||||
|
||||
/*
|
||||
final periodEntries = entries.where((entry) => entry.isPeriodDay).toList();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user