I am developing an app using flutter. But I am stuck on a situation that Android device has its default back button but iPhone don't. So I need to show back button when I open app in iOS device. Also if there is any other built in functionality available please guide me.
Asked
Active
Viewed 2,699 times
2 Answers
0
By default, we will get the backButton for both the android and iOS. If we don't want it, we can remove by giving empty container(Container()
) to the leading
value to the appBar. Refer this for more details

Dinesh Balasubramanian
- 20,532
- 7
- 64
- 57
-
-
Can u show your code/page where you are not using appBar – Dinesh Balasubramanian Sep 20 '18 at 02:09
0
Use a Scaffold
with AppBar
, it automatically creates the virtual back button at the top-right of the screen. (Assuming you push
the Widget from another screen).
return Scaffold(
appBar: AppBar(
title: Text("Title"),
),
body: YourBody(),
);

diegoveloper
- 93,875
- 20
- 236
- 194