Skip to content

Commit 7c2df0b

Browse files
authored
Update appbar-tricks.dart
1 parent 50e9c22 commit 7c2df0b

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

appbar-tricks.dart

+33
Original file line numberDiff line numberDiff line change
@@ -1 +1,34 @@
11

2+
//Removing extra padding around appbar leading icon(use titlespacing) -
3+
4+
appBar: AppBar(
5+
leading: Icon(Icons.android),
6+
titleSpacing: 0, //Just add a property called titleSpacing,
7+
title: Text(widget.title),
8+
),
9+
10+
// To increse the leading width of appbar -
11+
12+
appBar: AppBar(
13+
leading: Icon(Icons.account_circle_rounded),
14+
leadingWidth: 100, // default is 56
15+
),
16+
17+
//To increase the default height & alter opacity of appbar -
18+
19+
appBar: AppBar(
20+
toolbarHeight: 120,
21+
toolbarOpacity: 0.5,
22+
leadingWidth: 100, // default is 56
23+
),
24+
25+
// Image in title in appbar -
26+
27+
AppBar(
28+
title: Container(
29+
width: 40,
30+
child: Image.network(url),
31+
),
32+
centerTitle: true,
33+
),
34+

0 commit comments

Comments
 (0)