This repository was archived by the owner on Feb 21, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +7
-7
lines changed
Expand file tree Collapse file tree 5 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ class Log {
33 final String type;
44 final String url;
55 final String device;
6- final String status;
6+ final String ? status;
77 final String replyType;
88 final BigInt replyTime;
99 final String ? answeredBy;
Original file line number Diff line number Diff line change @@ -116,10 +116,10 @@ class LogDetailsScreen extends StatelessWidget {
116116 label: AppLocalizations .of (context)! .time,
117117 description: formatTimestamp (log.dateTime, 'HH:mm:ss' ),
118118 ),
119- item (
119+ if (log.status != null ) item (
120120 Icons .shield_outlined,
121121 AppLocalizations .of (context)! .status,
122- LogStatus (status: log.status, showIcon: false )
122+ LogStatus (status: log.status! , showIcon: false )
123123 ),
124124 if (log.status == '2' && log.answeredBy != null ) CustomListTile (
125125 leadingIcon: Icons .domain,
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ class LogTile extends StatelessWidget {
4646 child: Column (
4747 crossAxisAlignment: CrossAxisAlignment .start,
4848 children: [
49- LogStatus (status: log.status, showIcon: true ),
49+ if (log.status != null ) LogStatus (status: log.status! , showIcon: true ),
5050 const SizedBox (height: 10 ),
5151 SizedBox (
5252 child: Text (
@@ -102,7 +102,7 @@ class LogTile extends StatelessWidget {
102102 child: Column (
103103 crossAxisAlignment: CrossAxisAlignment .start,
104104 children: [
105- LogStatus (status: log.status, showIcon: true ),
105+ if (log.status != null ) LogStatus (status: log.status! , showIcon: true ),
106106 const SizedBox (height: 10 ),
107107 SizedBox (
108108 child: Text (
Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ class _LogsState extends State<Logs> {
136136 List <Log > tempLogs = logs != null ? [...logs] : [...logsList];
137137
138138 tempLogs = tempLogs.where ((log) {
139- if (statusSelected.contains (int .parse (log.status))) {
139+ if (log.status != null && statusSelected.contains (int .parse (log.status! ))) {
140140 return true ;
141141 }
142142 else {
Original file line number Diff line number Diff line change @@ -115,7 +115,7 @@ class _ServersTileItemState extends State<ServersTileItem> with SingleTickerProv
115115 if (result['result' ] == 'success' ) {
116116 await connectSuccess (result);
117117 }
118- else {
118+ else if (mounted) {
119119 showSnackBar (
120120 appConfigProvider: appConfigProvider,
121121 label: AppLocalizations .of (context)! .cannotConnect,
You can’t perform that action at this time.
0 commit comments