Skip to content

Commit eef66ba

Browse files
committed
fix bug
1 parent a2d5db7 commit eef66ba

File tree

5 files changed

+28
-15
lines changed

5 files changed

+28
-15
lines changed

open_earable/ios/Flutter/AppFrameworkInfo.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
<key>CFBundleVersion</key>
2222
<string>1.0</string>
2323
<key>MinimumOSVersion</key>
24-
<string>11.0</string>
24+
<string>12.0</string>
2525
</dict>
2626
</plist>

open_earable/ios/Podfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Uncomment this line to define a global platform for your project
2-
# platform :ios, '11.0'
2+
# platform :ios, '12.0'
33

44
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
55
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

open_earable/ios/Podfile.lock

+16-2
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,18 @@ PODS:
55
- flutter_gl (0.0.3):
66
- Flutter
77
- three3d_egl (~> 0.1.3)
8+
- flutter_inappwebview (0.0.1):
9+
- Flutter
10+
- flutter_inappwebview/Core (= 0.0.1)
11+
- OrderedSet (~> 5.0)
12+
- flutter_inappwebview/Core (0.0.1):
13+
- Flutter
14+
- OrderedSet (~> 5.0)
815
- flutter_native_splash (0.0.1):
916
- Flutter
1017
- open_file (0.0.1):
1118
- Flutter
19+
- OrderedSet (5.0.0)
1220
- path_provider_foundation (0.0.1):
1321
- Flutter
1422
- FlutterMacOS
@@ -26,6 +34,7 @@ DEPENDENCIES:
2634
- app_settings (from `.symlinks/plugins/app_settings/ios`)
2735
- Flutter (from `Flutter`)
2836
- flutter_gl (from `.symlinks/plugins/flutter_gl/ios`)
37+
- flutter_inappwebview (from `.symlinks/plugins/flutter_inappwebview/ios`)
2938
- flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`)
3039
- open_file (from `.symlinks/plugins/open_file/ios`)
3140
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
@@ -34,6 +43,7 @@ DEPENDENCIES:
3443

3544
SPEC REPOS:
3645
trunk:
46+
- OrderedSet
3747
- Protobuf
3848
- SwiftProtobuf
3949
- three3d_egl
@@ -45,6 +55,8 @@ EXTERNAL SOURCES:
4555
:path: Flutter
4656
flutter_gl:
4757
:path: ".symlinks/plugins/flutter_gl/ios"
58+
flutter_inappwebview:
59+
:path: ".symlinks/plugins/flutter_inappwebview/ios"
4860
flutter_native_splash:
4961
:path: ".symlinks/plugins/flutter_native_splash/ios"
5062
open_file:
@@ -58,17 +70,19 @@ EXTERNAL SOURCES:
5870

5971
SPEC CHECKSUMS:
6072
app_settings: 017320c6a680cdc94c799949d95b84cb69389ebc
61-
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
73+
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
6274
flutter_gl: 5a5603f35db897697f064027864a32b15d0c421d
75+
flutter_inappwebview: 3d32228f1304635e7c028b0d4252937730bbc6cf
6376
flutter_native_splash: 52501b97d1c0a5f898d687f1646226c1f93c56ef
6477
open_file: 02eb5cb6b21264bd3a696876f5afbfb7ca4f4b7d
78+
OrderedSet: aaeb196f7fef5a9edf55d89760da9176ad40b93c
6579
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
6680
permission_handler_apple: e76247795d700c14ea09e3a2d8855d41ee80a2e6
6781
Protobuf: 970f7ee93a3a08e3cf64859b8efd95ee32b4f87f
6882
reactive_ble_mobile: 9ce6723d37ccf701dbffd202d487f23f5de03b4c
6983
SwiftProtobuf: b70d65f419fbfe61a2d58003456ca5da58e337d6
7084
three3d_egl: de2cd4950ad2d5f2122166c36583bde4c812e7b5
7185

72-
PODFILE CHECKSUM: 70d9d25280d0dd177a5f637cdb0f0b0b12c6a189
86+
PODFILE CHECKSUM: 819463e6a0290f5a72f145ba7cde16e8b6ef0796
7387

7488
COCOAPODS: 1.12.1

open_earable/ios/Runner.xcodeproj/project.pbxproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@
463463
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
464464
GCC_WARN_UNUSED_FUNCTION = YES;
465465
GCC_WARN_UNUSED_VARIABLE = YES;
466-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
466+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
467467
MTL_ENABLE_DEBUG_INFO = NO;
468468
SDKROOT = iphoneos;
469469
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
@@ -601,7 +601,7 @@
601601
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
602602
GCC_WARN_UNUSED_FUNCTION = YES;
603603
GCC_WARN_UNUSED_VARIABLE = YES;
604-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
604+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
605605
MTL_ENABLE_DEBUG_INFO = YES;
606606
ONLY_ACTIVE_ARCH = YES;
607607
SDKROOT = iphoneos;
@@ -650,7 +650,7 @@
650650
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
651651
GCC_WARN_UNUSED_FUNCTION = YES;
652652
GCC_WARN_UNUSED_VARIABLE = YES;
653-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
653+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
654654
MTL_ENABLE_DEBUG_INFO = NO;
655655
SDKROOT = iphoneos;
656656
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";

open_earable/lib/apps/neck_stretch/model/stretch_state.dart

+7-8
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ class StretchStats {
8080
double leftStretchDuration;
8181
double rightStretchDuration;
8282

83-
8483
StretchStats(
8584
{this.maxMainAngle = 0,
8685
this.maxLeftAngle = 0,
@@ -150,13 +149,13 @@ class NeckStretch {
150149
late bool _resting;
151150

152151
/// Holds the Timer that increments the current Duration
153-
var _restDurationTimer;
152+
Timer? _restDurationTimer;
154153

155154
/// Stores the rest duration of the current timer
156155
late Duration _restDuration;
157156

158157
/// Stores the current active timer for state transition
159-
var _currentTimer;
158+
Timer? _currentTimer;
160159

161160
StretchSettings get settings => _settings;
162161

@@ -183,8 +182,8 @@ class NeckStretch {
183182
void stopStretching() {
184183
_resting = false;
185184
_settings.state = NeckStretchState.noStretch;
186-
_currentTimer.cancel();
187-
_restDurationTimer.cancel();
185+
_currentTimer?.cancel();
186+
_restDurationTimer?.cancel();
188187
_restDuration = Duration(seconds: 0);
189188
_viewModel.stopTracking();
190189
}
@@ -204,7 +203,7 @@ class NeckStretch {
204203
/// If we don't restart the timer it results in a weird UI inconsistency
205204
/// for displaying the _restDuration as then the restDuration is already
206205
/// counted down when the next Timer hasn't started yet.
207-
_restDurationTimer.cancel();
206+
_restDurationTimer?.cancel();
208207
_startCountdown();
209208
_restDuration = _settings.restingTime;
210209
_currentTimer = Timer(_settings.restingTime, () {
@@ -241,8 +240,8 @@ class NeckStretch {
241240
return;
242241
case NeckStretchState.leftNeckStretch:
243242
_settings.state = NeckStretchState.doneStretching;
244-
_currentTimer.cancel();
245-
_restDurationTimer.cancel();
243+
_currentTimer?.cancel();
244+
_restDurationTimer?.cancel();
246245
_restDuration = Duration(seconds: 0);
247246
_viewModel.stopTracking();
248247
_openEarable.audioPlayer.jingle(2);

0 commit comments

Comments
 (0)