I have a specialDialog in dart that when clicking on the FlatButton displays an error message in the emulator "The relevant error-causing widget was ScheduleReturn"
specialDialog(BuildContext context, String? agent_id) {
// set up the buttons
Widget coverageButton = FlatButton(
child: Text("Solicitar cobertura"),
onPressed: () {
localRequestCoverage(agent_id);
},
);
Widget returnButton = FlatButton(
child: Text("Solicitar devolución"),
onPressed: () {
Route route = MaterialPageRoute(
builder: (context) => ScheduleReturn(schedule: widget.schedule));
Navigator.pushReplacement(context, route);
},
);
localRequestCoverageScheduleReturnthen probably. Show usScheduleReturn. In any case, the bug simply means you use!on a variable that isnull