Skip to content

Commit 11eb764

Browse files
committed
hamed/minor_refactor
1 parent a8241ea commit 11eb764

File tree

8 files changed

+56
-57
lines changed

8 files changed

+56
-57
lines changed

example/ios/Flutter/AppFrameworkInfo.plist

Lines changed: 1 addition & 1 deletion
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>8.0</string>
24+
<string>11.0</string>
2525
</dict>
2626
</plist>

example/ios/Flutter/Flutter.podspec

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
#
2-
# NOTE: This podspec is NOT to be published. It is only used as a local source!
3-
# This is a generated file; do not edit or check into version control.
2+
# This podspec is NOT to be published. It is only used as a local source!
3+
# This is a generated file; do not edit or check into version control.
44
#
55

66
Pod::Spec.new do |s|
77
s.name = 'Flutter'
88
s.version = '1.0.0'
9-
s.summary = 'High-performance, high-fidelity mobile apps.'
10-
s.homepage = 'https://flutter.io'
11-
s.license = { :type => 'MIT' }
9+
s.summary = 'A UI toolkit for beautiful and fast apps.'
10+
s.homepage = 'https://flutter.dev'
11+
s.license = { :type => 'BSD' }
1212
s.author = { 'Flutter Dev Team' => '[email protected]' }
1313
s.source = { :git => 'https://github.com/flutter/engine', :tag => s.version.to_s }
14-
s.ios.deployment_target = '8.0'
14+
s.ios.deployment_target = '11.0'
1515
# Framework linking is handled by Flutter tooling, not CocoaPods.
1616
# Add a placeholder to satisfy `s.dependency 'Flutter'` plugin podspecs.
1717
s.vendored_frameworks = 'path/to/nothing'

example/ios/Podfile

Lines changed: 1 addition & 1 deletion
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, '9.0'
2+
# platform :ios, '11.0'
33

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

example/ios/Podfile.lock

Lines changed: 13 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,34 @@
11
PODS:
2-
- connectivity (0.0.1):
3-
- Flutter
4-
- Reachability
5-
- device_info (0.0.1):
2+
- device_info_plus (0.0.1):
63
- Flutter
74
- Flutter (1.0.0)
85
- flutter_deriv_api (0.0.1):
96
- Flutter
10-
- package_info (0.0.1):
7+
- package_info_plus (0.4.5):
118
- Flutter
12-
- Reachability (3.2)
139

1410
DEPENDENCIES:
15-
- connectivity (from `.symlinks/plugins/connectivity/ios`)
16-
- device_info (from `.symlinks/plugins/device_info/ios`)
11+
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
1712
- Flutter (from `Flutter`)
1813
- flutter_deriv_api (from `.symlinks/plugins/flutter_deriv_api/ios`)
19-
- package_info (from `.symlinks/plugins/package_info/ios`)
20-
21-
SPEC REPOS:
22-
trunk:
23-
- Reachability
14+
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
2415

2516
EXTERNAL SOURCES:
26-
connectivity:
27-
:path: ".symlinks/plugins/connectivity/ios"
28-
device_info:
29-
:path: ".symlinks/plugins/device_info/ios"
17+
device_info_plus:
18+
:path: ".symlinks/plugins/device_info_plus/ios"
3019
Flutter:
3120
:path: Flutter
3221
flutter_deriv_api:
3322
:path: ".symlinks/plugins/flutter_deriv_api/ios"
34-
package_info:
35-
:path: ".symlinks/plugins/package_info/ios"
23+
package_info_plus:
24+
:path: ".symlinks/plugins/package_info_plus/ios"
3625

3726
SPEC CHECKSUMS:
38-
connectivity: c4130b2985d4ef6fd26f9702e886bd5260681467
39-
device_info: d7d233b645a32c40dfdc212de5cf646ca482f175
40-
Flutter: 434fef37c0980e73bb6479ef766c45957d4b510c
27+
device_info_plus: e5c5da33f982a436e103237c0c85f9031142abed
28+
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
4129
flutter_deriv_api: 9e29abd7cc5091b72303f9c8be549618415f1437
42-
package_info: 873975fc26034f0b863a300ad47e7f1ac6c7ec62
43-
Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96
30+
package_info_plus: 6c92f08e1f853dc01228d6f553146438dafcd14e
4431

45-
PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c
32+
PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3
4633

47-
COCOAPODS: 1.10.1
34+
COCOAPODS: 1.12.1

