backWithData method
void
backWithData()
Navigates back to the previous screen with provided data.
If a valid BuildContext is provided, this method navigates back to the previous screen and passes the provided data.
Implementation
void backWithData() {
Navigator.pop(context, data);
}