Skip to content

Commit

Permalink
top_bar: add padding to leading widget
Browse files Browse the repository at this point in the history
  • Loading branch information
arnemolland committed Jan 29, 2023
1 parent b710324 commit 83a8de1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.0.8

* Added padding to leading widget in TopBar

## 0.0.7

* Implemented TonalSwitch component
Expand Down
27 changes: 15 additions & 12 deletions lib/src/components/material/top_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -166,18 +166,21 @@ class TopBar<T> extends StatelessWidget implements PreferredSizeWidget {
if (automaticallyImplyLeading) {
icon = GestureDetector(
behavior: HitTestBehavior.opaque,
child: Row(
children: [
const Icon(FlumeIcons.chevron_left, size: 24.0),
if (leadingLabel != null)
Text(
leadingLabel!,
style: context.theme.typography.header4
.toTextStyle()
.copyWith(color: context.theme.colors.body),
overflow: TextOverflow.ellipsis,
),
],
child: Padding(
padding: EdgeInsets.only(left: context.theme.spacing.xs),
child: Row(
children: [
const Icon(FlumeIcons.chevron_left, size: 24.0),
if (leadingLabel != null)
Text(
leadingLabel!,
style: context.theme.typography.header4
.toTextStyle()
.copyWith(color: context.theme.colors.body),
overflow: TextOverflow.ellipsis,
),
],
),
),
onTap: () => usePlatformNavigation
? SystemNavigator.pop()
Expand Down

0 comments on commit 83a8de1

Please sign in to comment.