Answers for "show back button flutter"

3

how to change the color of the back button in app bar flutter

appBar: AppBar(
  iconTheme: IconThemeData(
    color: Colors.black, //change your color here
  ),
  title: Text("Sample"),
  centerTitle: true,
),
Posted by: Guest on July-17-2020
5

how do you change the back button flutter

appBar: AppBar(
	title: Text('AppBar'),
    leading: IconButton(icon: Icon(Icons.arrow_back)), // appbar leading icon.
   ),
Posted by: Guest on August-20-2021
1

flutter android back button

@override
Widget build(BuildContext context) {
  return WillPopScope(
    onWillPop: () {
      _moveToScreen2(context, );
    },
    child: Scaffold(
      key: _scaffoldKey,
      appBar: AppBar(
        leading: IconButton(
            icon: Icon(Icons.arrow_back),
            onPressed: () {
              _moveToScreen2(context);
            }),
        title: Text("Screen 1"),
      ),
    ),
  );
}

/**
* This is probably too thin to be in its own method - consider using
* `Navigator.pushReplacementNamed(context, "screen2")` directly
*/
void _moveToScreen2(BuildContext context) =>
    Navigator.pushReplacementNamed(context, "screen2");
Posted by: Guest on July-30-2021

Browse Popular Code Answers by Language