From d5a03f57d568452c7bb678355294c69a5d9b659e Mon Sep 17 00:00:00 2001 From: Kyle H Date: Fri, 29 Sep 2023 22:45:50 -0400 Subject: [PATCH] Changes from `dart fix --apply` --- lib/components/chat_component.dart | 45 ++++++++++++++++ .../chat_single_contact_list_widget.dart | 25 +++++++++ .../contact_invitation_list_widget.dart | 5 ++ lib/components/invite_dialog.dart | 1 - lib/components/scan_invite_dialog.dart | 10 ++-- lib/pages/home.dart | 8 +-- lib/pages/main_pager/account_page.dart | 45 ++++++++++++++++ lib/pages/main_pager/main_pager.dart | 52 ++++++++++++++++++- lib/tick.dart | 5 ++ lib/tools/scanner_error_widget.dart | 7 ++- 10 files changed, 193 insertions(+), 10 deletions(-) diff --git a/lib/components/chat_component.dart b/lib/components/chat_component.dart index 3bd38ce..304953f 100644 --- a/lib/components/chat_component.dart +++ b/lib/components/chat_component.dart @@ -28,6 +28,51 @@ class ChatComponent extends ConsumerStatefulWidget { @override ChatComponentState createState() => ChatComponentState(); + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties.add(DiagnosticsProperty('activeAccountInfo', activeAccountInfo)); + } + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties.add(DiagnosticsProperty('activeChat', activeChat)); + } + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties.add(DiagnosticsProperty('activeChatContact', activeChatContact)); + } + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties.add(DiagnosticsProperty('activeChat', activeChat)); + } + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties.add(DiagnosticsProperty('activeChatContact', activeChatContact)); + } + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties.add(DiagnosticsProperty('activeChat', activeChat)); + } + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties.add(DiagnosticsProperty('activeChatContact', activeChatContact)); + } + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties.add(DiagnosticsProperty('activeChat', activeChat)); + } + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties.add(DiagnosticsProperty('activeChatContact', activeChatContact)); + } } class ChatComponentState extends ConsumerState { diff --git a/lib/components/chat_single_contact_list_widget.dart b/lib/components/chat_single_contact_list_widget.dart index e20b41e..3b0eade 100644 --- a/lib/components/chat_single_contact_list_widget.dart +++ b/lib/components/chat_single_contact_list_widget.dart @@ -79,4 +79,29 @@ class ChatSingleContactListWidget extends ConsumerWidget { ).paddingAll(8)))) .paddingLTRB(8, 8, 8, 65); } + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties.add(DiagnosticsProperty>('contactMap', contactMap)); + } + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties.add(IterableProperty('chatList', chatList)); + } + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties.add(IterableProperty('chatList', chatList)); + } + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties.add(IterableProperty('chatList', chatList)); + } + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties.add(IterableProperty('chatList', chatList)); + } } diff --git a/lib/components/contact_invitation_list_widget.dart b/lib/components/contact_invitation_list_widget.dart index 161aa97..f8fd7fa 100644 --- a/lib/components/contact_invitation_list_widget.dart +++ b/lib/components/contact_invitation_list_widget.dart @@ -18,6 +18,11 @@ class ContactInvitationListWidget extends ConsumerStatefulWidget { @override ContactInvitationListWidgetState createState() => ContactInvitationListWidgetState(); + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties.add(IterableProperty('contactInvitationRecordList', contactInvitationRecordList)); + } } class ContactInvitationListWidgetState diff --git a/lib/components/invite_dialog.dart b/lib/components/invite_dialog.dart index bbb4551..870c6fe 100644 --- a/lib/components/invite_dialog.dart +++ b/lib/components/invite_dialog.dart @@ -1,5 +1,4 @@ import 'dart:async'; -import 'dart:typed_data'; import 'package:awesome_extensions/awesome_extensions.dart'; import 'package:flutter/foundation.dart'; diff --git a/lib/components/scan_invite_dialog.dart b/lib/components/scan_invite_dialog.dart index 2c5afbf..bd99f77 100644 --- a/lib/components/scan_invite_dialog.dart +++ b/lib/components/scan_invite_dialog.dart @@ -1,6 +1,5 @@ import 'dart:async'; import 'dart:io'; -import 'dart:math'; import 'dart:typed_data'; import 'package:awesome_extensions/awesome_extensions.dart'; @@ -8,10 +7,10 @@ import 'package:flutter/material.dart'; import 'package:flutter/scheduler.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_translate/flutter_translate.dart'; +import 'package:image/image.dart' as img; +import 'package:mobile_scanner/mobile_scanner.dart'; import 'package:pasteboard/pasteboard.dart'; import 'package:zxing2/qrcode.dart'; -import 'package:mobile_scanner/mobile_scanner.dart'; -import 'package:image/image.dart' as img; import '../tools/tools.dart'; import 'invite_dialog.dart'; @@ -390,4 +389,9 @@ class ScanInviteDialogState extends ConsumerState { inviteControlIsValid: inviteControlIsValid, buildInviteControl: buildInviteControl); } + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties.add(DiagnosticsProperty('scanned', scanned)); + } } diff --git a/lib/pages/home.dart b/lib/pages/home.dart index 2823ffd..4dd7832 100644 --- a/lib/pages/home.dart +++ b/lib/pages/home.dart @@ -84,9 +84,9 @@ class HomePageState extends ConsumerState // ignore: prefer_expression_function_bodies Widget buildAccountList() { return const Column(children: [ - Center(child: Text("Small Profile")), - Center(child: Text("Contact invitations")), - Center(child: Text("Contacts")) + Center(child: Text('Small Profile')), + Center(child: Text('Contact invitations')), + Center(child: Text('Contacts')) ]); } @@ -95,7 +95,7 @@ class HomePageState extends ConsumerState IList localAccounts, // ignore: prefer_expression_function_bodies ) { - return const Center(child: Text("unlock account")); + return const Center(child: Text('unlock account')); } /// We have an active, unlocked, user login diff --git a/lib/pages/main_pager/account_page.dart b/lib/pages/main_pager/account_page.dart index 620b762..8d990ff 100644 --- a/lib/pages/main_pager/account_page.dart +++ b/lib/pages/main_pager/account_page.dart @@ -30,6 +30,51 @@ class AccountPage extends ConsumerStatefulWidget { @override AccountPageState createState() => AccountPageState(); + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties.add(IterableProperty('localAccounts', localAccounts)); + } + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties.add(DiagnosticsProperty('activeUserLogin', activeUserLogin)); + } + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties.add(DiagnosticsProperty('account', account)); + } + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties.add(DiagnosticsProperty('activeUserLogin', activeUserLogin)); + } + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties.add(DiagnosticsProperty('account', account)); + } + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties.add(DiagnosticsProperty('activeUserLogin', activeUserLogin)); + } + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties.add(DiagnosticsProperty('account', account)); + } + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties.add(DiagnosticsProperty('activeUserLogin', activeUserLogin)); + } + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties.add(DiagnosticsProperty('account', account)); + } } class AccountPageState extends ConsumerState { diff --git a/lib/pages/main_pager/main_pager.dart b/lib/pages/main_pager/main_pager.dart index acdf8b5..1a57a27 100644 --- a/lib/pages/main_pager/main_pager.dart +++ b/lib/pages/main_pager/main_pager.dart @@ -39,6 +39,51 @@ class MainPager extends ConsumerStatefulWidget { static MainPagerState? of(BuildContext context) => context.findAncestorStateOfType(); + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties.add(IterableProperty('localAccounts', localAccounts)); + } + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties.add(DiagnosticsProperty('activeUserLogin', activeUserLogin)); + } + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties.add(DiagnosticsProperty('account', account)); + } + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties.add(DiagnosticsProperty('activeUserLogin', activeUserLogin)); + } + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties.add(DiagnosticsProperty('account', account)); + } + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties.add(DiagnosticsProperty('activeUserLogin', activeUserLogin)); + } + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties.add(DiagnosticsProperty('account', account)); + } + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties.add(DiagnosticsProperty('activeUserLogin', activeUserLogin)); + } + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties.add(DiagnosticsProperty('account', account)); + } } class MainPagerState extends ConsumerState @@ -199,7 +244,7 @@ class MainPagerState extends ConsumerState height: 200, child: Center( child: Text( - "Group and custom chat functionality is not available yet"))); + 'Group and custom chat functionality is not available yet'))); } Widget _bottomSheetBuilder(BuildContext context) { @@ -289,4 +334,9 @@ class MainPagerState extends ConsumerState floatingActionButtonLocation: FloatingActionButtonLocation.endDocked, ); } + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties.add(DiagnosticsProperty('pageController', pageController)); + } } diff --git a/lib/tick.dart b/lib/tick.dart index 91eb454..ebfde43 100644 --- a/lib/tick.dart +++ b/lib/tick.dart @@ -23,6 +23,11 @@ class BackgroundTicker extends ConsumerStatefulWidget { @override BackgroundTickerState createState() => BackgroundTickerState(); + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties.add(ObjectFlagProperty.has('builder', builder)); + } } class BackgroundTickerState extends ConsumerState { diff --git a/lib/tools/scanner_error_widget.dart b/lib/tools/scanner_error_widget.dart index 0280199..74ff2b7 100644 --- a/lib/tools/scanner_error_widget.dart +++ b/lib/tools/scanner_error_widget.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:mobile_scanner/mobile_scanner.dart'; class ScannerErrorWidget extends StatelessWidget { - const ScannerErrorWidget({Key? key, required this.error}) : super(key: key); + const ScannerErrorWidget({required this.error, super.key}); final MobileScannerException error; @@ -48,4 +48,9 @@ class ScannerErrorWidget extends StatelessWidget { ), ); } + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties.add(DiagnosticsProperty('error', error)); + } }