Skip to content

Commit 7ede59f

Browse files
committed
lint
1 parent 263a9d1 commit 7ede59f

File tree

8 files changed

+537
-718
lines changed

8 files changed

+537
-718
lines changed

lib/screens/settings/voice_watch_settings_screen.dart

Lines changed: 36 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,7 @@ class _VoiceWatchSettingsScreenState extends State<VoiceWatchSettingsScreen> {
5353
final theme = Theme.of(context);
5454

5555
return Scaffold(
56-
appBar: AppBar(
57-
title: const Text('Voice & Watch Settings'),
58-
elevation: 0,
59-
),
56+
appBar: AppBar(title: const Text('Voice & Watch Settings'), elevation: 0),
6057
body: SingleChildScrollView(
6158
padding: const EdgeInsets.all(16),
6259
child: Column(
@@ -83,9 +80,10 @@ class _VoiceWatchSettingsScreenState extends State<VoiceWatchSettingsScreen> {
8380
_buildSliderTile(
8481
theme,
8582
title: 'Sensitivity',
86-
subtitle: _wakeWordSensitivity < 0.3
87-
? 'Low (fewer false positives)'
88-
: _wakeWordSensitivity > 0.7
83+
subtitle:
84+
_wakeWordSensitivity < 0.3
85+
? 'Low (fewer false positives)'
86+
: _wakeWordSensitivity > 0.7
8987
? 'High (more responsive)'
9088
: 'Medium',
9189
value: _wakeWordSensitivity,
@@ -116,9 +114,10 @@ class _VoiceWatchSettingsScreenState extends State<VoiceWatchSettingsScreen> {
116114
_buildSwitchTile(
117115
theme,
118116
title: 'Enable Watch Support',
119-
subtitle: _watchConnected
120-
? 'Connected: ${_watchService.connectedWatchName ?? "Pixel Watch"}'
121-
: 'Allow connection to Pixel Watch',
117+
subtitle:
118+
_watchConnected
119+
? 'Connected: ${_watchService.connectedWatchName ?? "Pixel Watch"}'
120+
: 'Allow connection to Pixel Watch',
122121
value: _watchEnabled,
123122
onChanged: (value) async {
124123
await _watchService.setEnabled(value);
@@ -151,7 +150,10 @@ class _VoiceWatchSettingsScreenState extends State<VoiceWatchSettingsScreen> {
151150

152151
// Voice Input Source Section
153152
_buildSectionHeader(
154-
theme, 'Voice Input Source', Icons.settings_voice_rounded),
153+
theme,
154+
'Voice Input Source',
155+
Icons.settings_voice_rounded,
156+
),
155157
_buildCard(
156158
theme,
157159
child: Column(
@@ -212,7 +214,10 @@ class _VoiceWatchSettingsScreenState extends State<VoiceWatchSettingsScreen> {
212214

213215
// Text-to-Speech Section
214216
_buildSectionHeader(
215-
theme, 'Text-to-Speech', Icons.record_voice_over_rounded),
217+
theme,
218+
'Text-to-Speech',
219+
Icons.record_voice_over_rounded,
220+
),
216221
_buildCard(
217222
theme,
218223
child: Column(
@@ -236,9 +241,10 @@ class _VoiceWatchSettingsScreenState extends State<VoiceWatchSettingsScreen> {
236241
_buildSliderTile(
237242
theme,
238243
title: 'Speech Rate',
239-
subtitle: _ttsRate < 0.8
240-
? 'Slow'
241-
: _ttsRate > 1.2
244+
subtitle:
245+
_ttsRate < 0.8
246+
? 'Slow'
247+
: _ttsRate > 1.2
242248
? 'Fast'
243249
: 'Normal',
244250
value: _ttsRate,
@@ -253,9 +259,10 @@ class _VoiceWatchSettingsScreenState extends State<VoiceWatchSettingsScreen> {
253259
_buildSliderTile(
254260
theme,
255261
title: 'Pitch',
256-
subtitle: _ttsPitch < 0.8
257-
? 'Lower'
258-
: _ttsPitch > 1.2
262+
subtitle:
263+
_ttsPitch < 0.8
264+
? 'Lower'
265+
: _ttsPitch > 1.2
259266
? 'Higher'
260267
: 'Normal',
261268
value: _ttsPitch,
@@ -351,10 +358,7 @@ class _VoiceWatchSettingsScreenState extends State<VoiceWatchSettingsScreen> {
351358
elevation: 0,
352359
shape: RoundedRectangleBorder(
353360
borderRadius: BorderRadius.circular(16),
354-
side: BorderSide(
355-
color: theme.colorScheme.outlineVariant,
356-
width: 1,
357-
),
361+
side: BorderSide(color: theme.colorScheme.outlineVariant, width: 1),
358362
),
359363
child: child,
360364
);
@@ -390,12 +394,7 @@ class _VoiceWatchSettingsScreenState extends State<VoiceWatchSettingsScreen> {
390394
crossAxisAlignment: CrossAxisAlignment.start,
391395
children: [
392396
Text(subtitle),
393-
Slider(
394-
value: value,
395-
min: min,
396-
max: max,
397-
onChanged: onChanged,
398-
),
397+
Slider(value: value, min: min, max: max, onChanged: onChanged),
399398
],
400399
),
401400
);
@@ -413,15 +412,11 @@ class _VoiceWatchSettingsScreenState extends State<VoiceWatchSettingsScreen> {
413412
return RadioListTile<T>(
414413
title: Text(
415414
title,
416-
style: TextStyle(
417-
color: enabled ? null : theme.disabledColor,
418-
),
415+
style: TextStyle(color: enabled ? null : theme.disabledColor),
419416
),
420417
subtitle: Text(
421418
subtitle,
422-
style: TextStyle(
423-
color: enabled ? null : theme.disabledColor,
424-
),
419+
style: TextStyle(color: enabled ? null : theme.disabledColor),
425420
),
426421
value: value,
427422
groupValue: groupValue,
@@ -443,12 +438,13 @@ class _VoiceWatchSettingsScreenState extends State<VoiceWatchSettingsScreen> {
443438
subtitle: Text(subtitle),
444439
trailing: DropdownButton<T>(
445440
value: value,
446-
items: items.map((item) {
447-
return DropdownMenuItem<T>(
448-
value: item,
449-
child: Text(itemLabel(item)),
450-
);
451-
}).toList(),
441+
items:
442+
items.map((item) {
443+
return DropdownMenuItem<T>(
444+
value: item,
445+
child: Text(itemLabel(item)),
446+
);
447+
}).toList(),
452448
onChanged: onChanged,
453449
),
454450
);

lib/screens/settings_screen.dart

Lines changed: 38 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,9 @@ class _GlassesSettingsPageState extends State<GlassesSettingsPage> {
9393
void _startConnectionStatusTracking() {
9494
final bluetoothManager = BluetoothManager();
9595
_isConnected = bluetoothManager.isConnected;
96-
_connectionSubscription =
97-
bluetoothManager.connectionStatusStream.listen((connected) {
96+
_connectionSubscription = bluetoothManager.connectionStatusStream.listen((
97+
connected,
98+
) {
9899
if (!mounted) {
99100
return;
100101
}
@@ -163,10 +164,7 @@ class _GlassesSettingsPageState extends State<GlassesSettingsPage> {
163164
required int? batteryPercentage,
164165
}) {
165166
final gradient = LinearGradient(
166-
colors: [
167-
theme.colorScheme.primary,
168-
theme.colorScheme.primaryContainer,
169-
],
167+
colors: [theme.colorScheme.primary, theme.colorScheme.primaryContainer],
170168
begin: Alignment.topLeft,
171169
end: Alignment.bottomRight,
172170
);
@@ -211,8 +209,9 @@ class _GlassesSettingsPageState extends State<GlassesSettingsPage> {
211209
Text(
212210
'Keep your Even Realities G1 glasses connected and tuned to your day.',
213211
style: theme.textTheme.bodyMedium?.copyWith(
214-
color:
215-
theme.colorScheme.onPrimary.withValues(alpha: 0.9),
212+
color: theme.colorScheme.onPrimary.withValues(
213+
alpha: 0.9,
214+
),
216215
),
217216
),
218217
],
@@ -226,23 +225,27 @@ class _GlassesSettingsPageState extends State<GlassesSettingsPage> {
226225
runSpacing: 12,
227226
children: [
228227
_StatusChip(
229-
icon: isConnected
230-
? Icons.check_circle_rounded
231-
: Icons.portable_wifi_off_rounded,
228+
icon:
229+
isConnected
230+
? Icons.check_circle_rounded
231+
: Icons.portable_wifi_off_rounded,
232232
label: isConnected ? 'Connected' : 'Disconnected',
233-
tone: isConnected
234-
? theme.colorScheme.secondary
235-
: theme.colorScheme.error,
233+
tone:
234+
isConnected
235+
? theme.colorScheme.secondary
236+
: theme.colorScheme.error,
236237
onColor: theme.colorScheme.onSecondary,
237238
),
238239
_StatusChip(
239-
icon: _batteryStatus.isAnyCharging
240-
? Icons.bolt_rounded
241-
: Icons.battery_5_bar_rounded,
242-
label: batteryPercentage != null
243-
? '$batteryPercentage%'
244-
'${_batteryStatus.isAnyCharging ? ' · Charging' : ''}'
245-
: 'Battery unavailable',
240+
icon:
241+
_batteryStatus.isAnyCharging
242+
? Icons.bolt_rounded
243+
: Icons.battery_5_bar_rounded,
244+
label:
245+
batteryPercentage != null
246+
? '$batteryPercentage%'
247+
'${_batteryStatus.isAnyCharging ? ' · Charging' : ''}'
248+
: 'Battery unavailable',
246249
tone: theme.colorScheme.surface.withValues(alpha: 0.25),
247250
onColor: theme.colorScheme.onPrimary,
248251
),
@@ -306,10 +309,7 @@ class _GlassesSettingsPageState extends State<GlassesSettingsPage> {
306309
),
307310
if (_isConnected) ...[
308311
const SizedBox(height: 20),
309-
G1BatteryWidget(
310-
batteryStatus: _batteryStatus,
311-
showDetails: true,
312-
),
312+
G1BatteryWidget(batteryStatus: _batteryStatus, showDetails: true),
313313
],
314314
],
315315
),
@@ -395,7 +395,8 @@ class _GlassesSettingsPageState extends State<GlassesSettingsPage> {
395395
Navigator.push(
396396
context,
397397
MaterialPageRoute(
398-
builder: (context) => const DashboardSettingsPage()),
398+
builder: (context) => const DashboardSettingsPage(),
399+
),
399400
);
400401
},
401402
),
@@ -408,7 +409,8 @@ class _GlassesSettingsPageState extends State<GlassesSettingsPage> {
408409
Navigator.push(
409410
context,
410411
MaterialPageRoute(
411-
builder: (context) => const NotificationSettingsPage()),
412+
builder: (context) => const NotificationSettingsPage(),
413+
),
412414
);
413415
},
414416
),
@@ -421,7 +423,8 @@ class _GlassesSettingsPageState extends State<GlassesSettingsPage> {
421423
Navigator.push(
422424
context,
423425
MaterialPageRoute(
424-
builder: (context) => const VoiceWatchSettingsScreen()),
426+
builder: (context) => const VoiceWatchSettingsScreen(),
427+
),
425428
);
426429
},
427430
),
@@ -434,7 +437,8 @@ class _GlassesSettingsPageState extends State<GlassesSettingsPage> {
434437
Navigator.push(
435438
context,
436439
MaterialPageRoute(
437-
builder: (context) => const LocationSettingsScreen()),
440+
builder: (context) => const LocationSettingsScreen(),
441+
),
438442
);
439443
},
440444
),
@@ -460,15 +464,13 @@ class _GlassesSettingsPageState extends State<GlassesSettingsPage> {
460464
color: theme.colorScheme.primary.withValues(alpha: 0.08),
461465
borderRadius: BorderRadius.circular(16),
462466
),
463-
child: Icon(
464-
icon,
465-
color: theme.colorScheme.primary,
466-
),
467+
child: Icon(icon, color: theme.colorScheme.primary),
467468
),
468469
title: Text(
469470
title,
470-
style:
471-
theme.textTheme.titleMedium?.copyWith(fontWeight: FontWeight.w600),
471+
style: theme.textTheme.titleMedium?.copyWith(
472+
fontWeight: FontWeight.w600,
473+
),
472474
),
473475
subtitle: Text(subtitle),
474476
trailing: const Icon(Icons.chevron_right),
@@ -519,10 +521,7 @@ class _StatusChip extends StatelessWidget {
519521
const SizedBox(width: 6),
520522
Text(
521523
label,
522-
style: TextStyle(
523-
color: onColor,
524-
fontWeight: FontWeight.w600,
525-
),
524+
style: TextStyle(color: onColor, fontWeight: FontWeight.w600),
526525
),
527526
],
528527
),

lib/services/ai_service.dart

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ import 'package:flutter/services.dart'; // Import Services
1515

1616
class AIService {
1717
// MethodChannel for button events from native code
18-
static const MethodChannel _buttonEventsChannel =
19-
MethodChannel('dev.agixt.agixt/button_events');
18+
static const MethodChannel _buttonEventsChannel = MethodChannel(
19+
'dev.agixt.agixt/button_events',
20+
);
2021

2122
static final AIService singleton = AIService._internal();
2223
final BluetoothManager _bluetoothManager = BluetoothManager.singleton;
@@ -136,7 +137,10 @@ class AIService {
136137
}
137138

138139
/// Process recorded audio from any source
139-
Future<void> _processRecordedAudio(Uint8List audioData, VoiceInputSource? source) async {
140+
Future<void> _processRecordedAudio(
141+
Uint8List audioData,
142+
VoiceInputSource? source,
143+
) async {
140144
try {
141145
await _showProcessingMessage();
142146

@@ -261,7 +265,8 @@ class AIService {
261265
/// Handle activity updates (thinking, reflection, etc.)
262266
void _handleActivityUpdate(ActivityUpdate activity) {
263267
debugPrint(
264-
'AIService: Activity [${activity.type}]: ${activity.content.substring(0, activity.content.length > 50 ? 50 : activity.content.length)}...');
268+
'AIService: Activity [${activity.type}]: ${activity.content.substring(0, activity.content.length > 50 ? 50 : activity.content.length)}...',
269+
);
265270

266271
// Optionally show activity on glasses
267272
if (activity.type == 'thinking' && !activity.isComplete) {
@@ -289,7 +294,8 @@ class AIService {
289294
break;
290295
default:
291296
debugPrint(
292-
'Unknown method call from button events channel: ${call.method}');
297+
'Unknown method call from button events channel: ${call.method}',
298+
);
293299
}
294300
}
295301

0 commit comments

Comments
 (0)