diff --git a/app/lib/features/chat/conversation/chat_card_styles.dart b/app/lib/features/chat/conversation/chat_card_styles.dart index 65135523..d2b12f58 100644 --- a/app/lib/features/chat/conversation/chat_card_styles.dart +++ b/app/lib/features/chat/conversation/chat_card_styles.dart @@ -8,8 +8,7 @@ import 'package:flutter/material.dart'; /// style. Keeping the styles here stops each card file from inventing its own /// size and colour; everything still comes from the active Material/Cupertino /// theme, so light, dark and text scaling follow the host. -TextStyle? chatCardTitleStyle(BuildContext context, bool cupertino) => - cupertino +TextStyle? chatCardTitleStyle(BuildContext context, bool cupertino) => cupertino ? CupertinoTheme.of(context).textTheme.navTitleTextStyle : Theme.of(context).textTheme.titleMedium; @@ -21,9 +20,9 @@ TextStyle? chatCardBodyStyle(BuildContext context, bool cupertino) => cupertino /// (the same subordinate style the rest of the app uses for secondary copy) /// keeps labels from reading as extra headings; Material keeps `titleSmall`. TextStyle? chatCardLabelStyle(BuildContext context, bool cupertino) => cupertino - ? CupertinoTheme.of( - context, - ).textTheme.tabLabelTextStyle.copyWith(color: chatCardSecondaryColor(context, true)) + ? CupertinoTheme.of(context).textTheme.tabLabelTextStyle.copyWith( + color: chatCardSecondaryColor(context, true), + ) : Theme.of(context).textTheme.titleSmall; /// Body text that supports a control, such as a field description. diff --git a/app/lib/features/chat/conversation/chat_question_card_fields.dart b/app/lib/features/chat/conversation/chat_question_card_fields.dart index 5577149f..c227f5a1 100644 --- a/app/lib/features/chat/conversation/chat_question_card_fields.dart +++ b/app/lib/features/chat/conversation/chat_question_card_fields.dart @@ -63,10 +63,7 @@ Widget _field({ children: [ Text(label, style: chatCardLabelStyle(context, cupertino)), if (description.isNotEmpty && description != title) - Text( - description, - style: chatCardSecondaryStyle(context, cupertino), - ), + Text(description, style: chatCardSecondaryStyle(context, cupertino)), if ('${field['type'] ?? ''}' == 'external') _external(context, field, cupertino) else if ('${field['type'] ?? ''}' == 'boolean') diff --git a/app/lib/features/chat/conversation/chat_question_card_model.dart b/app/lib/features/chat/conversation/chat_question_card_model.dart index d86a527f..e8a07f39 100644 --- a/app/lib/features/chat/conversation/chat_question_card_model.dart +++ b/app/lib/features/chat/conversation/chat_question_card_model.dart @@ -44,8 +44,7 @@ Object? chatFormFieldValue(JsonMap field, String raw) { case 'integer': final parsed = num.tryParse(raw); if (parsed == null) return double.nan; - final integral = - parsed.isFinite && parsed == parsed.roundToDouble(); + final integral = parsed.isFinite && parsed == parsed.roundToDouble(); return type == 'integer' && integral ? parsed.toInt() : parsed; default: return raw; diff --git a/app/lib/features/chat/conversation/chat_question_recorded_answers.dart b/app/lib/features/chat/conversation/chat_question_recorded_answers.dart index 1009ca32..2c0429bb 100644 --- a/app/lib/features/chat/conversation/chat_question_recorded_answers.dart +++ b/app/lib/features/chat/conversation/chat_question_recorded_answers.dart @@ -33,12 +33,7 @@ List chatQuestionRecordedAnswers({ for (final entry in answers.entries) { if (shown.contains(entry.key)) continue; widgets.add( - _recorded( - context, - entry.key, - _answerText(null, entry.value), - cupertino, - ), + _recorded(context, entry.key, _answerText(null, entry.value), cupertino), ); } if (widgets.isEmpty) { diff --git a/app/lib/features/chat/conversation/chat_scroll.dart b/app/lib/features/chat/conversation/chat_scroll.dart index 90334da5..20d3acc4 100644 --- a/app/lib/features/chat/conversation/chat_scroll.dart +++ b/app/lib/features/chat/conversation/chat_scroll.dart @@ -65,7 +65,9 @@ int chatNewMessageCount(List messageIds, String? newestAtRelease) { /// native client adds while the operator is reading above the end. String chatJumpToLatestLabel(int newMessages) { if (newMessages <= 0) return 'Jump to latest'; - final suffix = newMessages == 1 ? '1 new message' : '$newMessages new messages'; + final suffix = newMessages == 1 + ? '1 new message' + : '$newMessages new messages'; return 'Jump to latest ยท $suffix'; } diff --git a/app/lib/features/chat/conversation/chat_thread_cards.dart b/app/lib/features/chat/conversation/chat_thread_cards.dart index 12946988..5fb6efd6 100644 --- a/app/lib/features/chat/conversation/chat_thread_cards.dart +++ b/app/lib/features/chat/conversation/chat_thread_cards.dart @@ -44,8 +44,7 @@ class ChatThreadCards { String answerFor(String requestId) => _answers[requestId] ?? ''; - String? permissionErrorFor(String requestId) => - _permissionErrors[requestId]; + String? permissionErrorFor(String requestId) => _permissionErrors[requestId]; String? formErrorFor(String formId) => _formErrors[formId]; @@ -105,8 +104,7 @@ class ChatThreadCards { _forms[id] = { ...form, 'resolved': true, - if (answers.isNotEmpty) - 'answers': Map.from(answers), + if (answers.isNotEmpty) 'answers': Map.from(answers), }; _pruneSettledForms(); notify(); diff --git a/app/test/application/app_lifecycle_reconnect_test.dart b/app/test/application/app_lifecycle_reconnect_test.dart index 44d76547..45bea855 100644 --- a/app/test/application/app_lifecycle_reconnect_test.dart +++ b/app/test/application/app_lifecycle_reconnect_test.dart @@ -165,11 +165,13 @@ void main() { await pumpApp(tester, provider: provider, client: client); await waitForRequest(tester, channel, 'list_runs'); final initialRuns = pipelineRequest(channel, 'list_runs')!; - channel.incoming.add(jsonEncode({ - 'id': initialRuns['id'], - 'type': 'runs', - 'runs': PipelineFixture().runs, - })); + channel.incoming.add( + jsonEncode({ + 'id': initialRuns['id'], + 'type': 'runs', + 'runs': PipelineFixture().runs, + }), + ); await tester.pump(); final before = countType(channel, 'list_runs'); showDialog( @@ -198,11 +200,13 @@ void main() { await pumpApp(tester, provider: provider, client: client); await waitForRequest(tester, channel, 'list_runs'); final initialRuns = pipelineRequest(channel, 'list_runs')!; - channel.incoming.add(jsonEncode({ - 'id': initialRuns['id'], - 'type': 'runs', - 'runs': PipelineFixture().runs, - })); + channel.incoming.add( + jsonEncode({ + 'id': initialRuns['id'], + 'type': 'runs', + 'runs': PipelineFixture().runs, + }), + ); await tester.pump(); final before = countType(channel, 'list_runs'); showDialog(