Skip to content

Commit bf39792

Browse files
authored
[Gallery] Add padding to demo appBar (#289)
* Add padding to demo appBar * Update demo.dart * Add padding to leading icon as well * Update demo.dart
1 parent 9eebbce commit bf39792

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

gallery/gallery/lib/pages/demo.dart

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -178,15 +178,19 @@ class _DemoPageState extends State<DemoPage> with TickerProviderStateMixin {
178178
final colorScheme = Theme.of(context).colorScheme;
179179
final iconColor = colorScheme.onSurface;
180180
final selectedIconColor = colorScheme.primary;
181+
final appBarPadding = isDesktop ? 20.0 : 0.0;
181182

182183
final appBar = AppBar(
183184
backgroundColor: Colors.transparent,
184-
leading: IconButton(
185-
icon: const BackButtonIcon(),
186-
tooltip: MaterialLocalizations.of(context).backButtonTooltip,
187-
onPressed: () {
188-
Navigator.maybePop(context);
189-
},
185+
leading: Padding(
186+
padding: EdgeInsetsDirectional.only(start: appBarPadding),
187+
child: IconButton(
188+
icon: const BackButtonIcon(),
189+
tooltip: MaterialLocalizations.of(context).backButtonTooltip,
190+
onPressed: () {
191+
Navigator.maybePop(context);
192+
},
193+
),
190194
),
191195
actions: [
192196
if (_hasOptions)
@@ -244,6 +248,7 @@ class _DemoPageState extends State<DemoPage> with TickerProviderStateMixin {
244248
_state == _DemoState.fullscreen ? selectedIconColor : iconColor,
245249
onPressed: () => _handleTap(_DemoState.fullscreen),
246250
),
251+
SizedBox(width: appBarPadding),
247252
],
248253
);
249254

0 commit comments

Comments
 (0)