load method
Implementation
Future<void> load() async {
if (_loaded || kIsWeb) return;
_loaded = true;
try {
final File file = await _indexFile();
if (!file.existsSync()) return;
for (final String line in const LineSplitter().convert(await file.readAsString())) {
if (line.trim().isEmpty) continue;
final Object? decoded = jsonDecode(line);
if (decoded is Map<String, Object?>) _records.add(UDocRecord.fromJson(decoded));
}
notifyListeners();
} on Object {
return;
}
}