Skip to content

Commit

Permalink
Update padding for chat list screen
Browse files Browse the repository at this point in the history
  • Loading branch information
nqhhdev authored and hoangdat committed Oct 2, 2023
1 parent 4cca97c commit dfc7d11
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 25 deletions.
47 changes: 25 additions & 22 deletions lib/widgets/twake_components/twake_header.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ class TwakeHeader extends StatelessWidget
builder: (context, selectMode, _) {
return Align(
alignment: TwakeHeaderStyle.alignment(context),
child: Padding(
padding: TwakeHeaderStyle.padding,
child: Row(
children: [
if (!TwakeHeaderStyle.isDesktop(context))
Expanded(
flex: TwakeHeaderStyle.flexActions,
child: Row(
children: [
if (!TwakeHeaderStyle.isDesktop(context))
Expanded(
flex: TwakeHeaderStyle.flexActions,
child: Padding(
padding: TwakeHeaderStyle.leadingPadding,
child: Row(
children: [
InkWell(
Expand Down Expand Up @@ -82,21 +82,24 @@ class TwakeHeader extends StatelessWidget
],
),
),
Expanded(
flex: TwakeHeaderStyle.flexTitle,
child: Align(
alignment: Alignment.center,
child: Text(
L10n.of(context)!.chats,
style: Theme.of(context).textTheme.titleLarge?.copyWith(
color: Theme.of(context).colorScheme.onSurface,
),
),
),
Expanded(
flex: TwakeHeaderStyle.flexTitle,
child: Align(
alignment: Alignment.center,
child: Text(
L10n.of(context)!.chats,
style: Theme.of(context).textTheme.titleLarge?.copyWith(
color: Theme.of(context).colorScheme.onSurface,
),
),
),
if (!TwakeHeaderStyle.isDesktop(context))
Expanded(
flex: TwakeHeaderStyle.flexActions,
),
if (!TwakeHeaderStyle.isDesktop(context))
Expanded(
flex: TwakeHeaderStyle.flexActions,
child: Padding(
padding: TwakeHeaderStyle.actionsPadding,
child: Align(
alignment: Alignment.centerRight,
child: InkWell(
Expand All @@ -122,8 +125,8 @@ class TwakeHeader extends StatelessWidget
),
),
),
],
),
),
],
),
);
},
Expand Down
11 changes: 8 additions & 3 deletions lib/widgets/twake_components/twake_header_style.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,14 @@ class TwakeHeaderStyle {
: AlignmentDirectional.center;
}

static const EdgeInsetsDirectional padding = EdgeInsetsDirectional.only(
end: 4,
start: 4,
static const EdgeInsetsDirectional actionsPadding =
EdgeInsetsDirectional.only(
end: 16,
);

static const EdgeInsetsDirectional leadingPadding =
EdgeInsetsDirectional.only(
start: 26,
);

static const EdgeInsetsDirectional textButtonPadding =
Expand Down

0 comments on commit dfc7d11

Please sign in to comment.