-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
Milestone
Description
Device: iOS Simulator
Sorry there isn't any log or error message here as nothing is being emitted from Flutter.
I am getting a weird crash when using a RefreshIndicator attached to a get http action. The crash doesn't occur until I tap on a TabBar that has a listener attached to it. I'm not sure if that is relevant but its the only thing that will cause a crash.
The following is the refresh indicator code.
Please let me know what other information I can provide.
Future<Null> _handleRefresh() {
Completer<Null> completer = new Completer<Null>();
get("http://api.myapp.com/endpoint").then((response) {
print("loaded data");
return response.body;
})
.then((jsonString) {
print(jsonString)
})
.then((_) => completer.complete());
return completer.future;
}
@override
Widget build(BuildContext context) {
return new Padding(
padding: EdgeInsets.zero,
child: new RefreshIndicator(
onRefresh: _handleRefresh,
child: new ListView(
children: _cells,
),
)
);
}