-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TW-1171: update style solutions for message bubble and sendfiledialog
- Loading branch information
1 parent
7d596c6
commit 68e5b32
Showing
4 changed files
with
140 additions
and
62 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,52 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_matrix_html/color_extension.dart'; | ||
import 'package:linagora_design_flutter/colors/linagora_ref_colors.dart'; | ||
import 'package:linagora_design_flutter/colors/linagora_sys_colors.dart'; | ||
|
||
class FileTileWidgetStyle { | ||
const FileTileWidgetStyle(); | ||
|
||
EdgeInsets get paddingFileTileAll => | ||
const EdgeInsets.only(left: 8.0, right: 16.0); | ||
|
||
Color get backgroundColor => | ||
LinagoraSysColors.material().surfaceTint.withOpacity(0.08); | ||
|
||
BorderRadiusGeometry get borderRadius => BorderRadius.circular(12); | ||
|
||
EdgeInsets get paddingIcon => const EdgeInsets.only(right: 8); | ||
|
||
CrossAxisAlignment get crossAxisAlignment => CrossAxisAlignment.start; | ||
|
||
double get iconSize => 48; | ||
|
||
double get imageSize => 40; | ||
|
||
Color? get fileInfoColor => LinagoraRefColors.material().tertiary[20]; | ||
|
||
TextStyle highlightTextStyle(BuildContext context) { | ||
return TextStyle( | ||
color: Theme.of(context).colorScheme.onBackground, | ||
fontWeight: FontWeight.bold, | ||
backgroundColor: CssColor.fromCss('gold'), | ||
); | ||
} | ||
|
||
TextStyle? textStyle(BuildContext context) { | ||
return Theme.of(context).textTheme.bodyLarge?.copyWith( | ||
color: Theme.of(context).colorScheme.onSurface, | ||
); | ||
} | ||
|
||
TextStyle textInformationStyle(BuildContext context) { | ||
return Theme.of(context).textTheme.bodySmall!.copyWith( | ||
color: fileInfoColor, | ||
); | ||
} | ||
|
||
EdgeInsets get imagePadding => const EdgeInsets.all(4.0); | ||
|
||
Widget get paddingBottomText => const SizedBox(height: 0.0); | ||
|
||
Widget get paddingRightIcon => const SizedBox(width: 8.0); | ||
} |
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,31 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
import 'file_tile_widget_style.dart'; | ||
|
||
class MessageFileTileStyle extends FileTileWidgetStyle { | ||
@override | ||
double get iconSize => 36; | ||
|
||
@override | ||
EdgeInsets get paddingIcon => const EdgeInsets.only(right: 4); | ||
|
||
@override | ||
CrossAxisAlignment get crossAxisAlignment => CrossAxisAlignment.center; | ||
|
||
@override | ||
EdgeInsets get paddingFileTileAll => | ||
const EdgeInsets.only(left: 8.0, right: 16.0, top: 4.0, bottom: 4.0); | ||
|
||
@override | ||
TextStyle? textStyle(BuildContext context) { | ||
return Theme.of(context).textTheme.titleSmall?.copyWith( | ||
color: Theme.of(context).colorScheme.onSurface, | ||
); | ||
} | ||
|
||
@override | ||
Widget get paddingBottomText => const SizedBox(height: 4.0); | ||
|
||
@override | ||
Widget get paddingRightIcon => const SizedBox(width: 4.0); | ||
} |