Commit cc3b183a78ff5a34ac3459a0992149fb73f87c15

Authored by liangchengyou
1 parent 23b46e8e

feat:ios启动图/logo

Showing 44 changed files with 112 additions and 75 deletions
ios/Runner.xcodeproj/project.pbxproj
... ... @@ -505,8 +505,12 @@
505 505 );
506 506 PRODUCT_BUNDLE_IDENTIFIER = com.kouyuxingqiu.wowenglish;
507 507 PRODUCT_NAME = "$(TARGET_NAME)";
  508 + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
  509 + SUPPORTS_MACCATALYST = NO;
  510 + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
508 511 SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
509 512 SWIFT_VERSION = 5.0;
  513 + TARGETED_DEVICE_FAMILY = "1,2";
510 514 VERSIONING_SYSTEM = "apple-generic";
511 515 };
512 516 name = Profile;
... ... @@ -685,9 +689,13 @@
685 689 );
686 690 PRODUCT_BUNDLE_IDENTIFIER = com.kouyuxingqiu.wowenglish;
687 691 PRODUCT_NAME = "$(TARGET_NAME)";
  692 + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
  693 + SUPPORTS_MACCATALYST = NO;
  694 + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
688 695 SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
689 696 SWIFT_OPTIMIZATION_LEVEL = "-Onone";
690 697 SWIFT_VERSION = 5.0;
  698 + TARGETED_DEVICE_FAMILY = "1,2";
691 699 VERSIONING_SYSTEM = "apple-generic";
692 700 };
693 701 name = Debug;
... ... @@ -709,8 +717,12 @@
709 717 );
710 718 PRODUCT_BUNDLE_IDENTIFIER = com.kouyuxingqiu.wowenglish;
711 719 PRODUCT_NAME = "$(TARGET_NAME)";
  720 + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
  721 + SUPPORTS_MACCATALYST = NO;
  722 + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
712 723 SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
713 724 SWIFT_VERSION = 5.0;
  725 + TARGETED_DEVICE_FAMILY = "1,2";
714 726 VERSIONING_SYSTEM = "apple-generic";
715 727 };
716 728 name = Release;
... ...
ios/Runner/Assets.xcassets/AppIcon.appiconset/1024*1024.png 0 → 100644

283 KB

ios/Runner/Assets.xcassets/AppIcon.appiconset/120*120 1.png 0 → 100644

17.9 KB

ios/Runner/Assets.xcassets/AppIcon.appiconset/120*120.png 0 → 100644

17.9 KB

ios/Runner/Assets.xcassets/AppIcon.appiconset/152*152.png 0 → 100644

23.5 KB

ios/Runner/Assets.xcassets/AppIcon.appiconset/167*167.png 0 → 100644

26.6 KB

ios/Runner/Assets.xcassets/AppIcon.appiconset/180*180.png 0 → 100644

29.6 KB

ios/Runner/Assets.xcassets/AppIcon.appiconset/20*20.png 0 → 100644

4.72 KB

ios/Runner/Assets.xcassets/AppIcon.appiconset/29*29 1.png 0 → 100644

5.32 KB

ios/Runner/Assets.xcassets/AppIcon.appiconset/29*29.png 0 → 100644

5.32 KB

ios/Runner/Assets.xcassets/AppIcon.appiconset/40*40 1.png 0 → 100644

6.28 KB

ios/Runner/Assets.xcassets/AppIcon.appiconset/40*40 2.png 0 → 100644

6.28 KB

ios/Runner/Assets.xcassets/AppIcon.appiconset/40*40 3.png 0 → 100644

6.28 KB

ios/Runner/Assets.xcassets/AppIcon.appiconset/58*58 1.png 0 → 100644

8.29 KB

ios/Runner/Assets.xcassets/AppIcon.appiconset/58*58 2.png 0 → 100644

8.29 KB

ios/Runner/Assets.xcassets/AppIcon.appiconset/60*60.png 0 → 100644

8.61 KB

ios/Runner/Assets.xcassets/AppIcon.appiconset/76*76.png 0 → 100644

11.1 KB

ios/Runner/Assets.xcassets/AppIcon.appiconset/80*80 1.png 0 → 100644

11.1 KB

ios/Runner/Assets.xcassets/AppIcon.appiconset/80*80.png 0 → 100644

