Skip to content

Commit ba0f19b

Browse files
committed
颜色跟随系统主题
1 parent 5bc9bc1 commit ba0f19b

2 files changed

Lines changed: 109 additions & 107 deletions

File tree

tdesign-component/example/lib/page/td_progress_page.dart

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -96,31 +96,31 @@ class _TDProgressPageState extends State<TDProgressPage> {
9696
@Demo(group: 'progress')
9797
Widget _buildRightLabelLinear(BuildContext context) {
9898
return TDProgress(
99-
type: ProgressType.linear,
99+
type: TDProgressType.linear,
100100
value: 0.8,
101101
strokeWidth: 6,
102-
progressLabelPosition: ProgressLabelPosition.right);
102+
progressLabelPosition: TDProgressLabelPosition.right);
103103
}
104104

105105
@Demo(group: 'progress')
106106
Widget _buildInsideLabelLinear(BuildContext context) {
107-
return TDProgress(type: ProgressType.linear, value: 0.8);
107+
return TDProgress(type: TDProgressType.linear, value: 0.8);
108108
}
109109

110110
@Demo(group: 'progress')
111111
Widget _buildCircle(BuildContext context) {
112-
return TDProgress(type: ProgressType.circular, value: 0.3);
112+
return TDProgress(type: TDProgressType.circular, value: 0.3);
113113
}
114114

115115
@Demo(group: 'progress')
116116
Widget _buildMicro(BuildContext context) {
117-
return TDProgress(type: ProgressType.micro, value: 0.75);
117+
return TDProgress(type: TDProgressType.micro, value: 0.75);
118118
}
119119

120120
@Demo(group: 'progress')
121121
Widget _buildButton(BuildContext context) {
122122
return TDProgress(
123-
type: ProgressType.button,
123+
type: TDProgressType.button,
124124
onTap: _toggleProgress,
125125
onLongPress: _resetProgress,
126126
value: progressValue,
@@ -133,15 +133,15 @@ class _TDProgressPageState extends State<TDProgressPage> {
133133
mainAxisAlignment: MainAxisAlignment.start,
134134
children: [
135135
TDProgress(
136-
type: ProgressType.micro,
136+
type: TDProgressType.micro,
137137
value: microProgressValue,
138138
onTap: _toggleMicroProgress,
139139
label: TDIconLabel(isPlaying ? Icons.pause : Icons.play_arrow,
140140
color: TDTheme.of(context).brandNormalColor),
141141
),
142142
const SizedBox(width: 10),
143143
TDProgress(
144-
type: ProgressType.micro,
144+
type: TDProgressType.micro,
145145
value: microProgressValue,
146146
onTap: _resetMicroProgress,
147147
label: TDIconLabel(Icons.stop,
@@ -154,72 +154,72 @@ class _TDProgressPageState extends State<TDProgressPage> {
154154
@Demo(group: 'progress')
155155
Widget _buildPrimary(BuildContext context) {
156156
return TDProgress(
157-
type: ProgressType.linear,
158-
progressStatus: ProgressStatus.primary,
157+
type: TDProgressType.linear,
158+
progressStatus: TDProgressStatus.primary,
159159
value: 0.8,
160160
strokeWidth: 6,
161-
progressLabelPosition: ProgressLabelPosition.right);
161+
progressLabelPosition: TDProgressLabelPosition.right);
162162
}
163163

164164
@Demo(group: 'progress')
165165
Widget _buildWarning(BuildContext context) {
166166
return TDProgress(
167-
type: ProgressType.linear,
168-
progressStatus: ProgressStatus.warning,
167+
type: TDProgressType.linear,
168+
progressStatus: TDProgressStatus.warning,
169169
value: 0.8,
170170
strokeWidth: 6,
171-
progressLabelPosition: ProgressLabelPosition.right);
171+
progressLabelPosition: TDProgressLabelPosition.right);
172172
}
173173

174174
@Demo(group: 'progress')
175175
Widget _buildDanger(BuildContext context) {
176176
return TDProgress(
177-
type: ProgressType.linear,
178-
progressStatus: ProgressStatus.danger,
177+
type: TDProgressType.linear,
178+
progressStatus: TDProgressStatus.danger,
179179
value: 0.8,
180180
strokeWidth: 6,
181-
progressLabelPosition: ProgressLabelPosition.right);
181+
progressLabelPosition: TDProgressLabelPosition.right);
182182
}
183183

184184
@Demo(group: 'progress')
185185
Widget _buildSuccess(BuildContext context) {
186186
return TDProgress(
187-
type: ProgressType.linear,
188-
progressStatus: ProgressStatus.success,
187+
type: TDProgressType.linear,
188+
progressStatus: TDProgressStatus.success,
189189
value: 0.8,
190190
strokeWidth: 6,
191-
progressLabelPosition: ProgressLabelPosition.right);
191+
progressLabelPosition: TDProgressLabelPosition.right);
192192
}
193193

194194
@Demo(group: 'progress')
195195
Widget _buildCirclePrimary(BuildContext context) {
196196
return TDProgress(
197-
type: ProgressType.circular,
198-
progressStatus: ProgressStatus.primary,
197+
type: TDProgressType.circular,
198+
progressStatus: TDProgressStatus.primary,
199199
value: 0.3);
200200
}
201201

202202
@Demo(group: 'progress')
203203
Widget _buildCircleWarning(BuildContext context) {
204204
return TDProgress(
205-
type: ProgressType.circular,
206-
progressStatus: ProgressStatus.warning,
205+
type: TDProgressType.circular,
206+
progressStatus: TDProgressStatus.warning,
207207
value: 0.3);
208208
}
209209

210210
@Demo(group: 'progress')
211211
Widget _buildCircleDanger(BuildContext context) {
212212
return TDProgress(
213-
type: ProgressType.circular,
214-
progressStatus: ProgressStatus.danger,
213+
type: TDProgressType.circular,
214+
progressStatus: TDProgressStatus.danger,
215215
value: 0.3);
216216
}
217217

218218
@Demo(group: 'progress')
219219
Widget _buildCircleSuccess(BuildContext context) {
220220
return TDProgress(
221-
type: ProgressType.circular,
222-
progressStatus: ProgressStatus.success,
221+
type: TDProgressType.circular,
222+
progressStatus: TDProgressStatus.success,
223223
value: 1);
224224
}
225225

0 commit comments

Comments
 (0)