diff --git a/.fvm/flutter_sdk b/.fvm/flutter_sdk
index 143ba8c..18fa846 120000
--- a/.fvm/flutter_sdk
+++ b/.fvm/flutter_sdk
@@ -1 +1 @@
-/Users/stay/fvm/versions/3.19.2
\ No newline at end of file
+/Users/biao/fvm/versions/3.19.2
\ No newline at end of file
diff --git a/.fvm/fvm_config.json b/.fvm/fvm_config.json
index 7691f75..e4dbfda 100644
--- a/.fvm/fvm_config.json
+++ b/.fvm/fvm_config.json
@@ -1,4 +1,3 @@
{
- "flutterSdkVersion": "3.19.2",
- "flavors": {}
+ "flutterSdkVersion": "3.19.2"
}
\ No newline at end of file
diff --git a/assets/images/micro_phone.gif b/assets/images/micro_phone.gif
index d1da100..6aa5b32 100644
--- a/assets/images/micro_phone.gif
+++ b/assets/images/micro_phone.gif
diff --git a/assets/images/reade_answer.gif b/assets/images/reade_answer.gif
old mode 100644
new mode 100755
index 39f882f..62eb138
--- a/assets/images/reade_answer.gif
+++ b/assets/images/reade_answer.gif
diff --git a/assets/images/voice.png b/assets/images/voice.png
index 01a1aed..cd5f697 100644
--- a/assets/images/voice.png
+++ b/assets/images/voice.png
diff --git a/assets/sounds/class_time.mp3 b/assets/sounds/class_time.mp3
new file mode 100644
index 0000000..3b5226e
--- /dev/null
+++ b/assets/sounds/class_time.mp3
diff --git a/assets/sounds/game_time.mp3 b/assets/sounds/game_time.mp3
new file mode 100644
index 0000000..e0b4391
--- /dev/null
+++ b/assets/sounds/game_time.mp3
diff --git a/assets/sounds/music_time.mp3 b/assets/sounds/music_time.mp3
new file mode 100644
index 0000000..bf94df1
--- /dev/null
+++ b/assets/sounds/music_time.mp3
diff --git a/assets/sounds/quiz_time.mp3 b/assets/sounds/quiz_time.mp3
new file mode 100644
index 0000000..026a2ee
--- /dev/null
+++ b/assets/sounds/quiz_time.mp3
diff --git a/assets/sounds/reading_time.mp3 b/assets/sounds/reading_time.mp3
new file mode 100644
index 0000000..3fa3f2b
--- /dev/null
+++ b/assets/sounds/reading_time.mp3
diff --git a/assets/sounds/video_time.mp3 b/assets/sounds/video_time.mp3
new file mode 100644
index 0000000..4837f74
--- /dev/null
+++ b/assets/sounds/video_time.mp3
diff --git a/assets/sounds/welcome_to_wow.mp3 b/assets/sounds/welcome_to_wow.mp3
new file mode 100644
index 0000000..fb6c66d
--- /dev/null
+++ b/assets/sounds/welcome_to_wow.mp3
diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj
index ed3741a..c50f249 100644
--- a/ios/Runner.xcodeproj/project.pbxproj
+++ b/ios/Runner.xcodeproj/project.pbxproj
@@ -2327,7 +2327,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 13;
+ CURRENT_PROJECT_VERSION = 15;
DEVELOPMENT_TEAM = T8P9KW8GWH;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
@@ -2671,7 +2671,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 13;
+ CURRENT_PROJECT_VERSION = 15;
DEVELOPMENT_TEAM = T8P9KW8GWH;
ENABLE_BITCODE = NO;
HEADER_SEARCH_PATHS = (
@@ -2876,7 +2876,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 13;
+ CURRENT_PROJECT_VERSION = 15;
DEVELOPMENT_TEAM = T8P9KW8GWH;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist
index b7b9e34..493f0d2 100644
--- a/ios/Runner/Info.plist
+++ b/ios/Runner/Info.plist
@@ -77,11 +77,11 @@
NSCameraUsageDescription
- 需要访问相机完成拍照
+ 需要访问相机,完成修改头像功能
NSMicrophoneUsageDescription
- 需要获取录音完成后续功能
+ 需要获取录音,完成上课功能
NSPhotoLibraryUsageDescription
- 需要获取照片用来修改头像
+ 需要获取照片,完成上传头像功能
UIApplicationSupportsIndirectInputEvents
UILaunchStoryboardName
diff --git a/lib/pages/home/bloc.dart b/lib/pages/home/bloc.dart
index eaf337d..3249345 100644
--- a/lib/pages/home/bloc.dart
+++ b/lib/pages/home/bloc.dart
@@ -1,4 +1,6 @@
+import 'package:audioplayers/audioplayers.dart';
import 'package:bloc/bloc.dart';
+import 'package:wow_english/common/extension/string_extension.dart';
import '../../common/core/app_config_helper.dart';
import '../../common/request/dao/system_dao.dart';
@@ -16,6 +18,7 @@ class HomeBloc extends Bloc {
bool exchangeResult = false;
void _init(InitEvent event, Emitter emit) async {
+ AudioPlayer().play(AssetSource('welcome_to_wow'.assetMp3));
await _checkUpdate(emit);
}
diff --git a/lib/pages/home/view.dart b/lib/pages/home/view.dart
index c869b56..ede914a 100644
--- a/lib/pages/home/view.dart
+++ b/lib/pages/home/view.dart
@@ -1,3 +1,4 @@
+import 'package:audioplayers/audioplayers.dart';
import 'package:flutter/material.dart';
import 'package:flutter_app_update/azhon_app_update.dart';
import 'package:flutter_app_update/update_model.dart';
@@ -70,6 +71,8 @@ class _HomePageView extends StatelessWidget {
child: GestureDetector(
onTap: () {
_checkPermission(() {
+ AudioPlayer()
+ .play(AssetSource('class_time'.assetMp3));
pushNamed(AppRouteName.courseUnit)
.then((value) => {
if (value != null)
@@ -120,19 +123,9 @@ class _HomePageView extends StatelessWidget {
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
- Stack(
- alignment: AlignmentDirectional.center,
- children: [
- Image.asset(
- 'bg_frame_module'.assetPng,
- width: 162.5.w,
- height: 203.5.h),
- Image.asset('xe_shop'.assetPng,
- width: 140.5.w, height: 172.h)
- ]),
- 44.verticalSpace,
- // Image.asset('label_module_game'.assetPng,
- // width: 124.w, height: 34.h),
+ Image.asset('xe_shop'.assetPng,
+ width: 140.5.w, height: 172.h),
+ 44.verticalSpace
],
));
}),
@@ -143,6 +136,8 @@ class _HomePageView extends StatelessWidget {
return GestureDetector(
onTap: () {
_checkPermission(() {
+ AudioPlayer().play(
+ AssetSource('game_time'.assetMp3));
pushNamed(AppRouteName.games);
}, bloc);
},
diff --git a/lib/pages/practice/topic_picture_page.dart b/lib/pages/practice/topic_picture_page.dart
index 7de6e92..274e5a0 100644
--- a/lib/pages/practice/topic_picture_page.dart
+++ b/lib/pages/practice/topic_picture_page.dart
@@ -59,7 +59,12 @@ class _TopicPicturePage extends StatelessWidget {
builder: (context, state) {
final bloc = BlocProvider.of(context);
return Container(
- color: Colors.white,
+ decoration: BoxDecoration(
+ image: DecorationImage(
+ image: AssetImage('read_background'.assetPng), // 背景图片路径
+ fit: BoxFit.cover, // 适应图片的方式
+ ),
+ ),
child: Stack(
children: [
Column(
@@ -75,6 +80,7 @@ class _TopicPicturePage extends StatelessWidget {
// Navigator.pop(context);
},
),
+ 35.verticalSpace,
Expanded(
child: PageView.builder(
itemCount: bloc.entity?.topics?.length,
@@ -109,12 +115,7 @@ class _TopicPicturePage extends StatelessWidget {
}),
)
],
- ),
- Positioned(
- left: 0,
- right: 0,
- bottom: 0,
- child: Image.asset('bottom_grass'.assetPng))
+ )
],
),
);
@@ -299,7 +300,7 @@ class _TopicPicturePage extends StatelessWidget {
26.verticalSpace,
SizedBox(
height: 143.h,
- width: 163.w * (topics?.topicAnswerList?.length ?? 0),
+ width: 203.w * (topics?.topicAnswerList?.length ?? 0),
child: ListView.builder(
scrollDirection: Axis.horizontal,
physics: const NeverScrollableScrollPhysics(),
@@ -321,7 +322,7 @@ class _TopicPicturePage extends StatelessWidget {
builder: (context, state) {
final bloc = BlocProvider.of(context);
return Container(
- padding: EdgeInsets.symmetric(horizontal: 10.w),
+ padding: EdgeInsets.symmetric(horizontal: 20.w),
child: GestureDetector(
onTap: () => bloc.add(SelectItemEvent(index)),
child: Container(
@@ -333,15 +334,13 @@ class _TopicPicturePage extends StatelessWidget {
borderRadius: BorderRadius.circular(15),
),
height: 143.h,
- width: 143.w,
+ width: 163.w,
child: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(15),
- border: Border.all(
- width: 1.0, color: const Color(0xFF140C10)),
image: DecorationImage(
- fit: BoxFit.fitWidth,
+ fit: BoxFit.fill,
image: NetworkImage(answerList?.picUrl ?? ''))),
),
),
@@ -449,12 +448,18 @@ class _TopicPicturePage extends StatelessWidget {
return Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
- OwImageWidget(
- name: topics?.picUrl ?? '',
- height: 186.h,
- width: 186.w,
+ ClipRRect(
+ borderRadius: BorderRadius.circular(20),
+ child: Container(
+ color: Colors.white,
+ child: OwImageWidget(
+ name: topics?.picUrl ?? '',
+ height: 186.h,
+ width: 186.w,
+ ),
+ ),
),
- 160.horizontalSpace,
+ 120.horizontalSpace,
Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
@@ -472,8 +477,8 @@ class _TopicPicturePage extends StatelessWidget {
bloc.voicePlayState == VoicePlayState.playing
? 'reade_answer'.assetGif
: 'voice'.assetPng,
- height: 52.h,
- width: 46.w,
+ height: 45.h,
+ width: 45.w,
),
10.horizontalSpace,
Text(topics?.word ?? '')
@@ -506,8 +511,8 @@ class _TopicPicturePage extends StatelessWidget {
bloc.isVoicing
? 'micro_phone'.assetGif
: 'micro_phone'.assetPng,
- height: 75.w,
- width: 75.w,
+ height: 46.h,
+ width: 46.w,
),
)
],
diff --git a/lib/pages/practice/widgets/practice_header_widget.dart b/lib/pages/practice/widgets/practice_header_widget.dart
index 493977a..635d0a0 100644
--- a/lib/pages/practice/widgets/practice_header_widget.dart
+++ b/lib/pages/practice/widgets/practice_header_widget.dart
@@ -12,9 +12,10 @@ class PracticeHeaderWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
- color: Colors.white,
+ color: Colors.transparent,
height: kToolbarHeight + 3.h,
child: AppBar(
+ backgroundColor: Colors.transparent,
leading: GestureDetector(
child: Image.asset(
'back_around'.assetPng,
@@ -25,7 +26,7 @@ class PracticeHeaderWidget extends StatelessWidget {
),
centerTitle: true,
title: Container(
- height: 40.h,
+ height: 20.h,
width: 100.w, // 容器宽度
// padding: EdgeInsets.symmetric(horizontal: 27.w, vertical: 10.h),
alignment: Alignment.center,
diff --git a/lib/pages/reading/bloc/reading_event.dart b/lib/pages/reading/bloc/reading_event.dart
index 9d4ae4d..2adfac8 100644
--- a/lib/pages/reading/bloc/reading_event.dart
+++ b/lib/pages/reading/bloc/reading_event.dart
@@ -39,7 +39,7 @@ class XSVoiceStartEvent extends ReadingPageEvent {
final String content;
final String type;
final String? userId;
- XSVoiceStartEvent(this.content,this.type,this.userId);
+ XSVoiceStartEvent(this.content, this.type, this.userId);
}
///先声评测停止
@@ -52,4 +52,7 @@ class OnXSVoiceStateChangeEvent extends ReadingPageEvent {}
class VoicePlayStateChangeEvent extends ReadingPageEvent {}
///录音播放
-class PlayRecordAudioEvent extends ReadingPageEvent {}
\ No newline at end of file
+class PlayRecordAudioEvent extends ReadingPageEvent {}
+
+///播放下一页
+class PlayNextPageEvent extends ReadingPageEvent {}
diff --git a/lib/pages/reading/reading_page.dart b/lib/pages/reading/reading_page.dart
index 4b6f27d..ffbb424 100644
--- a/lib/pages/reading/reading_page.dart
+++ b/lib/pages/reading/reading_page.dart
@@ -21,17 +21,16 @@ class ReadingPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return BlocProvider(
- create: (_) => ReadingPageBloc(context, PageController(), courseLessonId ?? '')
- ..add(InitBlocEvent())
- ..add(RequestDataEvent())
- ..add(XSVoiceInitEvent(
- {
- 'appKey':AppConsts.xsAppKey,
- 'service':AppConsts.xsAppService,
- 'secretKey':AppConsts.xsAppSecretKey,
- 'userId':UserUtil.getUser()!.id.toString(),
- }
- )),
+ create: (_) =>
+ ReadingPageBloc(context, PageController(), courseLessonId ?? '')
+ ..add(InitBlocEvent())
+ ..add(RequestDataEvent())
+ ..add(XSVoiceInitEvent({
+ 'appKey': AppConsts.xsAppKey,
+ 'service': AppConsts.xsAppService,
+ 'secretKey': AppConsts.xsAppSecretKey,
+ 'userId': UserUtil.getUser()!.id.toString(),
+ })),
child: _ReadingPage(),
);
}
@@ -60,8 +59,8 @@ class _ReadingPage extends StatelessWidget {
);
}
- Widget _readingPageView() => BlocBuilder(
- builder: (context, state) {
+ Widget _readingPageView() =>
+ BlocBuilder(builder: (context, state) {
final bloc = BlocProvider.of(context);
return Container(
color: Colors.white,
@@ -84,16 +83,14 @@ class _ReadingPage extends StatelessWidget {
children: [
Padding(
padding:
- EdgeInsets.only(left: ScreenUtil().bottomBarHeight),
+ EdgeInsets.only(left: ScreenUtil().bottomBarHeight),
child: IconButton(
onPressed: () {
- popPage(
- data:{
- 'currentStep':bloc.currentPage,
- 'courseLessonId':bloc.courseLessonId,
- 'isCompleted':bloc.isLastPage(),
- }
- );
+ popPage(data: {
+ 'currentStep': bloc.currentPage,
+ 'courseLessonId': bloc.courseLessonId,
+ 'isCompleted': bloc.isLastPage(),
+ });
},
icon: Image.asset(
'back_around'.assetPng,
@@ -167,7 +164,7 @@ class _ReadingPage extends StatelessWidget {
},
child: Image.asset(
bloc.voicePlayState == VoicePlayState.playing &&
- bloc.isOriginAudioPlaying
+ bloc.isOriginAudioPlaying
? 'reade_answer'.assetGif
: 'voice'.assetPng,
height: 40.h,
@@ -179,12 +176,12 @@ class _ReadingPage extends StatelessWidget {
),
Expanded(
child: Text(
- bloc.currentPageData()?.word?.trim() ?? '',
- style: TextStyle(
- color: const Color(0xFF333333), fontSize: 21.sp),
- maxLines: 2,
- overflow: TextOverflow.ellipsis,
- )),
+ bloc.currentPageData()?.word?.trim() ?? '',
+ style: TextStyle(
+ color: const Color(0xFF333333), fontSize: 21.sp),
+ maxLines: 2,
+ overflow: TextOverflow.ellipsis,
+ )),
SizedBox(
width: 10.w,
),
@@ -241,8 +238,7 @@ class _ReadingPage extends StatelessWidget {
return Stack(
children: [
Positioned.fill(
- child:
- Image.network(readings.picUrl ?? '', fit: BoxFit.cover),
+ child: Image.network(readings.picUrl ?? '', fit: BoxFit.cover),
),
],
);
diff --git a/lib/pages/section/section_page.dart b/lib/pages/section/section_page.dart
index 8adbc11..27b4a53 100644
--- a/lib/pages/section/section_page.dart
+++ b/lib/pages/section/section_page.dart
@@ -1,3 +1,4 @@
+import 'package:audioplayers/audioplayers.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
@@ -96,12 +97,18 @@ class _SectionPageView extends StatelessWidget {
state.courseType != SectionType.pictureBook.value) {
///视频类型
///获取视频课程内容
+ if (state.courseType == 1) {
+ AudioPlayer().play(AssetSource('music_time'.assetMp3));
+ } else {
+ AudioPlayer().play(AssetSource('video_time'.assetMp3));
+ }
bloc.add(RequestVideoLessonEvent(
state.courseLessonId, state.courseType));
return;
}
if (state.courseType == SectionType.pictureBook.value) {
+ AudioPlayer().play(AssetSource('reading_time'.assetMp3));
//绘本
pushNamed(AppRouteName.reading,
arguments: {'courseLessonId': state.courseLessonId})
@@ -121,6 +128,7 @@ class _SectionPageView extends StatelessWidget {
if (state.courseType == SectionType.practice.value) {
//练习
+ AudioPlayer().play(AssetSource('quiz_time'.assetMp3));
pushNamed(AppRouteName.topicPic,
arguments: {'courseLessonId': state.courseLessonId})
.then((value) {
diff --git a/lib/pages/user/user_page.dart b/lib/pages/user/user_page.dart
index e70532b..3cb769f 100644
--- a/lib/pages/user/user_page.dart
+++ b/lib/pages/user/user_page.dart
@@ -173,15 +173,7 @@ class _UserView extends StatelessWidget {
UserUtil.getUser()?.phoneNum == '17718485544')
? 12.verticalSpace
: 1.verticalSpace),
- OutlinedButton(
- onPressed: () => pushNamed(AppRouteName.fogPwd),
- style: normalButtonStyle,
- child: Text(
- "修改密码",
- style: textStyle21sp,
- ),
- ),
- 12.verticalSpace,
+
Offstage(
offstage: AppConfigHelper.shouldHidePay(),
child: OutlinedButton(
@@ -199,6 +191,15 @@ class _UserView extends StatelessWidget {
style: textStyle21sp,
)),
),
+ 12.verticalSpace,
+ OutlinedButton(
+ onPressed: () => pushNamed(AppRouteName.fogPwd),
+ style: normalButtonStyle,
+ child: Text(
+ "修改密码",
+ style: textStyle21sp,
+ ),
+ ),
Offstage(
offstage: AppConfigHelper.shouldHidePay(),
child: 12.verticalSpace,