Showing 1 of 1 files from the diff.

@@ -1,4 +1,4 @@
Loading
1 -
import 'dart:convert';
1 +
import 'dart:convert' as dartConvert;
2 2
3 3
import 'package:json_string/src/functions.dart';
4 4
import 'package:json_string/src/utils.dart';
@@ -171,14 +171,20 @@
Loading
171 171
    return 'JsonString{source: $source}';
172 172
  }
173 173
174 +
  // <<private constructor>>
175 +
176 +
  const JsonString._(this.source, this._cachedValue);
177 +
174 178
  // <<private fields>>
175 179
176 180
  final DecodedValue _cachedValue;
177 181
182 +
  // <<private getters>>
183 +
178 184
  DecodedValue get _decodedValue =>
179 185
      (_cachedValue != null) ? _cachedValue : DecodedValue.from(this.source);
180 186
181 -
  // <<private methods>>
187 +
  // <<private static methods>>
182 188
183 189
  static JsonString _constructJsonString(String source, bool enableCache) {
184 190
    final decodedSource = DecodedValue.from(source);
@@ -186,10 +192,8 @@
Loading
186 192
    return JsonString._(_encode(decodedSource.value), cachedValue);
187 193
  }
188 194
189 -
  const JsonString._(this.source, this._cachedValue);
190 -
191 195
  static String _encode(Object value, {Function(Object) encoder}) {
192 -
    return json.encode(value, toEncodable: encoder);
196 +
    return dartConvert.jsonEncode(value, toEncodable: encoder);
193 197
  }
194 198
195 199
  static String _encodeSafely(Object value, {Function(Object) encoder}) {
Files Coverage
lib/src 100.00%
Project Totals (3 files) 100.00%
Untitled

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading