-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Julian KOUNE
committed
Oct 3, 2023
1 parent
56942b2
commit 2a15cc1
Showing
2 changed files
with
100 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import 'package:fluffychat/config/app_config.dart'; | ||
import 'package:flutter/material.dart'; | ||
import 'package:linagora_design_flutter/linagora_design_flutter.dart'; | ||
|
||
class ReplyContentStyle { | ||
static const double fontSizeDisplayName = AppConfig.messageFontSize * 0.76; | ||
static const double fontSizeDisplayContent = AppConfig.messageFontSize * 0.88; | ||
|
||
static EdgeInsets replyParentContainerPadding(BuildContext context) { | ||
return const EdgeInsets.only( | ||
left: 4, | ||
right: 8.0, | ||
top: 8.0, | ||
bottom: 8.0, | ||
); | ||
} | ||
|
||
static BoxDecoration replyParentContainerDecoration( | ||
BuildContext context, | ||
bool ownMessage, | ||
) { | ||
return BoxDecoration( | ||
color: ownMessage | ||
? LinagoraRefColors.material().primary[95] | ||
: Theme.of(context).colorScheme.surfaceTint.withOpacity(0.08), | ||
borderRadius: BorderRadius.circular(12), | ||
); | ||
} | ||
|
||
static const double prefixBarWidth = 3.0; | ||
static BoxDecoration prefixBarDecoration(BuildContext context) { | ||
return BoxDecoration( | ||
borderRadius: BorderRadius.circular(2), | ||
color: Theme.of(context).colorScheme.primary, | ||
); | ||
} | ||
|
||
static const double prefixAndDisplayNameSpacing = 6.0; | ||
static TextStyle? displayNameTextStyle(BuildContext context) { | ||
return Theme.of(context).textTheme.titleSmall?.copyWith( | ||
color: Theme.of(context).colorScheme.onSurfaceVariant, | ||
fontWeight: FontWeight.w500, | ||
fontSize: fontSizeDisplayName, | ||
); | ||
} | ||
|
||
static TextStyle? replyBodyTextStyle(BuildContext context) { | ||
return Theme.of(context).textTheme.bodySmall?.copyWith( | ||
color: LinagoraRefColors.material().neutral[50], | ||
fontWeight: FontWeight.w500, | ||
overflow: TextOverflow.ellipsis, | ||
fontSize: fontSizeDisplayContent, | ||
); | ||
} | ||
} |