diff --git a/packages/cosmos_ui_components/lib/components/app_version_text.dart b/packages/cosmos_ui_components/lib/components/app_version_text.dart index 8de476eb..221ace54 100644 --- a/packages/cosmos_ui_components/lib/components/app_version_text.dart +++ b/packages/cosmos_ui_components/lib/components/app_version_text.dart @@ -1,3 +1,5 @@ +import 'package:cosmos_ui_components/cosmos_text_theme.dart'; +import 'package:cosmos_ui_components/cosmos_ui_components.dart'; import 'package:cosmos_utils/app_info_provider.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; @@ -16,7 +18,10 @@ class AppVersionText extends StatelessWidget { future: appInfoProvider.getAppVersion(), builder: (context, snapshot) => Text( snapshot.data ?? '', - style: style, + style: style ?? + CosmosTextTheme.copyMinus1Normal.copyWith( + color: CosmosTheme.of(context).colors.text, + ), ), ); diff --git a/packages/cosmos_ui_components/lib/components/chip_text.dart b/packages/cosmos_ui_components/lib/components/chip_text.dart index 0b5e7b0b..adb5908c 100644 --- a/packages/cosmos_ui_components/lib/components/chip_text.dart +++ b/packages/cosmos_ui_components/lib/components/chip_text.dart @@ -1,3 +1,4 @@ +import 'package:cosmos_ui_components/cosmos_text_theme.dart'; import 'package:cosmos_ui_components/cosmos_ui_components.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; @@ -24,7 +25,7 @@ class ChipText extends StatelessWidget { ), child: Text( title, - style: style, + style: style ?? CosmosTextTheme.copyMinus1Normal.copyWith(color: theme.colors.text), ), ); } diff --git a/packages/cosmos_ui_components/lib/components/content_loading_indicator.dart b/packages/cosmos_ui_components/lib/components/content_loading_indicator.dart index 2fb8f0b2..9c90616f 100644 --- a/packages/cosmos_ui_components/lib/components/content_loading_indicator.dart +++ b/packages/cosmos_ui_components/lib/components/content_loading_indicator.dart @@ -16,7 +16,7 @@ class ContentLoadingIndicator extends StatelessWidget { child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ - const CircularProgressIndicator(), + CircularProgressIndicator(color: CosmosTheme.of(context).colors.text), SizedBox(height: CosmosTheme.of(context).spacingM), if (message.isNotEmpty) Text(message), ], diff --git a/packages/cosmos_ui_components/lib/components/cosmos_app_bar.dart b/packages/cosmos_ui_components/lib/components/cosmos_app_bar.dart index a3a81c0b..9c322e72 100644 --- a/packages/cosmos_ui_components/lib/components/cosmos_app_bar.dart +++ b/packages/cosmos_ui_components/lib/components/cosmos_app_bar.dart @@ -36,7 +36,12 @@ class CosmosAppBar extends StatelessWidget implements PreferredSizeWidget { SizedBox(height: theme.spacingL), Padding( padding: EdgeInsets.symmetric(horizontal: theme.spacingL), - child: Text(title!, style: CosmosTextTheme.titleSans2Bold), + child: Text( + title!, + style: CosmosTextTheme.titleSans2Bold.copyWith( + color: theme.colors.text, + ), + ), ), ] ], diff --git a/packages/cosmos_ui_components/lib/components/cosmos_text_button.dart b/packages/cosmos_ui_components/lib/components/cosmos_text_button.dart index 9d2fb3ea..7ee118b6 100644 --- a/packages/cosmos_ui_components/lib/components/cosmos_text_button.dart +++ b/packages/cosmos_ui_components/lib/components/cosmos_text_button.dart @@ -33,11 +33,12 @@ class CosmosTextButton extends StatelessWidget { @override Widget build(BuildContext context) { + final theme = CosmosTheme.of(context); return TextButton( onPressed: onTap, style: TextButton.styleFrom( fixedSize: Size.fromHeight(height), - shape: RoundedRectangleBorder(borderRadius: CosmosTheme.of(context).borderRadiusM), + shape: RoundedRectangleBorder(borderRadius: theme.borderRadiusM), onSurface: color, ), child: Row( @@ -48,16 +49,19 @@ class CosmosTextButton extends StatelessWidget { padding: EdgeInsets.only(top: iconTopSpacing ?? 0.0), child: leadingIcon, ), - if (text.isNotEmpty) SizedBox(width: CosmosTheme.of(context).spacingM), + if (text.isNotEmpty) SizedBox(width: theme.spacingM), ], Text( text, maxLines: maxLines, overflow: overflow, - style: textStyle ?? CosmosTextTheme.elevatedButton.copyWith(color: color), + style: textStyle ?? + CosmosTextTheme.elevatedButton.copyWith( + color: color ?? theme.colors.text, + ), ), if (suffixIcon != null) ...[ - if (text.isNotEmpty) SizedBox(width: CosmosTheme.of(context).spacingS), + if (text.isNotEmpty) SizedBox(width: theme.spacingS), Padding( padding: EdgeInsets.only(top: iconTopSpacing ?? 0.0), child: suffixIcon,