chore: fix Flutter baseline checks
This commit is contained in:
@@ -47,9 +47,11 @@ class _ApiKeysScreenState extends ConsumerState<ApiKeysScreen> {
|
||||
margin: const EdgeInsets.all(12),
|
||||
padding: const EdgeInsets.all(12),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.deepOrange.withOpacity(0.15),
|
||||
color: Colors.deepOrange.withValues(alpha: 0.15),
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
border: Border.all(color: Colors.deepOrange.withOpacity(0.3)),
|
||||
border: Border.all(
|
||||
color: Colors.deepOrange.withValues(alpha: 0.3),
|
||||
),
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
@@ -159,7 +161,7 @@ class _ApiKeysScreenState extends ConsumerState<ApiKeysScreen> {
|
||||
SwitchListTile(
|
||||
title: const Text('Администратор'),
|
||||
value: isAdmin,
|
||||
activeColor: Colors.deepOrange,
|
||||
activeThumbColor: Colors.deepOrange,
|
||||
onChanged: (v) => setDialogState(() => isAdmin = v),
|
||||
contentPadding: EdgeInsets.zero,
|
||||
),
|
||||
@@ -275,7 +277,7 @@ class _ApiKeyCard extends StatelessWidget {
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 6, vertical: 2),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.amber.withOpacity(0.2),
|
||||
color: Colors.amber.withValues(alpha: 0.2),
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
),
|
||||
child: const Text(
|
||||
@@ -289,7 +291,7 @@ class _ApiKeyCard extends StatelessWidget {
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 6, vertical: 2),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.redAccent.withOpacity(0.2),
|
||||
color: Colors.redAccent.withValues(alpha: 0.2),
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
),
|
||||
child: const Text(
|
||||
@@ -325,7 +327,7 @@ class _ApiKeyCard extends StatelessWidget {
|
||||
String _formatDate(String iso) {
|
||||
try {
|
||||
final d = DateTime.parse(iso);
|
||||
final pad = (int n) => n.toString().padLeft(2, '0');
|
||||
String pad(int n) => n.toString().padLeft(2, '0');
|
||||
return '${pad(d.day)}.${pad(d.month)}.${d.year}';
|
||||
} catch (_) {
|
||||
return iso;
|
||||
|
||||
@@ -156,7 +156,7 @@ class _EventRow extends StatelessWidget {
|
||||
if (iso.isEmpty) return '';
|
||||
try {
|
||||
final d = DateTime.parse(iso);
|
||||
final pad = (int n) => n.toString().padLeft(2, '0');
|
||||
String pad(int n) => n.toString().padLeft(2, '0');
|
||||
return '${pad(d.day)}.${pad(d.month)} ${pad(d.hour)}:${pad(d.minute)}:${pad(d.second)}';
|
||||
} catch (_) {
|
||||
return iso;
|
||||
|
||||
@@ -170,7 +170,7 @@ class _HomeEditScreenState extends ConsumerState<HomeEditScreen> {
|
||||
),
|
||||
),
|
||||
value: _geofenceEnabled,
|
||||
activeColor: Colors.deepOrange,
|
||||
activeThumbColor: Colors.deepOrange,
|
||||
onChanged: _hasCoordinates
|
||||
? (v) => setState(() => _geofenceEnabled = v)
|
||||
: null,
|
||||
@@ -285,4 +285,4 @@ class _HomeEditScreenState extends ConsumerState<HomeEditScreen> {
|
||||
|
||||
if (mounted) Navigator.of(context).pop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,15 +15,18 @@ class HomesScreen extends ConsumerStatefulWidget {
|
||||
}
|
||||
|
||||
class _HomesScreenState extends ConsumerState<HomesScreen> {
|
||||
late final UserLocationNotifier _userLocationNotifier;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
Future.microtask(() => ref.read(userLocationProvider.notifier).startWatching());
|
||||
_userLocationNotifier = ref.read(userLocationProvider.notifier);
|
||||
Future.microtask(() => _userLocationNotifier.startWatching());
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
ref.read(userLocationProvider.notifier).stopWatching();
|
||||
_userLocationNotifier.stopWatching();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@@ -200,4 +203,4 @@ class _HomesScreenState extends ConsumerState<HomesScreen> {
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -179,7 +179,7 @@ class _RemoteScreenState extends ConsumerState<RemoteScreen> {
|
||||
margin: const EdgeInsets.symmetric(
|
||||
horizontal: 12, vertical: 6),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.redAccent.withOpacity(0.3),
|
||||
color: Colors.redAccent.withValues(alpha: 0.3),
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
child: const Icon(Icons.delete, color: Colors.redAccent),
|
||||
|
||||
@@ -240,7 +240,7 @@ class _AddScheduleSheetState extends ConsumerState<_AddScheduleSheet> {
|
||||
|
||||
// Выбор группы
|
||||
DropdownButtonFormField<String>(
|
||||
value: _selectedGroupId,
|
||||
initialValue: _selectedGroupId,
|
||||
decoration: const InputDecoration(labelText: 'Группа'),
|
||||
items: groups.map((g) {
|
||||
final id = g['id'].toString();
|
||||
@@ -256,7 +256,7 @@ class _AddScheduleSheetState extends ConsumerState<_AddScheduleSheet> {
|
||||
title: Text(_targetState ? 'Включить' : 'Выключить'),
|
||||
subtitle: const Text('Действие при срабатывании'),
|
||||
value: _targetState,
|
||||
activeColor: Colors.deepOrange,
|
||||
activeThumbColor: Colors.deepOrange,
|
||||
onChanged: (v) => setState(() => _targetState = v),
|
||||
contentPadding: EdgeInsets.zero,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user