diff --git a/packages/neon_framework/packages/neon_rich_text/lib/src/rich_objects/fallback.dart b/packages/neon_framework/packages/neon_rich_text/lib/src/rich_objects/fallback.dart index 6537d7c74c2..e4cf67adf60 100644 --- a/packages/neon_framework/packages/neon_rich_text/lib/src/rich_objects/fallback.dart +++ b/packages/neon_framework/packages/neon_rich_text/lib/src/rich_objects/fallback.dart @@ -9,16 +9,12 @@ class NeonRichObjectFallback extends StatelessWidget { /// Creates a new Neon rich object fallback const NeonRichObjectFallback({ required this.parameter, - required this.textStyle, super.key, }); /// The parameter to display. final core.RichObjectParameter parameter; - /// The TextStyle to applied to all text elements in this rich object. - final TextStyle? textStyle; - @override Widget build(BuildContext context) { final iconUrl = parameter.iconUrl; @@ -45,10 +41,7 @@ class NeonRichObjectFallback extends StatelessWidget { padding: EdgeInsets.zero, labelPadding: labelPadding, avatar: avatar, - label: Text( - parameter.name, - style: textStyle, - ), + label: Text(parameter.name), onPressed: () async { final link = parameter.link; if (link != null) { diff --git a/packages/neon_framework/packages/neon_rich_text/lib/src/rich_objects/file.dart b/packages/neon_framework/packages/neon_rich_text/lib/src/rich_objects/file.dart index fc4cf98aad5..cc4cd411333 100644 --- a/packages/neon_framework/packages/neon_rich_text/lib/src/rich_objects/file.dart +++ b/packages/neon_framework/packages/neon_rich_text/lib/src/rich_objects/file.dart @@ -9,16 +9,12 @@ class NeonRichObjectFile extends StatelessWidget { /// Creates a new Neon rich object file. const NeonRichObjectFile({ required this.parameter, - required this.textStyle, super.key, }); /// The parameter to display. final core.RichObjectParameter parameter; - /// The TextStyle to applied to all text elements in this rich object. - final TextStyle? textStyle; - @override Widget build(BuildContext context) { final child = LayoutBuilder( @@ -101,10 +97,7 @@ class NeonRichObjectFile extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ image, - Text( - parameter.name, - style: textStyle, - ), + Text(parameter.name), ], ); }, diff --git a/packages/neon_framework/packages/neon_rich_text/lib/src/rich_objects/mention.dart b/packages/neon_framework/packages/neon_rich_text/lib/src/rich_objects/mention.dart index 8a19b20aee0..3dcf685892a 100644 --- a/packages/neon_framework/packages/neon_rich_text/lib/src/rich_objects/mention.dart +++ b/packages/neon_framework/packages/neon_rich_text/lib/src/rich_objects/mention.dart @@ -12,16 +12,12 @@ class NeonRichObjectMention extends StatelessWidget { /// Create a new Neon rich object mention. const NeonRichObjectMention({ required this.parameter, - required this.textStyle, super.key, }); /// The parameter to display. final core.RichObjectParameter parameter; - /// The TextStyle to applied to all text elements in this rich object. - final TextStyle? textStyle; - @override Widget build(BuildContext context) { final Widget child; @@ -89,7 +85,6 @@ class NeonRichObjectMention extends StatelessWidget { horizontal: VisualDensity.minimumDensity, vertical: VisualDensity.minimumDensity, ), - labelStyle: textStyle, label: Text( parameter.name, style: TextStyle( diff --git a/packages/neon_framework/packages/neon_rich_text/lib/src/rich_objects/rich_objects.dart b/packages/neon_framework/packages/neon_rich_text/lib/src/rich_objects/rich_objects.dart index 017f29e37a8..6553af4d83a 100644 --- a/packages/neon_framework/packages/neon_rich_text/lib/src/rich_objects/rich_objects.dart +++ b/packages/neon_framework/packages/neon_rich_text/lib/src/rich_objects/rich_objects.dart @@ -29,18 +29,15 @@ InlineSpan buildRichObjectParameter({ core.RichObjectParameter_Type.userGroup => NeonRichObjectMention( parameter: parameter, - textStyle: textStyle, ), core.RichObjectParameter_Type.file => NeonRichObjectFile( parameter: parameter, - textStyle: textStyle, ), core.RichObjectParameter_Type.deckCard => NeonRichObjectDeckCard( parameter: parameter, ), _ => NeonRichObjectFallback( parameter: parameter, - textStyle: textStyle, ), }, ); diff --git a/packages/neon_framework/packages/neon_rich_text/test/rich_objects/fallback_test.dart b/packages/neon_framework/packages/neon_rich_text/test/rich_objects/fallback_test.dart index bcf7b2bacc8..52e67119708 100644 --- a/packages/neon_framework/packages/neon_rich_text/test/rich_objects/fallback_test.dart +++ b/packages/neon_framework/packages/neon_rich_text/test/rich_objects/fallback_test.dart @@ -43,7 +43,6 @@ void main() { ..name = 'name' ..link = '/link', ), - textStyle: null, ), ), ); @@ -62,7 +61,6 @@ void main() { ..id = '' ..name = 'name', ), - textStyle: null, ), ), ); @@ -88,7 +86,6 @@ void main() { ..name = 'name' ..iconUrl = '', ), - textStyle: null, ), ), ); diff --git a/packages/neon_framework/packages/neon_rich_text/test/rich_objects/file_test.dart b/packages/neon_framework/packages/neon_rich_text/test/rich_objects/file_test.dart index d793adf6458..e7909beafb1 100644 --- a/packages/neon_framework/packages/neon_rich_text/test/rich_objects/file_test.dart +++ b/packages/neon_framework/packages/neon_rich_text/test/rich_objects/file_test.dart @@ -52,7 +52,6 @@ void main() { ..path = '' ..link = '/link', ), - textStyle: null, ), ), ); @@ -77,7 +76,6 @@ void main() { ..path = '' ..blurhash = validBlurHash, ), - textStyle: null, ), ), ); @@ -105,7 +103,6 @@ void main() { ..previewAvailable = 'no' ..path = 'path', ), - textStyle: null, ), ), ); @@ -129,7 +126,6 @@ void main() { ..previewAvailable = 'yes' ..path = 'path', ), - textStyle: null, ), ), ); @@ -167,7 +163,6 @@ void main() { ..width = width.toString() ..height = height.toString(), ), - textStyle: null, ), ), ); @@ -200,7 +195,6 @@ void main() { ..width = ((maxWidth * widthFactor) * pixelRatio).toString() ..height = ((maxHeight * heightFactor) * pixelRatio).toString(), ), - textStyle: null, ), ), ); @@ -234,7 +228,6 @@ void main() { ..mimetype = 'image/gif' ..blurhash = validBlurHash, ), - textStyle: null, ), ), ); diff --git a/packages/neon_framework/packages/neon_rich_text/test/rich_objects/mention_test.dart b/packages/neon_framework/packages/neon_rich_text/test/rich_objects/mention_test.dart index 8dab2fd598e..89823daf343 100644 --- a/packages/neon_framework/packages/neon_rich_text/test/rich_objects/mention_test.dart +++ b/packages/neon_framework/packages/neon_rich_text/test/rich_objects/mention_test.dart @@ -38,7 +38,6 @@ void main() { ..id = 'username' ..name = 'name', ), - textStyle: null, ), ), ); @@ -63,7 +62,6 @@ void main() { ..id = 'other' ..name = 'name', ), - textStyle: null, ), ), ); @@ -90,7 +88,6 @@ void main() { ..name = 'name' ..iconUrl = '', ), - textStyle: null, ), ), ); @@ -112,7 +109,6 @@ void main() { ..id = '' ..name = 'name', ), - textStyle: null, ), ), ); @@ -143,7 +139,6 @@ void main() { ..id = 'group' ..name = 'name', ), - textStyle: null, ), ), ); @@ -166,7 +161,6 @@ void main() { ..id = 'other' ..name = 'name', ), - textStyle: null, ), ), ); diff --git a/packages/neon_framework/packages/notifications_app/test/goldens/notification_rich.png b/packages/neon_framework/packages/notifications_app/test/goldens/notification_rich.png index 50d62a45cc3..2a4538047e7 100644 Binary files a/packages/neon_framework/packages/notifications_app/test/goldens/notification_rich.png and b/packages/neon_framework/packages/notifications_app/test/goldens/notification_rich.png differ