In flutter I increased the size of the back arrow in my appbar. But when I move the mouse on top of it the background color on mouse over has shifted image below. How to I change and move the background.
@override
Widget build(BuildContext context) {
return MaterialApp.router(
routerConfig: _router,
theme: ThemeData(
colorSchemeSeed: Color.fromARGB(255, 131, 104, 52),
useMaterial3: true,
appBarTheme: const AppBarTheme(
backgroundColor: Color.fromARGB(255, 240, 239, 237),
iconTheme: IconThemeData(size: 70, color: Colors.black, fill: 0.5, grade: 100, applyTextScaling: false, shadows: [
Shadow(
blurRadius: 15.0,
color: Colors.red,
offset: Offset(3.0, 3.0),
),
],),
toolbarHeight: 70,
),
scaffoldBackgroundColor: Color.fromARGB(230, 230, 230, 230),
inputDecorationTheme: const InputDecorationTheme(
filled: true,
fillColor: Colors.white,
),
),
);
}
2
Answers
While the icon size is quite big, you need to increase the
leadingWidth
of the appBar. Also having the same icon size as toolbarHeight isn’t a good ratio.Add the following style property inside your AppBar