Flutter – 'widget' can't be accessed in an initializer
I am trying to transfer data from the first page to the second page like this. Navigator.pushReplacement(context, MaterialPageRoute(builder: (contex) => SegmentationSchedule(idBatch: batchTransfer.id!,))); but when I try to retrieve the data a message like this appears The instance member 'widget' can't…