From c39351d0df33674a921f3d0f66212a59ace2c1d7 Mon Sep 17 00:00:00 2001 From: "Vicente J. Ruiz Jurado" Date: Fri, 3 Aug 2018 08:44:57 +0200 Subject: [PATCH] Minor toString refactor --- lib/models/appState.dart | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/lib/models/appState.dart b/lib/models/appState.dart index 068b3a2..2db9b18 100644 --- a/lib/models/appState.dart +++ b/lib/models/appState.dart @@ -1,10 +1,11 @@ +import 'dart:async'; + import 'package:comunes_flutter/comunes_flutter.dart'; import 'package:fires_flutter/models/fireNotification.dart'; import 'package:fires_flutter/models/yourLocation.dart'; +import 'package:flutter/material.dart'; import 'package:json_annotation/json_annotation.dart'; import 'package:meta/meta.dart'; -import 'package:flutter/material.dart'; -import 'dart:async'; import 'fireMapState.dart'; import 'user.dart'; @@ -53,8 +54,8 @@ class AppState extends Object with _$AppStateSerializerMixin { this.error: null, this.gmapKey, this.firesApiKey, - this.firesApiUrl, - this.serverUrl, + this.firesApiUrl, + this.serverUrl, this.fireMapState: const FireMapState.initial()}); AppState copyWith( @@ -63,8 +64,8 @@ class AppState extends Object with _$AppStateSerializerMixin { String user, String error, String gmapKey, - String firesApiKey, - String serverUrl, + String firesApiKey, + String serverUrl, String firesApiUrl, List yourLocations, List fireNotifications, @@ -77,8 +78,8 @@ class AppState extends Object with _$AppStateSerializerMixin { error: error ?? this.error, gmapKey: gmapKey ?? this.gmapKey, firesApiKey: firesApiKey ?? this.firesApiKey, - firesApiUrl: firesApiUrl ?? this.firesApiUrl, - serverUrl: serverUrl ?? this.serverUrl, + firesApiUrl: firesApiUrl ?? this.firesApiUrl, + serverUrl: serverUrl ?? this.serverUrl, yourLocations: yourLocations ?? this.yourLocations, fireNotifications: fireNotifications ?? this.fireNotifications, fireNotificationsUnread: @@ -89,9 +90,9 @@ class AppState extends Object with _$AppStateSerializerMixin { @override String toString() { return 'AppState{\nuser: ${user}\nisLoading: $isLoading\nisLoaded: $isLoaded\napiKey: ${ellipse( - firesApiKey, 8)}\napiUrl: ${ellipse( - firesApiUrl, 8)}\nserverUrl: ${serverUrl}\nfireNotifications: ${fireNotifications}\nyourLocations count: ${yourLocations - .length}\nunread notif: ${fireNotificationsUnread}\nyourLocations: ${yourLocations}\nfireMapState: $fireMapState}'; + firesApiKey, + 8)}\napiUrl: ${firesApiUrl}\nserverUrl: ${serverUrl}\nfireMapState: $fireMapState\nyourLocations count: ${yourLocations + .length}\nunread notif: ${fireNotificationsUnread}\nfireNotifications: ${fireNotifications}\nyourLocations: ${yourLocations}}'; } }