Enhance analysis options and documentation; ignore build context usage in multiple files, update schedule service to return overview, and add session handoff template

This commit is contained in:
Sven laptop
2026-05-12 10:56:06 +02:00
parent 5b35df685c
commit 9dd663cce5
8 changed files with 551 additions and 117 deletions
+1
View File
@@ -1,4 +1,5 @@
analyzer:
errors:
deprecated_member_use: ignore
use_build_context_synchronously: ignore
include: package:flutter_lints/flutter.yaml
@@ -1,3 +1,5 @@
// ignore_for_file: use_build_context_synchronously
import 'package:flutter/material.dart';
import '../models/schedule.dart' as sched;
import '../models/navigation.dart';
@@ -5,7 +5,6 @@ import '../models/user.dart';
/// Authentication Service
class AuthService {
// TODO: Implement API connector - configure base URL from env/config
static const String _apiBaseUrl = 'http://192.168.2.66:5000';
static const String _tokenKey = 'auth_token';
@@ -12,7 +12,7 @@ class ScheduleService {
static const String _apiBaseUrl = 'http://192.168.2.66:5001';
final _authService = AuthService();
/// Get public schedules for a specific date.
/// Get public schedule overview for a specific date.
Future<List<ServiceSchedule>> getSchedules(DateTime date, {int? lineId}) async {
try {
final dateStr = '${date.year}-${date.month.toString().padLeft(2, '0')}-${date.day.toString().padLeft(2, '0')}';
@@ -21,7 +21,7 @@ class ScheduleService {
queryParameters['lineId'] = lineId.toString();
}
final uri = Uri.parse('$_apiBaseUrl/schedules').replace(queryParameters: queryParameters);
final uri = Uri.parse('$_apiBaseUrl/schedules/overview').replace(queryParameters: queryParameters);
final response = await http.get(uri);
if (response.statusCode == 200) {
+2
View File
@@ -1,3 +1,5 @@
// ignore_for_file: use_build_context_synchronously
import 'package:flutter/material.dart';
import '../models/schedule.dart' as schedule;
import '../screens/navigation_screen.dart';