refactor: Replace hardcoded monospace font with AppTypography constant
- Updated multiple instances of the 'monospace' font family to use AppTypography.monospaceFontFamily for consistency across the application. - This change enhances maintainability and ensures a unified typography approach throughout the app.
This commit is contained in:
@@ -456,7 +456,7 @@ class ErrorCard extends StatelessWidget {
|
||||
child: SelectableText(
|
||||
technicalDetails!,
|
||||
style: const TextStyle(
|
||||
fontFamily: 'monospace',
|
||||
fontFamily: AppTypography.monospaceFontFamily,
|
||||
fontSize: AppTypography.labelMedium,
|
||||
),
|
||||
),
|
||||
@@ -539,7 +539,7 @@ class ErrorDialog extends StatelessWidget {
|
||||
SelectableText(
|
||||
technicalDetails!,
|
||||
style: const TextStyle(
|
||||
fontFamily: 'monospace',
|
||||
fontFamily: AppTypography.monospaceFontFamily,
|
||||
fontSize: AppTypography.labelMedium,
|
||||
),
|
||||
),
|
||||
|
||||
@@ -288,7 +288,7 @@ class _AuthenticationPageState extends ConsumerState<AuthenticationPage> {
|
||||
hostText,
|
||||
style: context.conduitTheme.bodySmall?.copyWith(
|
||||
color: context.conduitTheme.textSecondary,
|
||||
fontFamily: 'monospace',
|
||||
fontFamily: AppTypography.monospaceFontFamily,
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -151,7 +151,7 @@ class _ConnectionIssuePageState extends ConsumerState<ConnectionIssuePage> {
|
||||
textAlign: TextAlign.center,
|
||||
style: context.conduitTheme.bodyMedium?.copyWith(
|
||||
color: context.conduitTheme.textPrimary,
|
||||
fontFamily: 'monospace',
|
||||
fontFamily: AppTypography.monospaceFontFamily,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: Spacing.xs),
|
||||
|
||||
@@ -721,7 +721,7 @@ class _ServerConnectionPageState extends ConsumerState<ServerConnectionPage> {
|
||||
entry.value,
|
||||
style: context.conduitTheme.bodySmall?.copyWith(
|
||||
color: context.conduitTheme.textSecondary,
|
||||
fontFamily: 'monospace',
|
||||
fontFamily: AppTypography.monospaceFontFamily,
|
||||
),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
|
||||
@@ -385,7 +385,7 @@ class _AssistantMessageWidgetState extends ConsumerState<AssistantMessageWidget>
|
||||
style: TextStyle(
|
||||
fontSize: AppTypography.bodySmall,
|
||||
color: theme.textSecondary,
|
||||
fontFamily: 'monospace',
|
||||
fontFamily: AppTypography.monospaceFontFamily,
|
||||
height: 1.35,
|
||||
),
|
||||
),
|
||||
@@ -407,7 +407,7 @@ class _AssistantMessageWidgetState extends ConsumerState<AssistantMessageWidget>
|
||||
style: TextStyle(
|
||||
fontSize: AppTypography.bodySmall,
|
||||
color: theme.textSecondary,
|
||||
fontFamily: 'monospace',
|
||||
fontFamily: AppTypography.monospaceFontFamily,
|
||||
height: 1.35,
|
||||
),
|
||||
),
|
||||
@@ -1207,7 +1207,7 @@ class _AssistantMessageWidgetState extends ConsumerState<AssistantMessageWidget>
|
||||
style: TextStyle(
|
||||
fontSize: AppTypography.bodySmall,
|
||||
color: theme.textSecondary,
|
||||
fontFamily: 'monospace',
|
||||
fontFamily: AppTypography.monospaceFontFamily,
|
||||
height: 1.4,
|
||||
),
|
||||
),
|
||||
@@ -1994,7 +1994,7 @@ class CodeExecutionListView extends StatelessWidget {
|
||||
child: SelectableText(
|
||||
execution.code!,
|
||||
style: const TextStyle(
|
||||
fontFamily: 'monospace',
|
||||
fontFamily: AppTypography.monospaceFontFamily,
|
||||
height: 1.4,
|
||||
),
|
||||
),
|
||||
|
||||
@@ -1168,7 +1168,7 @@ class ConduitShadows {
|
||||
class AppTypography {
|
||||
// Primary UI font now uses the platform default system font
|
||||
static const String fontFamily = '';
|
||||
static const String monospaceFontFamily = 'SF Mono';
|
||||
static const String monospaceFontFamily = 'monospace';
|
||||
|
||||
// Letter spacing values - Enhanced for better readability
|
||||
static const double letterSpacingTight = -0.5;
|
||||
|
||||
Reference in New Issue
Block a user