fix;设置和深浅色
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:shadcn_ui/shadcn_ui.dart';
|
||||
|
||||
import '../data/models/models.dart';
|
||||
import '../theme/yanting_text.dart';
|
||||
@@ -18,6 +19,7 @@ class InstitutionCard extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final colors = ShadTheme.of(context).colorScheme;
|
||||
final initials = institution.nameCn.isEmpty
|
||||
? '研'
|
||||
: institution.nameCn.characters.take(2).toString();
|
||||
@@ -43,6 +45,7 @@ class InstitutionCard extends StatelessWidget {
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: YantingText.listTitle.copyWith(
|
||||
fontWeight: FontWeight.w700,
|
||||
color: colors.foreground,
|
||||
),
|
||||
),
|
||||
if (institution.nameEn.isNotEmpty) ...[
|
||||
@@ -80,6 +83,7 @@ class InstitutionCard extends StatelessWidget {
|
||||
style: YantingText.sectionTitle.copyWith(
|
||||
fontSize: 20,
|
||||
fontFeatures: YantingTypographyFeatures.tabularNums,
|
||||
color: colors.foreground,
|
||||
),
|
||||
),
|
||||
Text('份研报', style: YantingText.meta.copyWith(fontSize: 11)),
|
||||
@@ -105,17 +109,18 @@ class InstitutionLogo extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final colors = ShadTheme.of(context).colorScheme;
|
||||
final fallback = DecoratedBox(
|
||||
decoration: BoxDecoration(
|
||||
color: YantingColors.secondary,
|
||||
border: Border.all(color: YantingColors.border),
|
||||
color: colors.secondary,
|
||||
border: Border.all(color: colors.border),
|
||||
borderRadius: BorderRadius.circular(size * 0.25),
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
initials,
|
||||
style: YantingText.meta.copyWith(
|
||||
color: YantingColors.secondaryForeground,
|
||||
color: colors.secondaryForeground,
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w700,
|
||||
fontFeatures: null,
|
||||
|
||||
Reference in New Issue
Block a user