feat: Implement husband features and fix iOS Safari web startup

Implement initial features for husband's companion app, including mock data
service and husband notes screen. Refactor scripture and cycle services
for improved stability and testability. Address iOS Safari web app
startup issue by removing deprecated initialization.

- Implemented MockDataService and HusbandNotesScreen.
- Converted _DashboardTab and DevotionalScreen to StatefulWidgets for robust
  scripture provider initialization.
- Refactored CycleService to use immutable CycleInfo class, reducing UI rebuilds.
- Removed deprecated window.flutterConfiguration from index.html, resolving
  Flutter web app startup failure on iOS Safari.
- Updated and fixed related tests.
This commit is contained in:
2025-12-26 22:40:52 -06:00
parent 464692ce56
commit b4b2bfe749
47 changed files with 240110 additions and 2578 deletions

View File

@@ -0,0 +1,40 @@
import 'package:christian_period_tracker/models/cycle_entry.dart';
import 'package:flutter_test/flutter_test.dart';
void main() {
group('CycleEntry', () {
test('hasSymptoms returns true when there are symptoms', () {
final entry = CycleEntry(
id: '1',
date: DateTime.now(),
createdAt: DateTime.now(),
updatedAt: DateTime.now(),
hasHeadache: true,
);
expect(entry.hasSymptoms, isTrue);
});
test('hasSymptoms returns false when there are no symptoms', () {
final entry = CycleEntry(
id: '1',
date: DateTime.now(),
createdAt: DateTime.now(),
updatedAt: DateTime.now(),
);
expect(entry.hasSymptoms, isFalse);
});
test('symptomCount returns the correct number of symptoms', () {
final entry = CycleEntry(
id: '1',
date: DateTime.now(),
createdAt: DateTime.now(),
updatedAt: DateTime.now(),
hasHeadache: true,
hasBloating: true,
crampIntensity: 2,
);
expect(entry.symptomCount, 3);
});
});
}