From c1c49e878eb8d825c6630b9934095dae91f5010f Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Tue, 24 Jan 2023 02:46:22 +0200 Subject: [PATCH] [skip ci] - Revert disabling UI error reporting as it will also disable some errors from the view models - Fix warnings in node list row (potential nullability issue fix) --- lib/main.dart | 5 +---- lib/src/screens/nodes/widgets/node_list_row.dart | 8 ++------ 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index 78879bdb5..a8d0064f4 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -57,10 +57,7 @@ Future main() async { WidgetsFlutterBinding.ensureInitialized(); FlutterError.onError = (errorDetails) { - // if not a UI error - if (errorDetails.library != "widgets library") { - _onError(errorDetails); - } + _onError(errorDetails); }; /// A callback that is invoked when an unhandled error occurs in the root diff --git a/lib/src/screens/nodes/widgets/node_list_row.dart b/lib/src/screens/nodes/widgets/node_list_row.dart index 580aba170..90bb3eba1 100644 --- a/lib/src/screens/nodes/widgets/node_list_row.dart +++ b/lib/src/screens/nodes/widgets/node_list_row.dart @@ -1,9 +1,5 @@ -import 'package:cake_wallet/generated/i18n.dart'; -import 'package:cake_wallet/palette.dart'; import 'package:cake_wallet/src/screens/nodes/widgets/node_indicator.dart'; -import 'package:cake_wallet/src/widgets/alert_with_two_actions.dart'; import 'package:cake_wallet/src/widgets/standard_list.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; class NodeListRow extends StandardListRow { @@ -23,7 +19,7 @@ class NodeListRow extends StandardListRow { builder: (context, snapshot) { switch (snapshot.connectionState) { case ConnectionState.done: - return NodeIndicator(isLive: (snapshot.data as bool)??false); + return NodeIndicator(isLive: (snapshot.data as bool?) ?? false); default: return NodeIndicator(isLive: false); } @@ -40,7 +36,7 @@ class NodeHeaderListRow extends StandardListRow { return SizedBox( width: 20, child: Icon(Icons.add, - color: Theme.of(context).accentTextTheme!.subtitle1!.color!, size: 24.0), + color: Theme.of(context).accentTextTheme.subtitle1?.color, size: 24.0), ); } }