mirror of
https://github.com/foss42/apidash.git
synced 2025-12-02 18:57:05 +08:00
Remove hard-coded font family
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
// lib/dashbot/widgets/content_renderer.dart
|
// lib/dashbot/widgets/content_renderer.dart
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
import 'package:apidash_design_system/apidash_design_system.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_highlight/flutter_highlight.dart';
|
import 'package:flutter_highlight/flutter_highlight.dart';
|
||||||
import 'package:flutter_highlight/themes/monokai-sublime.dart';
|
import 'package:flutter_highlight/themes/monokai-sublime.dart';
|
||||||
@@ -78,9 +79,8 @@ Widget _renderCodeBlock(
|
|||||||
color: Theme.of(context).colorScheme.surfaceContainerLow,
|
color: Theme.of(context).colorScheme.surfaceContainerLow,
|
||||||
child: SelectableText(
|
child: SelectableText(
|
||||||
prettyJson,
|
prettyJson,
|
||||||
style: const TextStyle(
|
style: kCodeStyle.copyWith(
|
||||||
fontFamily: 'monospace',
|
fontSize: Theme.of(context).textTheme.bodyMedium?.fontSize,
|
||||||
fontSize: 12,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@@ -96,9 +96,8 @@ Widget _renderCodeBlock(
|
|||||||
code,
|
code,
|
||||||
language: language,
|
language: language,
|
||||||
theme: monokaiSublimeTheme,
|
theme: monokaiSublimeTheme,
|
||||||
textStyle: const TextStyle(
|
textStyle: kCodeStyle.copyWith(
|
||||||
fontFamily: 'monospace',
|
fontSize: Theme.of(context).textTheme.bodyMedium?.fontSize,
|
||||||
fontSize: 12,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@@ -117,9 +116,8 @@ Widget _renderFallbackCode(
|
|||||||
color: Theme.of(context).colorScheme.surfaceContainerLow,
|
color: Theme.of(context).colorScheme.surfaceContainerLow,
|
||||||
child: SelectableText(
|
child: SelectableText(
|
||||||
code,
|
code,
|
||||||
style: const TextStyle(
|
style: kCodeStyle.copyWith(
|
||||||
fontFamily: 'monospace',
|
fontSize: Theme.of(context).textTheme.bodyMedium?.fontSize,
|
||||||
fontSize: 12,
|
|
||||||
color: Colors.red,
|
color: Colors.red,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'package:apidash_core/apidash_core.dart' as http;
|
import 'package:apidash_core/apidash_core.dart' as http;
|
||||||
|
import 'package:apidash_design_system/apidash_design_system.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
@@ -251,7 +252,7 @@ class _TestRunnerWidgetState extends ConsumerState<TestRunnerWidget> {
|
|||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
child: SelectableText(
|
child: SelectableText(
|
||||||
test['command'],
|
test['command'],
|
||||||
style: const TextStyle(fontFamily: 'monospace'),
|
style: kCodeStyle,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (hasResult) ...[
|
if (hasResult) ...[
|
||||||
|
|||||||
Reference in New Issue
Block a user