11.1 KB

ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
1 1 {
2 2 "images" : [
3 3 {
4   - "size" : "20x20",
  4 + "filename" : "40*40 1.png",
5 5 "idiom" : "iphone",
6   - "filename" : "Icon-App-20x20@2x.png",
7   - "scale" : "2x"
  6 + "scale" : "2x",
  7 + "size" : "20x20"
8 8 },
9 9 {
10   - "size" : "20x20",
  10 + "filename" : "60*60.png",
11 11 "idiom" : "iphone",
12   - "filename" : "Icon-App-20x20@3x.png",
13   - "scale" : "3x"
  12 + "scale" : "3x",
  13 + "size" : "20x20"
14 14 },
15 15 {
16   - "size" : "29x29",
  16 + "filename" : "29*29.png",
17 17 "idiom" : "iphone",
18   - "filename" : "Icon-App-29x29@1x.png",
19   - "scale" : "1x"
  18 + "scale" : "1x",
  19 + "size" : "29x29"
20 20 },
21 21 {
22   - "size" : "29x29",
  22 + "filename" : "58*58 1.png",
23 23 "idiom" : "iphone",
24   - "filename" : "Icon-App-29x29@2x.png",
25   - "scale" : "2x"
  24 + "scale" : "2x",
  25 + "size" : "29x29"
26 26 },
27 27 {
28   - "size" : "29x29",
29   - "idiom" : "iphone",
30 28 "filename" : "Icon-App-29x29@3x.png",
31   - "scale" : "3x"
  29 + "idiom" : "iphone",
  30 + "scale" : "3x",
  31 + "size" : "29x29"
32 32 },
33 33 {
34   - "size" : "40x40",
  34 + "filename" : "80*80.png",
35 35 "idiom" : "iphone",
36   - "filename" : "Icon-App-40x40@2x.png",
37   - "scale" : "2x"
  36 + "scale" : "2x",
  37 + "size" : "40x40"
38 38 },
39 39 {
40   - "size" : "40x40",
  40 + "filename" : "120*120.png",
41 41 "idiom" : "iphone",
42   - "filename" : "Icon-App-40x40@3x.png",
43   - "scale" : "3x"
  42 + "scale" : "3x",
  43 + "size" : "40x40"
44 44 },
45 45 {
46   - "size" : "60x60",
  46 + "filename" : "120*120 1.png",
47 47 "idiom" : "iphone",
48   - "filename" : "Icon-App-60x60@2x.png",
49   - "scale" : "2x"
  48 + "scale" : "2x",
  49 + "size" : "60x60"
50 50 },
51 51 {
52   - "size" : "60x60",
  52 + "filename" : "180*180.png",
53 53 "idiom" : "iphone",
54   - "filename" : "Icon-App-60x60@3x.png",
55   - "scale" : "3x"
  54 + "scale" : "3x",
  55 + "size" : "60x60"
56 56 },
57 57 {
58   - "size" : "20x20",
  58 + "filename" : "20*20.png",
59 59 "idiom" : "ipad",
60   - "filename" : "Icon-App-20x20@1x.png",
61   - "scale" : "1x"
  60 + "scale" : "1x",
  61 + "size" : "20x20"
62 62 },
63 63 {
64   - "size" : "20x20",
  64 + "filename" : "40*40 2.png",
65 65 "idiom" : "ipad",
66   - "filename" : "Icon-App-20x20@2x.png",
67   - "scale" : "2x"
  66 + "scale" : "2x",
  67 + "size" : "20x20"
68 68 },
69 69 {
70   - "size" : "29x29",
  70 + "filename" : "29*29 1.png",
71 71 "idiom" : "ipad",
72   - "filename" : "Icon-App-29x29@1x.png",
73   - "scale" : "1x"
  72 + "scale" : "1x",
  73 + "size" : "29x29"
74 74 },
75 75 {
76   - "size" : "29x29",
  76 + "filename" : "58*58 2.png",
77 77 "idiom" : "ipad",
78   - "filename" : "Icon-App-29x29@2x.png",
79   - "scale" : "2x"
  78 + "scale" : "2x",
  79 + "size" : "29x29"
80 80 },
81 81 {
82   - "size" : "40x40",
  82 + "filename" : "40*40 3.png",
83 83 "idiom" : "ipad",
84   - "filename" : "Icon-App-40x40@1x.png",
85   - "scale" : "1x"
  84 + "scale" : "1x",
  85 + "size" : "40x40"
86 86 },
87 87 {
88   - "size" : "40x40",
  88 + "filename" : "80*80 1.png",
89 89 "idiom" : "ipad",
90   - "filename" : "Icon-App-40x40@2x.png",
91   - "scale" : "2x"
  90 + "scale" : "2x",
  91 + "size" : "40x40"
92 92 },
93 93 {
94   - "size" : "76x76",
  94 + "filename" : "76*76.png",
95 95 "idiom" : "ipad",
96   - "filename" : "Icon-App-76x76@1x.png",
97   - "scale" : "1x"
  96 + "scale" : "1x",
  97 + "size" : "76x76"
98 98 },
99 99 {
100   - "size" : "76x76",
  100 + "filename" : "152*152.png",
101 101 "idiom" : "ipad",
102   - "filename" : "Icon-App-76x76@2x.png",
103   - "scale" : "2x"
  102 + "scale" : "2x",
  103 + "size" : "76x76"
104 104 },
105 105 {
106   - "size" : "83.5x83.5",
  106 + "filename" : "167*167.png",
107 107 "idiom" : "ipad",
108   - "filename" : "Icon-App-83.5x83.5@2x.png",
109   - "scale" : "2x"
  108 + "scale" : "2x",
  109 + "size" : "83.5x83.5"
110 110 },
111 111 {
112   - "size" : "1024x1024",
  112 + "filename" : "1024*1024.png",
113 113 "idiom" : "ios-marketing",
114   - "filename" : "Icon-App-1024x1024@1x.png",
115   - "scale" : "1x"
  114 + "scale" : "1x",
  115 + "size" : "1024x1024"
116 116 }
117 117 ],
118 118 "info" : {
119   - "version" : 1,
120   - "author" : "xcode"
  119 + "author" : "xcode",
  120 + "version" : 1
121 121 }
122 122 }
... ...
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png deleted

10.7 KB

ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png deleted

295 Bytes

ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png deleted

406 Bytes

ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png deleted

450 Bytes

ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png deleted

282 Bytes

ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png deleted

462 Bytes

ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png deleted

704 Bytes

ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png deleted

406 Bytes

ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png deleted

586 Bytes

ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png deleted

862 Bytes

ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png deleted

862 Bytes

ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png deleted

1.63 KB

ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png deleted

762 Bytes

ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png deleted

1.2 KB

ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png deleted

1.38 KB

ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
1 1 {
2 2 "images" : [
3 3 {
  4 + "filename" : "qidongye.png",
4 5 "idiom" : "universal",
5   - "filename" : "LaunchImage.png",
6 6 "scale" : "1x"
7 7 },
8 8 {
9 9 "idiom" : "universal",
10   - "filename" : "LaunchImage@2x.png",
11 10 "scale" : "2x"
12 11 },
13 12 {
14 13 "idiom" : "universal",
15   - "filename" : "LaunchImage@3x.png",
16 14 "scale" : "3x"
17 15 }
18 16 ],
19 17 "info" : {
20   - "version" : 1,
21   - "author" : "xcode"
  18 + "author" : "xcode",
  19 + "version" : 1
22 20 }
23 21 }
... ...
ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png deleted

68 Bytes

ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png deleted

68 Bytes

ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png deleted

68 Bytes

ios/Runner/Assets.xcassets/LaunchImage.imageset/qidongye.png 0 → 100644

244 KB

lib/app/splash_page.dart
1 1 import 'dart:async';
  2 +import 'dart:io';
2 3  
3 4 import 'package:flutter/foundation.dart';
4 5 import 'package:flutter/material.dart';
... ... @@ -7,6 +8,8 @@ import 'package:wow_english/common/extension/string_extension.dart';
7 8 import 'package:wow_english/models/user_entity.dart';
8 9 import 'package:wow_english/route/route.dart';
9 10 import 'package:wow_english/utils/sp_util.dart';
  11 +import 'package:flutter/services.dart';
  12 +import 'package:limiting_direction_csx/limiting_direction_csx.dart';
