fix;设置和深浅色
This commit is contained in:
@@ -325,6 +325,7 @@ class _CoreInsights extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final colors = ShadTheme.of(context).colorScheme;
|
||||
final points = asMapList(payload['points']);
|
||||
if (points.isEmpty) return _TextLines(payload: payload);
|
||||
return Column(
|
||||
@@ -335,8 +336,8 @@ class _CoreInsights extends StatelessWidget {
|
||||
margin: const EdgeInsets.only(bottom: YantingSpacing.x3),
|
||||
padding: const EdgeInsets.all(YantingSpacing.x3),
|
||||
decoration: BoxDecoration(
|
||||
color: YantingColors.background,
|
||||
border: Border.all(color: YantingColors.border),
|
||||
color: colors.background,
|
||||
border: Border.all(color: colors.border),
|
||||
borderRadius: BorderRadius.circular(YantingRadius.md),
|
||||
),
|
||||
child: Column(
|
||||
@@ -364,6 +365,7 @@ class _SourceCompliance extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final colors = ShadTheme.of(context).colorScheme;
|
||||
final institution = report?.institution;
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
@@ -403,15 +405,15 @@ class _SourceCompliance extends StatelessWidget {
|
||||
const SizedBox(height: YantingSpacing.x3),
|
||||
DecoratedBox(
|
||||
decoration: BoxDecoration(
|
||||
color: YantingColors.background,
|
||||
border: Border.all(color: YantingColors.border),
|
||||
color: colors.background,
|
||||
border: Border.all(color: colors.border),
|
||||
borderRadius: BorderRadius.circular(YantingRadius.md),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(YantingSpacing.x3),
|
||||
child: Text(
|
||||
asString(payload['disclaimer'], '本内容为公开/授权研报的结构化解读,不构成投资建议。'),
|
||||
style: YantingText.meta.copyWith(color: YantingColors.warning),
|
||||
style: YantingText.meta.copyWith(color: colors.warning),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -428,6 +430,7 @@ class _InfoLine extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final colors = ShadTheme.of(context).colorScheme;
|
||||
if (value.isEmpty) return const SizedBox.shrink();
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(bottom: YantingSpacing.x2),
|
||||
@@ -437,7 +440,7 @@ class _InfoLine extends StatelessWidget {
|
||||
Text(
|
||||
label,
|
||||
style: YantingText.badge.copyWith(
|
||||
color: YantingColors.mutedForeground,
|
||||
color: colors.mutedForeground,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: YantingSpacing.x1),
|
||||
@@ -496,10 +499,11 @@ class _InstitutionModule extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final colors = ShadTheme.of(context).colorScheme;
|
||||
final name = asString(payload['name_cn'], report?.institution.nameCn ?? '');
|
||||
return Row(
|
||||
children: [
|
||||
const Icon(AppIcons.bank, color: YantingColors.foreground),
|
||||
Icon(AppIcons.bank, color: colors.foreground),
|
||||
const SizedBox(width: YantingSpacing.x2),
|
||||
Expanded(child: Text(name, style: YantingText.body)),
|
||||
Text(
|
||||
@@ -551,6 +555,7 @@ class _KeyDataModule extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final colors = ShadTheme.of(context).colorScheme;
|
||||
if (compact) return _Preview(payload: payload);
|
||||
final rows = asMapList(payload['rows']);
|
||||
return Column(
|
||||
@@ -561,7 +566,7 @@ class _KeyDataModule extends StatelessWidget {
|
||||
margin: const EdgeInsets.only(bottom: YantingSpacing.x3),
|
||||
padding: const EdgeInsets.all(YantingSpacing.x3),
|
||||
decoration: BoxDecoration(
|
||||
color: YantingColors.secondary,
|
||||
color: colors.secondary,
|
||||
borderRadius: BorderRadius.circular(YantingRadius.md),
|
||||
),
|
||||
child: Row(
|
||||
@@ -575,9 +580,7 @@ class _KeyDataModule extends StatelessWidget {
|
||||
const SizedBox(height: 6),
|
||||
Text(
|
||||
asString(row['judgment'], asString(row['importance'])),
|
||||
style: YantingText.body.copyWith(
|
||||
color: YantingColors.foreground,
|
||||
),
|
||||
style: YantingText.body.copyWith(color: colors.foreground),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -630,6 +633,7 @@ class _TimelineEntry extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final colors = ShadTheme.of(context).colorScheme;
|
||||
return IntrinsicHeight(
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
@@ -640,8 +644,8 @@ class _TimelineEntry extends StatelessWidget {
|
||||
width: 9,
|
||||
height: 9,
|
||||
margin: const EdgeInsets.only(top: 6),
|
||||
decoration: const BoxDecoration(
|
||||
color: YantingColors.primary,
|
||||
decoration: BoxDecoration(
|
||||
color: colors.primary,
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
),
|
||||
@@ -650,7 +654,7 @@ class _TimelineEntry extends StatelessWidget {
|
||||
child: Container(
|
||||
width: 1,
|
||||
margin: const EdgeInsets.symmetric(vertical: 4),
|
||||
color: YantingColors.border,
|
||||
color: colors.border,
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -666,7 +670,7 @@ class _TimelineEntry extends StatelessWidget {
|
||||
Text(
|
||||
asString(event['date']),
|
||||
style: YantingText.meta.copyWith(
|
||||
color: YantingColors.foreground,
|
||||
color: colors.foreground,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
@@ -822,6 +826,7 @@ class _DifferentiatedViewModule extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final colors = ShadTheme.of(context).colorScheme;
|
||||
if (compact) return _Preview(payload: payload);
|
||||
final items = asMapList(payload['divergences']);
|
||||
return Column(
|
||||
@@ -842,7 +847,7 @@ class _DifferentiatedViewModule extends StatelessWidget {
|
||||
Text(
|
||||
'常见观点',
|
||||
style: YantingText.badge.copyWith(
|
||||
color: YantingColors.mutedForeground,
|
||||
color: colors.mutedForeground,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: YantingSpacing.x1),
|
||||
@@ -856,7 +861,7 @@ class _DifferentiatedViewModule extends StatelessWidget {
|
||||
Text(
|
||||
'报告观点',
|
||||
style: YantingText.badge.copyWith(
|
||||
color: YantingColors.foreground,
|
||||
color: colors.foreground,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: YantingSpacing.x1),
|
||||
@@ -881,6 +886,7 @@ class _WeaknessesModule extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final colors = ShadTheme.of(context).colorScheme;
|
||||
if (compact) return _Preview(payload: payload);
|
||||
final items = asMapList(payload['items']);
|
||||
final verificationNotes = asStringList(payload['verification_notes']);
|
||||
@@ -916,7 +922,7 @@ class _WeaknessesModule extends StatelessWidget {
|
||||
const SizedBox(height: YantingSpacing.x2),
|
||||
DecoratedBox(
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0x109A6500),
|
||||
color: colors.warningSoft.withValues(alpha: 0.16),
|
||||
borderRadius: BorderRadius.circular(YantingRadius.sm),
|
||||
),
|
||||
child: Padding(
|
||||
@@ -926,9 +932,7 @@ class _WeaknessesModule extends StatelessWidget {
|
||||
children: [
|
||||
Text(
|
||||
'需要继续验证',
|
||||
style: YantingText.badge.copyWith(
|
||||
color: YantingColors.warning,
|
||||
),
|
||||
style: YantingText.badge.copyWith(color: colors.warning),
|
||||
),
|
||||
const SizedBox(height: YantingSpacing.x1),
|
||||
for (final note
|
||||
|
||||
Reference in New Issue
Block a user