example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 46;
6+
objectVersion = 54;
77
objects = {
88

99
/* Begin PBXBuildFile section */
@@ -164,7 +164,7 @@
164164
97C146E61CF9000F007C117D /* Project object */ = {
165165
isa = PBXProject;
166166
attributes = {
167-
LastUpgradeCheck = 1020;
167+
LastUpgradeCheck = 1300;
168168
ORGANIZATIONNAME = "The Chromium Authors";
169169
TargetAttributes = {
170170
97C146ED1CF9000F007C117D = {
@@ -213,19 +213,15 @@
213213
);
214214
inputPaths = (
215215
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
216-
"${BUILT_PRODUCTS_DIR}/Reachability/Reachability.framework",
217-
"${BUILT_PRODUCTS_DIR}/connectivity/connectivity.framework",
218-
"${BUILT_PRODUCTS_DIR}/device_info/device_info.framework",
216+
"${BUILT_PRODUCTS_DIR}/device_info_plus/device_info_plus.framework",
219217
"${BUILT_PRODUCTS_DIR}/flutter_deriv_api/flutter_deriv_api.framework",
220-
"${BUILT_PRODUCTS_DIR}/package_info/package_info.framework",
218+
"${BUILT_PRODUCTS_DIR}/package_info_plus/package_info_plus.framework",
221219
);
222220
name = "[CP] Embed Pods Frameworks";
223221
outputPaths = (
224-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Reachability.framework",
225-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/connectivity.framework",
226-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/device_info.framework",
222+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/device_info_plus.framework",
227223
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_deriv_api.framework",
228-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/package_info.framework",
224+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/package_info_plus.framework",
229225
);
230226
runOnlyForDeploymentPostprocessing = 0;
231227
shellPath = /bin/sh;
@@ -234,10 +230,12 @@
234230
};
235231
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
236232
isa = PBXShellScriptBuildPhase;
233+
alwaysOutOfDate = 1;
237234
buildActionMask = 2147483647;
238235
files = (
239236
);
240237
inputPaths = (
238+
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
241239
);
242240
name = "Thin Binary";
243241
outputPaths = (
@@ -248,6 +246,7 @@
248246
};
249247
9740EEB61CF901F6004384FC /* Run Script */ = {
250248
isa = PBXShellScriptBuildPhase;
249+
alwaysOutOfDate = 1;
251250
buildActionMask = 2147483647;
252251
files = (
253252
);
@@ -357,7 +356,7 @@
357356
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
358357
GCC_WARN_UNUSED_FUNCTION = YES;
359358
GCC_WARN_UNUSED_VARIABLE = YES;
360-
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
359+
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
361360
MTL_ENABLE_DEBUG_INFO = NO;
362361
SDKROOT = iphoneos;
363362
SUPPORTED_PLATFORMS = iphoneos;
@@ -379,7 +378,10 @@
379378
"$(PROJECT_DIR)/Flutter",
380379
);
381380
INFOPLIST_FILE = Runner/Info.plist;
382-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
381+
LD_RUNPATH_SEARCH_PATHS = (
382+
"$(inherited)",
383+
"@executable_path/Frameworks",
384+
);
383385
LIBRARY_SEARCH_PATHS = (
384386
"$(inherited)",
385387
"$(PROJECT_DIR)/Flutter",
@@ -439,7 +441,7 @@
439441
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
440442
GCC_WARN_UNUSED_FUNCTION = YES;
441443
GCC_WARN_UNUSED_VARIABLE = YES;
442-
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
444+
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
443445
MTL_ENABLE_DEBUG_INFO = YES;
444446
ONLY_ACTIVE_ARCH = YES;
445447
SDKROOT = iphoneos;
@@ -488,7 +490,7 @@
488490
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
489491
GCC_WARN_UNUSED_FUNCTION = YES;
490492
GCC_WARN_UNUSED_VARIABLE = YES;
491-
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
493+
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
492494
MTL_ENABLE_DEBUG_INFO = NO;
493495
SDKROOT = iphoneos;
494496
SUPPORTED_PLATFORMS = iphoneos;
@@ -511,7 +513,10 @@
511513
"$(PROJECT_DIR)/Flutter",
512514
);
513515
INFOPLIST_FILE = Runner/Info.plist;
514-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
516+
LD_RUNPATH_SEARCH_PATHS = (
517+
"$(inherited)",
518+
"@executable_path/Frameworks",
519+
);
515520
LIBRARY_SEARCH_PATHS = (
516521
"$(inherited)",
517522
"$(PROJECT_DIR)/Flutter",
@@ -538,7 +543,10 @@
538543
"$(PROJECT_DIR)/Flutter",
539544
);
540545
INFOPLIST_FILE = Runner/Info.plist;
541-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
546+
LD_RUNPATH_SEARCH_PATHS = (
547+
"$(inherited)",
548+
"@executable_path/Frameworks",
549+
);
542550
LIBRARY_SEARCH_PATHS = (
543551
"$(inherited)",
544552
"$(PROJECT_DIR)/Flutter",

example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1020"
3+
LastUpgradeVersion = "1300"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

example/ios/Runner/Info.plist

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,9 @@
4141
</array>
4242
<key>UIViewControllerBasedStatusBarAppearance</key>
4343
<false/>
44+
<key>CADisableMinimumFrameDurationOnPhone</key>
45+
<true/>
46+
<key>UIApplicationSupportsIndirectInputEvents</key>
47+
<true/>
4448
</dict>
4549
</plist>

lib/state/connection/connection_cubit.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class ConnectionCubit extends Cubit<ConnectionState> {
3333

3434
final String _key = '${UniqueKey()}';
3535

36-
late final BaseAPI? _api;
36+
late final BaseAPI _api;
3737

3838
/// Enables debug mode.
3939
///
@@ -67,24 +67,24 @@ class ConnectionCubit extends Cubit<ConnectionState> {
6767
_connectionInformation = connectionInformation;
6868
}
6969

70-
await _api!.disconnect();
70+
await _api.disconnect();
7171

72-
await _api!.connect(
72+
await _api.connect(
7373
_connectionInformation,
7474
printResponse: enableDebug && printResponse,
7575
onError: (String error) => emit(ConnectionErrorState(error)),
7676
);
7777

78-
_handleConnectionStatus();
78+
_handleConnectionStatus(_api);
7979
} on Exception catch (e) {
8080
emit(ConnectionErrorState('$e'));
8181
}
8282
}
8383

84-
void _handleConnectionStatus() {
84+
void _handleConnectionStatus(BaseAPI api) {
8585
_cancelConnectionStatusSubscription();
8686

87-
_connectionStatusSubscription = _api!.connectionStatus.listen(
87+
_connectionStatusSubscription = api.connectionStatus.listen(
8888
(APIStatus status) {
8989
switch (status) {
9090
case APIStatus.connecting:

0 commit comments

Comments
 (0)