Skip to content

Commit

Permalink
TW-1421: ellipsis navigation label
Browse files Browse the repository at this point in the history
  • Loading branch information
hieutbui authored and hoangdat committed Mar 14, 2024
1 parent 798822a commit 6851d71
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ class AdaptiveScaffoldPrimaryNavigationStyle {
static const EdgeInsetsDirectional dividerPadding =
EdgeInsetsDirectional.only(bottom: 16);

static TextStyle? labelTextStyle(BuildContext context) {
return Theme.of(context).textTheme.labelMedium?.copyWith(
color: Theme.of(context).colorScheme.onSurface,
overflow: TextOverflow.ellipsis,
);
}

static const double primaryNavigationWidth = 80;
static const double avatarSize = 56;
static const double dividerSize = 2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ class AdaptiveScaffoldPrimaryNavigationView extends StatelessWidget {
onDestinationSelected: onDestinationSelected,
labelType: NavigationRailLabelType.all,
backgroundColor: Theme.of(context).colorScheme.surface,
selectedLabelTextStyle:
AdaptiveScaffoldPrimaryNavigationStyle.labelTextStyle(
context,
),
unselectedLabelTextStyle:
AdaptiveScaffoldPrimaryNavigationStyle.labelTextStyle(
context,
),
),
),
Column(
Expand Down

0 comments on commit 6851d71

Please sign in to comment.