@@ -55,9 +55,9 @@ final class LogItem {
5555 required this .showTags,
5656 required this .showTimestamp,
5757 required this .frame,
58- }) : id = const Uuid ().v4 (),
59- timestamp = DateTime .now (),
60- internalIndex = _internalCount++ ;
58+ }) : id = const Uuid ().v4 (),
59+ timestamp = DateTime .now (),
60+ internalIndex = _internalCount++ ;
6161
6262 //
6363 //
@@ -110,12 +110,10 @@ final class LogItem {
110110 final hasLocation = location1 != null && location1.isNotEmpty;
111111
112112 if (hasLocation) {
113- final bracketStyle = nonMessageStyle != null
114- ? AnsiStyle .bold + nonMessageStyle
115- : null ;
116- final pathTextStyle = nonMessageStyle != null
117- ? AnsiStyle .italic + nonMessageStyle
118- : null ;
113+ final bracketStyle =
114+ nonMessageStyle != null ? AnsiStyle .bold + nonMessageStyle : null ;
115+ final pathTextStyle =
116+ nonMessageStyle != null ? AnsiStyle .italic + nonMessageStyle : null ;
119117 if (icon != null ) {
120118 buffer.write ('$icon ' );
121119 }
@@ -132,8 +130,8 @@ final class LogItem {
132130
133131 if (message != null ) {
134132 final styledMessage = message.toString ().trim ().withAnsiStyle (
135- messageStyle,
136- );
133+ messageStyle,
134+ );
137135 buffer.write (styledMessage);
138136 }
139137
@@ -161,18 +159,19 @@ final class LogItem {
161159 final uri = frame? .uri.toString ();
162160
163161 return {
162+ 'id' : id,
163+ 'column' : column,
164164 'icon' : icon != null && (location != null && location! .isNotEmpty)
165165 ? icon
166166 : null ,
167- 'location' : location != null && location! .isNotEmpty ? location : null ,
168- 'message' : message,
169- 'timestamp' : timestamp.toIso8601String (),
170- 'tags' : tags.isNotEmpty ? tags.map (_unmangleSymbol).toList () : null ,
171- 'id' : id,
172- 'column' : column,
167+ 'internalIndex' : internalIndex,
168+ 'library' : library,
173169 'line' : line,
170+ 'location' : location != null && location! .isNotEmpty ? location : null ,
171+ 'message' : message? .toString (),
174172 'package' : package,
175- 'library' : library,
173+ 'tags' : tags.isNotEmpty ? tags.map (_unmangleSymbol).toList () : null ,
174+ 'timestamp' : timestamp.toIso8601String (),
176175 'uri' : uri,
177176 };
178177 }
@@ -183,9 +182,8 @@ final class LogItem {
183182
184183 String toJson ({bool pretty = true }) {
185184 final map = toMap ();
186- final encoder = pretty
187- ? const JsonEncoder .withIndent (' ' )
188- : const JsonEncoder ();
185+ final encoder =
186+ pretty ? const JsonEncoder .withIndent (' ' ) : const JsonEncoder ();
189187 return encoder.convert (map);
190188 }
191189
0 commit comments