Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6e646d9

Browse files
补充一些颜色
1 parent 775c8a7 commit 6e646d9

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

‎lib/src/base/theme.dart‎

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,27 +134,82 @@ class WeUITheme extends StatelessWidget {
134134
@immutable
135135
class WeUIThemeData extends Diagnosticable {
136136
factory WeUIThemeData({
137+
Color primaryColor,
138+
Color warnColor,
139+
Color activeMaskBlack,
140+
Color bgDefaultColor,
141+
Color bgPrimaryColor,
142+
Color bgActiveColor,
143+
Color lineLightColor,
144+
Color lineDarkColor,
145+
Color textTitleColor,
146+
Color textDescColor,
147+
Color textWarnColor,
137148
Brightness brightness,
138149
Color textTipsColor,
139150
Color linkDefaultColor,
140151
}){
141152
brightness ??= Brightness.light;
142153
textTipsColor ??= weuiTextColorTips(brightness);
143154
linkDefaultColor ??= weuiLinkColorDefault(brightness);
155+
primaryColor ??= weuiColorPrimary(brightness);
156+
warnColor ??= weuiColorWarn(brightness);
157+
activeMaskBlack ??= weuiActiveMaskBlack(brightness);
158+
bgDefaultColor ??= weuiBgColorDefault(brightness);
159+
bgPrimaryColor ??= weuiBgColorPrimary(brightness);
160+
bgActiveColor ??= weuiBgColorActive(brightness);
161+
lineDarkColor ??= weuiLineColorDark(brightness);
162+
lineLightColor ??= weuiLineColorLight(brightness);
163+
textTitleColor ??= weuiTextColorTitle(brightness);
164+
textDescColor ??= weuiTextColorDesc(brightness);
165+
textWarnColor ??= weuiTextColorWarn(brightness);
144166
return WeUIThemeData.raw(
145167
brightness: brightness,
146168
textTipsColor: textTipsColor,
147169
linkDefaultColor: linkDefaultColor,
170+
primaryColor: primaryColor,
171+
warnColor: warnColor,
172+
activeMaskBlack: activeMaskBlack,
173+
bgDefaultColor: bgDefaultColor,
174+
bgPrimaryColor: bgPrimaryColor,
175+
bgActiveColor: bgActiveColor,
176+
lineDarkColor: lineDarkColor,
177+
lineLightColor: lineLightColor,
178+
textDescColor: textDescColor,
179+
textTitleColor: textTitleColor,
180+
textWarnColor: textWarnColor,
148181
);
149182
}
150183
const WeUIThemeData.raw({
184+
@required this.primaryColor,
185+
@required this.warnColor,
186+
@required this.activeMaskBlack,
187+
@required this.bgDefaultColor,
188+
@required this.bgPrimaryColor,
189+
@required this.bgActiveColor,
190+
@required this.lineLightColor,
191+
@required this.lineDarkColor,
192+
@required this.textTitleColor,
193+
@required this.textDescColor,
194+
@required this.textWarnColor,
151195
@required this.brightness,
152196
@required this.textTipsColor,
153197
@required this.linkDefaultColor,
154198
});
199+
final Color primaryColor;
200+
final Color warnColor;
155201
final Brightness brightness;
156202
final Color textTipsColor;
157203
final Color linkDefaultColor;
204+
final Color activeMaskBlack;
205+
final Color bgDefaultColor;
206+
final Color bgPrimaryColor;
207+
final Color bgActiveColor;
208+
final Color lineLightColor;
209+
final Color lineDarkColor;
210+
final Color textTitleColor;
211+
final Color textDescColor;
212+
final Color textWarnColor;
158213

159214
factory WeUIThemeData.light() => null;
160215
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /