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