How can I change the function of the back button in dart flutter
I really didn't try anything because tbh, i didn't find what to try
You need simply to override the leading
property in the AppBar
with a new IconButton
, then set your specific method:
AppBar(
leading: IconButton(
onPressed: () {
print("clicked");
},
icon: Icon(Icons.abc),
),
),