-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
I would like to use ndjson package to read a large ndjson file stored in the assets folder of my flutter app.
As a simple example I have copied your object.ndjson to assets/data folder. Here are relevant code parts:
pubspec.yaml:
flutter:
assets:
- assets/data/
main.dart:
import 'package:flutter/services.dart';
import 'package:ndjson/ndjson.dart';
...
void fetchData() async {
final ndjsonSource = await rootBundle.loadString("assets/data/object.ndjson");
final Stream<NdjsonLine> ndjson = ndjsonSource.parseNdjson();
...
}
This has the issue that "The method 'parseNdjson' isn't defined for the type 'String'..." because parseNdjson expects a stream. How can I use your ndjson flutter package to read a file in the assets folder?
Metadata
Metadata
Assignees
Labels
No labels