842b7132
liangchengyou
feat:磨耳朵/练习页面调整
|
1
2
3
|
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
e3c2820c
liangchengyou
feat:先声SDK逻辑调整
|
4
|
import 'package:wow_english/common/core/user_util.dart';
|
842b7132
liangchengyou
feat:磨耳朵/练习页面调整
|
5
6
|
import 'package:wow_english/common/extension/string_extension.dart';
import 'package:wow_english/common/widgets/ow_image_widget.dart';
|
2eb67dd4
liangchengyou
feat:调整代码
|
7
|
import 'package:wow_english/models/course_process_entity.dart';
|
3c1d5c64
liangchengyou
feat:练习功能完成
|
8
|
import 'package:wow_english/utils/toast_util.dart';
|
842b7132
liangchengyou
feat:磨耳朵/练习页面调整
|
9
10
11
12
|
import 'bloc/topic_picture_bloc.dart';
import 'widgets/practice_header_widget.dart';
|
3c1d5c64
liangchengyou
feat:练习功能完成
|
13
|
class TopicPicturePage extends StatelessWidget {
|
608c05b4
liangchengyou
feat:兑换课程
|
14
15
16
|
const TopicPicturePage({super.key, this.courseLessonId});
final String? courseLessonId;
|
842b7132
liangchengyou
feat:磨耳朵/练习页面调整
|
17
18
19
20
|
@override
Widget build(BuildContext context) {
return BlocProvider(
|
2eb67dd4
liangchengyou
feat:调整代码
|
21
|
create: (context) => TopicPictureBloc(
|
3c1d5c64
liangchengyou
feat:练习功能完成
|
22
23
|
PageController(),
courseLessonId??'',
|
2eb67dd4
liangchengyou
feat:调整代码
|
24
|
)
|
3c1d5c64
liangchengyou
feat:练习功能完成
|
25
|
..add(InitBlocEvent())
|
2eb67dd4
liangchengyou
feat:调整代码
|
26
|
..add(RequestDataEvent())
|
e3c2820c
liangchengyou
feat:先声SDK逻辑调整
|
27
28
29
30
|
..add(XSVoiceInitEvent(
{
'appKey':'a418',
'secretKey':'1a16f31f2611bf32fb7b3fc38f5b2c81',
|
b90a1518
liangchengyou
feat:练习接口逻辑完成
|
31
|
'userId':UserUtil.getUser()!.id.toString()
|
e3c2820c
liangchengyou
feat:先声SDK逻辑调整
|
32
33
|
}
)),
|
842b7132
liangchengyou
feat:磨耳朵/练习页面调整
|
34
35
36
37
38
39
40
41
42
|
child: _TopicPicturePage(),
);
}
}
class _TopicPicturePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return BlocListener<TopicPictureBloc,TopicPictureState>(
|
2eb67dd4
liangchengyou
feat:调整代码
|
43
44
|
listener: (context, state){
if (state is RequestDataState) {
|
608c05b4
liangchengyou
feat:兑换课程
|
45
|
context.read<TopicPictureBloc>().add(CurrentPageIndexChangeEvent(0));
|
e3c2820c
liangchengyou
feat:先声SDK逻辑调整
|
46
47
48
49
|
}
if (state is XSVoiceTestState) {
|
2eb67dd4
liangchengyou
feat:调整代码
|
50
51
|
}
},
|
842b7132
liangchengyou
feat:磨耳朵/练习页面调整
|
52
53
54
55
56
|
child: _topicPictureView(),
);
}
Widget _topicPictureView() => BlocBuilder<TopicPictureBloc,TopicPictureState>(
|
842b7132
liangchengyou
feat:磨耳朵/练习页面调整
|
57
58
59
60
61
62
63
64
65
|
builder: (context,state){
final bloc = BlocProvider.of<TopicPictureBloc>(context);
return Container(
color: Colors.white,
child: Stack(
children: [
Column(
children: [
PracticeHeaderWidget(
|
2eb67dd4
liangchengyou
feat:调整代码
|
66
|
title: '${bloc.currentPage}/${bloc.entity?.topics?.length}',
|
b90a1518
liangchengyou
feat:练习接口逻辑完成
|
67
68
|
onTap: () {
Navigator.pop(context);
|
e3c2820c
liangchengyou
feat:先声SDK逻辑调整
|
69
|
},
|
842b7132
liangchengyou
feat:磨耳朵/练习页面调整
|
70
71
72
|
),
Expanded(
child: PageView.builder(
|
2eb67dd4
liangchengyou
feat:调整代码
|
73
|
itemCount: bloc.entity?.topics?.length,
|
842b7132
liangchengyou
feat:磨耳朵/练习页面调整
|
74
75
76
77
78
79
|
scrollDirection: Axis.horizontal,
controller: bloc.pageController,
onPageChanged: (int index) {
bloc.add(CurrentPageIndexChangeEvent(index));
},
itemBuilder: (BuildContext context,int index){
|
2eb67dd4
liangchengyou
feat:调整代码
|
80
81
82
83
84
85
86
87
88
89
90
|
CourseProcessTopics? topics = bloc.entity?.topics![index];
if (topics?.type == 1) {//听音选图
return _pageViewVoicePictureItemWidget(topics);
} else if (topics?.type == 2) {//听音选字
return _pageViewVoiceWordItemWidget(topics);
} else if (topics?.type == 3) {//看题选字
return _pageViewWordItemWidget(topics);
} else if (topics?.type == 4) {//看题选图
return _pageViewItemWidget(topics);
} else {//语音问答
return _voiceAnswerItem(topics);
|
842b7132
liangchengyou
feat:磨耳朵/练习页面调整
|
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
|
}
}),
)
],
),
Positioned(
left: 0,
right: 0,
bottom: 0,
child: Image.asset('bottom_grass'.assetPng)
)
],
),
);
});
///看题选图
|
2eb67dd4
liangchengyou
feat:调整代码
|
108
|
Widget _pageViewItemWidget(CourseProcessTopics? topics) => BlocBuilder<TopicPictureBloc,TopicPictureState>(
|
842b7132
liangchengyou
feat:磨耳朵/练习页面调整
|
109
|
builder: (context, state){
|
842b7132
liangchengyou
feat:磨耳朵/练习页面调整
|
110
111
112
113
|
return SafeArea(
child: Column(
children: [
Text(
|
b90a1518
liangchengyou
feat:练习接口逻辑完成
|
114
|
topics?.word??'',
|
842b7132
liangchengyou
feat:磨耳朵/练习页面调整
|
115
116
117
118
119
120
121
|
softWrap: true,
style: TextStyle(
fontSize: 21.sp,
color: const Color(0xFF333333)
)
),
26.verticalSpace,
|
2eb67dd4
liangchengyou
feat:调整代码
|
122
123
124
125
|
SizedBox(
height: 143.h,
width: 143.w * (topics?.topicAnswerList?.length??0),
child: ListView.builder(
|
2eb67dd4
liangchengyou
feat:调整代码
|
126
|
scrollDirection: Axis.horizontal,
|
b90a1518
liangchengyou
feat:练习接口逻辑完成
|
127
128
|
physics: const NeverScrollableScrollPhysics(),
itemCount: topics?.topicAnswerList?.length??0,
|
2eb67dd4
liangchengyou
feat:调整代码
|
129
|
itemBuilder: (context,index){
|
b90a1518
liangchengyou
feat:练习接口逻辑完成
|
130
|
return _decodeImageWidget(index,topics?.topicAnswerList?[index]);
|
2eb67dd4
liangchengyou
feat:调整代码
|
131
132
|
}),
),
|
842b7132
liangchengyou
feat:磨耳朵/练习页面调整
|
133
134
135
136
137
|
],
),
);
});
|
b90a1518
liangchengyou
feat:练习接口逻辑完成
|
138
|
Widget _decodeImageWidget(int index,CourseProcessTopicsTopicAnswerList? answerLis) => BlocBuilder<TopicPictureBloc,TopicPictureState>(
|
842b7132
liangchengyou
feat:磨耳朵/练习页面调整
|
139
140
141
|
buildWhen: (_, s) => s is SelectItemChangeState,
builder: (context,state){
final bloc = BlocProvider.of<TopicPictureBloc>(context);
|
2eb67dd4
liangchengyou
feat:调整代码
|
142
143
144
145
|
return Container(
padding: EdgeInsets.symmetric(horizontal: 10.w),
child: GestureDetector(
onTap: () => bloc.add(SelectItemEvent(index)),
|
842b7132
liangchengyou
feat:磨耳朵/练习页面调整
|
146
|
child: Container(
|
2eb67dd4
liangchengyou
feat:调整代码
|
147
|
padding: const EdgeInsets.all(4.5),
|
842b7132
liangchengyou
feat:磨耳朵/练习页面调整
|
148
|
decoration: BoxDecoration(
|
2eb67dd4
liangchengyou
feat:调整代码
|
149
150
151
152
153
154
155
156
157
158
159
160
161
|
color: bloc.selectItem == index?const Color(0xFF00B6F1):Colors.white,
borderRadius: BorderRadius.circular(15),
),
height: 143.h,
width: 143.w,
child: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(15),
border: Border.all(
width: 1.0,
color: const Color(0xFF140C10)
),
|
b90a1518
liangchengyou
feat:练习接口逻辑完成
|
162
|
image: DecorationImage(
|
2eb67dd4
liangchengyou
feat:调整代码
|
163
|
fit: BoxFit.fitWidth,
|
b90a1518
liangchengyou
feat:练习接口逻辑完成
|
164
|
image: NetworkImage(answerLis?.picUrl??'')
|
2eb67dd4
liangchengyou
feat:调整代码
|
165
166
|
)
),
|
842b7132
liangchengyou
feat:磨耳朵/练习页面调整
|
167
168
169
170
171
172
173
|
),
),
),
);
});
///看题选字
|
2eb67dd4
liangchengyou
feat:调整代码
|
174
|
Widget _pageViewWordItemWidget(CourseProcessTopics? topics) => BlocBuilder<TopicPictureBloc,TopicPictureState>(
|
842b7132
liangchengyou
feat:磨耳朵/练习页面调整
|
175
|
builder: (context, state){
|
842b7132
liangchengyou
feat:磨耳朵/练习页面调整
|
176
177
178
179
|
return SafeArea(
child: Column(
children: [
Text(
|
b90a1518
liangchengyou
feat:练习接口逻辑完成
|
180
|
topics?.word??'',
|
842b7132
liangchengyou
feat:磨耳朵/练习页面调整
|
181
182
183
184
185
186
187
|
softWrap: true,
style: TextStyle(
fontSize: 21.sp,
color: const Color(0xFF333333)
)
),
26.verticalSpace,
|
2eb67dd4
liangchengyou
feat:调整代码
|
188
189
190
191
|
SizedBox(
height: 143.h,
width: 143.w * (topics?.topicAnswerList?.length??0),
child: ListView.builder(
|
2eb67dd4
liangchengyou
feat:调整代码
|
192
|
scrollDirection: Axis.horizontal,
|
b90a1518
liangchengyou
feat:练习接口逻辑完成
|
193
194
|
itemCount: topics?.topicAnswerList?.length??0,
physics: const NeverScrollableScrollPhysics(),
|
2eb67dd4
liangchengyou
feat:调整代码
|
195
|
itemBuilder: (context,index){
|
b90a1518
liangchengyou
feat:练习接口逻辑完成
|
196
|
return _decodeWordWidget(index,topics?.topicAnswerList?[index]);
|
2eb67dd4
liangchengyou
feat:调整代码
|
197
198
|
}),
),
|
842b7132
liangchengyou
feat:磨耳朵/练习页面调整
|
199
200
201
202
203
|
],
),
);
});
|
b90a1518
liangchengyou
feat:练习接口逻辑完成
|
204
|
Widget _decodeWordWidget(int index,CourseProcessTopicsTopicAnswerList? answerLis) => BlocBuilder<TopicPictureBloc,TopicPictureState>(
|
842b7132
liangchengyou
feat:磨耳朵/练习页面调整
|
205
206
207
|
buildWhen: (_, s) => s is SelectItemChangeState,
builder: (context,state){
final bloc = BlocProvider.of<TopicPictureBloc>(context);
|
2eb67dd4
liangchengyou
feat:调整代码
|
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
|
return Container(
padding: EdgeInsets.symmetric(horizontal: 10.w),
child: GestureDetector(
onTap: () => bloc.add(SelectItemEvent(index)),
child: Container(
width: 143.w,
height: 143.h,
padding: EdgeInsets.only(left: 13.w,right: 13.w,top: 13.h,bottom: 13.h),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(15),
border: Border.all(
width: 1.0,
color: const Color(0xFF140C10)
),
|
842b7132
liangchengyou
feat:磨耳朵/练习页面调整
|
223
|
),
|
2eb67dd4
liangchengyou
feat:调整代码
|
224
225
226
227
228
229
230
|
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Expanded(
child: Container(
alignment: Alignment.center,
child: Text(
|
b90a1518
liangchengyou
feat:练习接口逻辑完成
|
231
|
answerLis?.word??'',
|
2eb67dd4
liangchengyou
feat:调整代码
|
232
233
234
235
236
|
style: TextStyle(
fontSize: 20.sp,
color: const Color(0xFF333333)
)
),
|
842b7132
liangchengyou
feat:磨耳朵/练习页面调整
|
237
238
|
),
),
|
2eb67dd4
liangchengyou
feat:调整代码
|
239
240
241
242
243
244
245
246
247
248
|
Container(
height: 30.h,
width: double.infinity,
decoration: BoxDecoration(
color: bloc.selectItem == index?const Color(0xFF00B6F1):Colors.white,
borderRadius: BorderRadius.circular(15.r),
border: Border.all(
width: 1.5,
color: const Color(0xFF140C10)
),
|
842b7132
liangchengyou
feat:磨耳朵/练习页面调整
|
249
|
),
|
2eb67dd4
liangchengyou
feat:调整代码
|
250
251
252
253
254
|
alignment: Alignment.center,
child: Image.asset('choose'.assetPng),
)
],
),
|
842b7132
liangchengyou
feat:磨耳朵/练习页面调整
|
255
256
257
258
259
260
|
),
),
);
});
///听音选图
|
2eb67dd4
liangchengyou
feat:调整代码
|
261
|
Widget _pageViewVoicePictureItemWidget(CourseProcessTopics? topics) => BlocBuilder<TopicPictureBloc,TopicPictureState>(
|
842b7132
liangchengyou
feat:磨耳朵/练习页面调整
|
262
|
builder: (context, state){
|
3c1d5c64
liangchengyou
feat:练习功能完成
|
263
|
final bloc = BlocProvider.of<TopicPictureBloc>(context);
|
842b7132
liangchengyou
feat:磨耳朵/练习页面调整
|
264
265
266
267
268
269
|
return SafeArea(
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
|
3c1d5c64
liangchengyou
feat:练习功能完成
|
270
271
272
273
274
275
276
277
278
279
|
GestureDetector(
onTap: () {
bloc.add(VoicePlayEvent());
},
child: Image.asset(
bloc.voicePlayState == VoicePlayState.playing?'reade_answer'.assetGif:'voice'.assetPng,
height: 33.h,
width: 30.w,
),
),
|
842b7132
liangchengyou
feat:磨耳朵/练习页面调整
|
280
281
|
10.horizontalSpace,
Text(
|
b90a1518
liangchengyou
feat:练习接口逻辑完成
|
282
|
topics?.word??'',
|
842b7132
liangchengyou
feat:磨耳朵/练习页面调整
|
283
284
285
286
287
288
289
290
|
style: TextStyle(
fontSize: 20.sp,
color: const Color(0xFF333333)
)
)
],
),
26.verticalSpace,
|
2eb67dd4
liangchengyou
feat:调整代码
|
291
292
293
294
295
|
SizedBox(
height: 143.h,
width: 163.w * (topics?.topicAnswerList?.length??0),
child: ListView.builder(
scrollDirection: Axis.horizontal,
|
b90a1518
liangchengyou
feat:练习接口逻辑完成
|
296
|
physics: const NeverScrollableScrollPhysics(),
|
2eb67dd4
liangchengyou
feat:调整代码
|
297
298
|
itemCount: topics?.topicAnswerList?.length??0,
itemBuilder: (BuildContext context,int index){
|
b90a1518
liangchengyou
feat:练习接口逻辑完成
|
299
|
return _decodeVoiceImageWidget(index,topics?.topicAnswerList?[index]);
|
2eb67dd4
liangchengyou
feat:调整代码
|
300
301
|
})
,
|
842b7132
liangchengyou
feat:磨耳朵/练习页面调整
|
302
303
304
305
306
307
|
)
],
),
);
});
|
2eb67dd4
liangchengyou
feat:调整代码
|
308
|
Widget _decodeVoiceImageWidget(int index,CourseProcessTopicsTopicAnswerList? answerList) => BlocBuilder<TopicPictureBloc,TopicPictureState>(
|
842b7132
liangchengyou
feat:磨耳朵/练习页面调整
|
309
310
311
|
buildWhen: (_, s) => s is SelectItemChangeState,
builder: (context,state){
final bloc = BlocProvider.of<TopicPictureBloc>(context);
|
2eb67dd4
liangchengyou
feat:调整代码
|
312
313
314
315
|
return Container(
padding: EdgeInsets.symmetric(horizontal: 10.w),
child: GestureDetector(
onTap: () => bloc.add(SelectItemEvent(index)),
|
842b7132
liangchengyou
feat:磨耳朵/练习页面调整
|
316
|
child: Container(
|
2eb67dd4
liangchengyou
feat:调整代码
|
317
|
padding: const EdgeInsets.all(4.5),
|
842b7132
liangchengyou
feat:磨耳朵/练习页面调整
|
318
|
decoration: BoxDecoration(
|
2eb67dd4
liangchengyou
feat:调整代码
|
319
320
321
322
323
324
325
326
327
328
329
330
331
|
color: bloc.selectItem == index?const Color(0xFF00B6F1):Colors.white,
borderRadius: BorderRadius.circular(15),
),
height: 143.h,
width: 143.w,
child: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(15),
border: Border.all(
width: 1.0,
color: const Color(0xFF140C10)
),
|
b90a1518
liangchengyou
feat:练习接口逻辑完成
|
332
|
image: DecorationImage(
|
2eb67dd4
liangchengyou
feat:调整代码
|
333
|
fit: BoxFit.fitWidth,
|
b90a1518
liangchengyou
feat:练习接口逻辑完成
|
334
|
image: NetworkImage(answerList?.picUrl??'')
|
2eb67dd4
liangchengyou
feat:调整代码
|
335
336
|
)
),
|
842b7132
liangchengyou
feat:磨耳朵/练习页面调整
|
337
338
339
340
341
342
343
|
),
),
),
);
});
///听音选字
|
2eb67dd4
liangchengyou
feat:调整代码
|
344
|
Widget _pageViewVoiceWordItemWidget(CourseProcessTopics? topics) => BlocBuilder<TopicPictureBloc,TopicPictureState>(
|
842b7132
liangchengyou
feat:磨耳朵/练习页面调整
|
345
|
builder: (context, state){
|
3c1d5c64
liangchengyou
feat:练习功能完成
|
346
|
final bloc = BlocProvider.of<TopicPictureBloc>(context);
|
842b7132
liangchengyou
feat:磨耳朵/练习页面调整
|
347
348
349
|
return SafeArea(
child: Column(
children: [
|
3c1d5c64
liangchengyou
feat:练习功能完成
|
350
351
352
353
354
355
356
357
358
359
|
GestureDetector(
onTap: () {
bloc.add(VoicePlayEvent());
},
child: Image.asset(
bloc.voicePlayState == VoicePlayState.playing?'reade_answer'.assetGif:'voice'.assetPng,
height: 33.h,
width: 30.w
)
),
|
842b7132
liangchengyou
feat:磨耳朵/练习页面调整
|
360
|
26.verticalSpace,
|
2eb67dd4
liangchengyou
feat:调整代码
|
361
362
363
364
|
SizedBox(
width: 163.w * (topics?.topicAnswerList?.length??0),
height: 143.h,
child: ListView.builder(
|
2eb67dd4
liangchengyou
feat:调整代码
|
365
|
scrollDirection: Axis.horizontal,
|
b90a1518
liangchengyou
feat:练习接口逻辑完成
|
366
367
|
itemCount: topics?.topicAnswerList?.length,
physics: const NeverScrollableScrollPhysics(),
|
2eb67dd4
liangchengyou
feat:调整代码
|
368
369
370
371
|
itemBuilder: (BuildContext context,int index){
return _decodeVoiceWordImageWidget(index, topics!.topicAnswerList![index]);
}),
),
|
842b7132
liangchengyou
feat:磨耳朵/练习页面调整
|
372
373
374
375
376
|
],
),
);
});
|
2eb67dd4
liangchengyou
feat:调整代码
|
377
|
Widget _decodeVoiceWordImageWidget(int index,CourseProcessTopicsTopicAnswerList answerList) => BlocBuilder<TopicPictureBloc,TopicPictureState>(
|
842b7132
liangchengyou
feat:磨耳朵/练习页面调整
|
378
379
380
381
382
383
|
buildWhen: (_, s) => s is SelectItemChangeState,
builder: (context,state){
final bloc = BlocProvider.of<TopicPictureBloc>(context);
return GestureDetector(
onTap: () => bloc.add(SelectItemEvent(index)),
child: Container(
|
2eb67dd4
liangchengyou
feat:调整代码
|
384
|
width: 163.w,
|
842b7132
liangchengyou
feat:磨耳朵/练习页面调整
|
385
|
height: 143.h,
|
2eb67dd4
liangchengyou
feat:调整代码
|
386
387
388
389
390
391
392
393
394
395
396
397
|
padding: EdgeInsets.symmetric(horizontal: 10.w),
child: Container(
width: 143.w,
height: 143.h,
padding: EdgeInsets.only(left: 13.w,right: 13.w,top: 13.h,bottom: 13.h),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(15),
border: Border.all(
width: 1.0,
color: const Color(0xFF140C10)
),
|
842b7132
liangchengyou
feat:磨耳朵/练习页面调整
|
398
|
),
|
2eb67dd4
liangchengyou
feat:调整代码
|
399
400
401
402
403
404
405
406
407
408
409
410
411
|
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Expanded(
child: Container(
alignment: Alignment.center,
child: Text(
answerList.word??'',
style: TextStyle(
fontSize: 20.sp,
color: const Color(0xFF333333)
)
),
|
842b7132
liangchengyou
feat:磨耳朵/练习页面调整
|
412
413
|
),
),
|
2eb67dd4
liangchengyou
feat:调整代码
|
414
415
416
417
418
419
420
421
422
423
|
Container(
height: 30.h,
width: double.infinity,
decoration: BoxDecoration(
color: bloc.selectItem == index?const Color(0xFF00B6F1):Colors.white,
borderRadius: BorderRadius.circular(15.r),
border: Border.all(
width: 1.5,
color: const Color(0xFF140C10)
),
|
842b7132
liangchengyou
feat:磨耳朵/练习页面调整
|
424
|
),
|
2eb67dd4
liangchengyou
feat:调整代码
|
425
426
427
428
429
|
alignment: Alignment.center,
child: Image.asset('choose'.assetPng),
)
],
),
|
842b7132
liangchengyou
feat:磨耳朵/练习页面调整
|
430
431
432
433
434
435
|
),
),
);
});
///语音问答
|
2eb67dd4
liangchengyou
feat:调整代码
|
436
|
Widget _voiceAnswerItem(CourseProcessTopics? topics) => BlocBuilder<TopicPictureBloc,TopicPictureState>(
|
842b7132
liangchengyou
feat:磨耳朵/练习页面调整
|
437
|
builder: (context, state) {
|
2eb67dd4
liangchengyou
feat:调整代码
|
438
|
final bloc = BlocProvider.of<TopicPictureBloc>(context);
|
842b7132
liangchengyou
feat:磨耳朵/练习页面调整
|
439
|
return Row(
|
842b7132
liangchengyou
feat:磨耳朵/练习页面调整
|
440
441
|
mainAxisAlignment: MainAxisAlignment.center,
children: [
|
2eb67dd4
liangchengyou
feat:调整代码
|
442
|
OwImageWidget(
|
b90a1518
liangchengyou
feat:练习接口逻辑完成
|
443
|
name:topics?.picUrl??'',
|
2eb67dd4
liangchengyou
feat:调整代码
|
444
445
|
height: 186.h,
width: 186.w,
|
842b7132
liangchengyou
feat:磨耳朵/练习页面调整
|
446
|
),
|
2eb67dd4
liangchengyou
feat:调整代码
|
447
448
449
450
|
160.horizontalSpace,
Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
|
3c1d5c64
liangchengyou
feat:练习功能完成
|
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
|
GestureDetector(
onTap: () {
if (bloc.isVoicing) {
showToast('正在录音,不能终止');
return;
}
bloc.add(VoicePlayEvent());
},
child: Row(
children: [
Image.asset(
bloc.voicePlayState == VoicePlayState.playing?'reade_answer'.assetGif:'voice'.assetPng,
height: 52.h,
width: 46.w,
),
10.horizontalSpace,
Text(topics?.word??'')
],
),
|
2eb67dd4
liangchengyou
feat:调整代码
|
470
471
472
473
|
),
70.verticalSpace,
GestureDetector(
onTap: () {
|
3c1d5c64
liangchengyou
feat:练习功能完成
|
474
475
476
477
478
|
if (bloc.voicePlayState == VoicePlayState.playing) {
showToast('正在播放音屏,不能终止');
return;
}
|
2eb67dd4
liangchengyou
feat:调整代码
|
479
480
481
|
if (bloc.isVoicing) {
return;
}
|
3c1d5c64
liangchengyou
feat:练习功能完成
|
482
|
if (topics?.type == 5 || topics?.type == 7) {
|
b90a1518
liangchengyou
feat:练习接口逻辑完成
|
483
484
485
486
|
bloc.add(XSVoiceTestEvent(topics?.keyWord??'', '0',UserUtil.getUser()!.id.toString()));
} else {
bloc.add(XSVoiceTestEvent(topics?.word??'', '0',UserUtil.getUser()!.id.toString()));
}
|
2eb67dd4
liangchengyou
feat:调整代码
|
487
488
|
},
child: Image.asset(
|
3c1d5c64
liangchengyou
feat:练习功能完成
|
489
|
bloc.isVoicing?'micro_phone'.assetGif:'micro_phone'.assetPng,
|
2eb67dd4
liangchengyou
feat:调整代码
|
490
491
492
493
494
|
height: 75.w,
width: 75.w,
),
)
],
|
842b7132
liangchengyou
feat:磨耳朵/练习页面调整
|
495
496
|
)
],
|
2eb67dd4
liangchengyou
feat:调整代码
|
497
498
|
);
});
|
da82bd70
Key
feat: user_inform...
|
499
|
}
|