10 13  
11 14 class SplashPage extends StatelessWidget {
12 15 const SplashPage({super.key});
... ... @@ -52,6 +55,17 @@ class _TransitionViewState extends State<TransitionView> {
52 55 void init() async {
53 56 await SpUtil.preInit();
54 57 startTime();
  58 + changeDevice();
  59 + }
  60 +
  61 + void changeDevice() async {
  62 + ///设置设备默认方向
  63 + WidgetsFlutterBinding.ensureInitialized();
  64 + if (Platform.isIOS) {
  65 + await LimitingDirectionCsx.setScreenDirection(DeviceDirectionMask.Landscape);
  66 + } else {
  67 + await SystemChrome.setPreferredOrientations([DeviceOrientation.landscapeLeft,DeviceOrientation.landscapeRight]);
  68 + }
55 69 }
56 70  
57 71 @override
... ...
lib/main.dart
... ... @@ -5,17 +5,10 @@ import 'package:limiting_direction_csx/limiting_direction_csx.dart';
5 5 import 'package:wow_english/app/app.dart';
6 6 import 'package:flutter/services.dart';
7 7  
8   -void main() async {
  8 +void main() {
9 9 ///设置设备默认方向
10 10 WidgetsFlutterBinding.ensureInitialized();
11   - if (Platform.isIOS) {
12   - await LimitingDirectionCsx.setScreenDirection(DeviceDirectionMask.Landscape);
13   - } else {
14   - await SystemChrome.setPreferredOrientations([DeviceOrientation.landscapeLeft,DeviceOrientation.landscapeRight]);
15   - // SystemChrome.setEnabledSystemUIMode(
16   - // SystemUiMode.manual,
17   - // overlays: [SystemUiOverlay.top],
18   - // );
  11 + if (Platform.isAndroid) {
19 12 SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle( //设置状态栏透明
20 13 statusBarColor: Colors.transparent,
21 14 ));
... ...
lib/pages/repeataftercontent/bloc/repeat_after_content_bloc.dart
... ... @@ -2,7 +2,6 @@ import 'package:audioplayers/audioplayers.dart';
2 2 import 'package:flutter/cupertino.dart';
3 3 import 'package:flutter/services.dart';
4 4 import 'package:flutter_bloc/flutter_bloc.dart';
5   -import 'package:flutter_easyloading/flutter_easyloading.dart';
6 5 import 'package:wow_english/common/request/dao/listen_dao.dart';
7 6  
8 7 import '../../../common/request/exception.dart';
... ... @@ -47,6 +46,8 @@ class RepeatAfterContentBloc extends Bloc<RepeatAfterContentEvent, RepeatAfterCo
47 46  
48 47 Map? _voiceTestResult;
49 48  
  49 + int _recordNumber = 0;
  50 +
50 51 VoiceRecordState _voiceRecordState = VoiceRecordState.voiceRecordUnkonw;
51 52  
52 53 bool get videoPlaying => _videoPlaying;
... ... @@ -67,6 +68,7 @@ class RepeatAfterContentBloc extends Bloc<RepeatAfterContentEvent, RepeatAfterCo
67 68  
68 69 RepeatAfterContentBloc(this.courseLessonId) : super(RepeatAfterContentInitial()) {
69 70 on<VoiceRecordStateChangeEvent>(_voiceRecordStateChange);
  71 + on<PostFollowReadContentEvent>(_postFollowReadContent);
70 72 on<VideoPlayChangeEvent>(_videoPlayStateChange);
71 73 on<RecordeVoicePlayEvent>(_recordeVoicePlay);
72 74 on<XSVoiceResultEvent>(_voiceXsResult);
... ... @@ -103,6 +105,7 @@ class RepeatAfterContentBloc extends Bloc&lt;RepeatAfterContentEvent, RepeatAfterCo
103 105 methodChannel.setMethodCallHandler((call) async {
104 106 if (call.method == 'voiceResult') {//评测结果
105 107 add(XSVoiceResultEvent(call.arguments));
  108 + add(PostFollowReadContentEvent());
106 109 return;
107 110 }
108 111  
... ... @@ -117,7 +120,7 @@ class RepeatAfterContentBloc extends Bloc&lt;RepeatAfterContentEvent, RepeatAfterCo
117 120 }
118 121  
119 122 if (call.method == 'voiceFail') {//评测失败
120   - EasyLoading.showToast('评测失败');
  123 + showToast('评测失败');
121 124 return;
122 125 }
123 126 });
... ... @@ -138,6 +141,20 @@ class RepeatAfterContentBloc extends Bloc&lt;RepeatAfterContentEvent, RepeatAfterCo
138 141 }
139 142 }
140 143  
  144 + ///跟读结果
  145 + void _postFollowReadContent(PostFollowReadContentEvent event,Emitter<RepeatAfterContentState> emitter) async {
  146 + try {
  147 + await loading(() async {
  148 + _entityList = await ListenDao.followResult(_recordNumber.toString(),courseLessonId);
  149 +
  150 + });
  151 + } catch (e) {
  152 + if (e is ApiException) {
  153 +
  154 + }
  155 + }
  156 + }
  157 +
141 158 void _videoPlayStateChange(VideoPlayChangeEvent event,Emitter<RepeatAfterContentState> emitter) async {
142 159 _videoPlaying = !_videoPlaying;
143 160 emitter(VideoPlayChangeState());
... ... @@ -165,6 +182,7 @@ class RepeatAfterContentBloc extends Bloc&lt;RepeatAfterContentEvent, RepeatAfterCo
165 182 'startVoice',
166 183 {'word':event.testWord,'type':event.type,'userId':event.userId.toString()}
167 184 );
  185 + _recordNumber++;
168 186 emitter(XSVoiceTestState());
169 187 }
170 188  
... ...
lib/pages/repeataftercontent/bloc/repeat_after_content_event.dart
... ... @@ -44,4 +44,6 @@ class RecordeVoicePlayEvent extends RepeatAfterContentEvent {
44 44 RecordeVoicePlayEvent(this.audioUrl);
45 45 }
46 46  
  47 +class PostFollowReadContentEvent extends RepeatAfterContentEvent {}
  48 +
47 49  
... ...