Skip to content

Commit 70e06a3

Browse files
hassan-saleh-mlnivisijohsoe
authored
fix: Upgraded all dependencies to work with Flutter 3.10 and Dart 3 (#119)
* fix: Upgraded all dependencies to work with Flutter 3.10 and Dart 3 * chore: Fix warnings & update depndencies * chore: Remove generated resources * chore: Add flutter_gen * chore: Add lib/gen/* to .gitignore * chore: Remove the .lock files * chore: Add .lock files to .gitignore --------- Co-authored-by: Nikita Sirovskiy <[email protected]> Co-authored-by: Johnny Sørensen <[email protected]>
1 parent c3266d8 commit 70e06a3

29 files changed

+97
-6074
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,7 @@ app.*.map.json
4646
nstack.dart
4747
*.gr.dart
4848
*.config.dart
49+
lib/gen/**
50+
51+
# Dependencies
52+
**.lock

analysis_options.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ linter:
4040
- prefer_collection_literals
4141
- prefer_conditional_assignment
4242
- prefer_contains
43-
- prefer_equal_for_default_values
4443
- prefer_final_fields
4544
- prefer_for_elements_to_map_fromIterable
4645
- prefer_generic_function_type_aliases

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>9.0</string>
24+
<string>11.0</string>
2525
</dict>
2626
</plist>

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'

ios/Podfile.lock

Lines changed: 0 additions & 46 deletions
This file was deleted.

ios/Runner.xcodeproj/project.pbxproj

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

99
/* Begin PBXBuildFile section */
@@ -212,11 +212,12 @@
212212
/* Begin PBXShellScriptBuildPhase section */
213213
0CDC864A47BE90E5AB743534 /* [CP] Embed Pods Frameworks */ = {
214214
isa = PBXShellScriptBuildPhase;
215+
alwaysOutOfDate = 1;
215216
buildActionMask = 2147483647;
216217
files = (
217218
);
218-
inputFileListPaths = (
219-
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
219+
inputPaths = (
220+
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
220221
);
221222
name = "[CP] Embed Pods Frameworks";
222223
outputFileListPaths = (
@@ -251,6 +252,7 @@
251252
};
252253
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
253254
isa = PBXShellScriptBuildPhase;
255+
alwaysOutOfDate = 1;
254256
buildActionMask = 2147483647;
255257
files = (
256258
);
@@ -352,7 +354,7 @@
352354
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
353355
GCC_WARN_UNUSED_FUNCTION = YES;
354356
GCC_WARN_UNUSED_VARIABLE = YES;
355-
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
357+
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
356358
MTL_ENABLE_DEBUG_INFO = NO;
357359
SDKROOT = iphoneos;
358360
SUPPORTED_PLATFORMS = iphoneos;
@@ -582,7 +584,7 @@
582584
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
583585
GCC_WARN_UNUSED_FUNCTION = YES;
584586
GCC_WARN_UNUSED_VARIABLE = YES;
585-
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
587+
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
586588
MTL_ENABLE_DEBUG_INFO = YES;
587589
ONLY_ACTIVE_ARCH = YES;
588590
SDKROOT = iphoneos;
@@ -654,7 +656,7 @@
654656
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
655657
GCC_WARN_UNUSED_FUNCTION = YES;
656658
GCC_WARN_UNUSED_VARIABLE = YES;
657-
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
659+
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
658660
MTL_ENABLE_DEBUG_INFO = NO;
659661
SDKROOT = iphoneos;
660662
SUPPORTED_PLATFORMS = iphoneos;

ios/Runner/Info.plist

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,9 @@
4646
<false/>
4747
<key>CADisableMinimumFrameDurationOnPhone</key>
4848
<true/>
49+
<key>UIApplicationSupportsIndirectInputEvents</key>
50+
<true/>
51+
<key>FLTEnableImpeller</key>
52+
<true/>
4953
</dict>
5054
</plist>

lib/data/interceptor/auth_interceptor.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ class AuthInterceptor extends InterceptorsWrapper {
4242
}
4343

4444
_TokenRefreshStatus _tokenRefreshState = _TokenRefreshStatus.none;
45-
DioError? _tokenRefreshDioError;
45+
DioException? _tokenRefreshDioException;
4646

4747
@override
48-
Future onError(DioError err, ErrorInterceptorHandler handler) async {
48+
Future onError(DioException err, ErrorInterceptorHandler handler) async {
4949
final requestOptions = err.requestOptions;
5050

5151
// If it is not an authenticated path or it is
@@ -59,7 +59,7 @@ class AuthInterceptor extends InterceptorsWrapper {
5959
handler.reject(err);
6060
return;
6161
} else if (_tokenRefreshState.hasFailed) {
62-
handler.reject(_tokenRefreshDioError!);
62+
handler.reject(_tokenRefreshDioException!);
6363
return;
6464
}
6565

@@ -83,9 +83,9 @@ class AuthInterceptor extends InterceptorsWrapper {
8383
} on ResponseError {
8484
_tokenRefreshState = _TokenRefreshStatus.expired;
8585
await _clearUserSessionAndNotifyCallback();
86-
} on DioError catch (e) {
86+
} on DioException catch (e) {
8787
_tokenRefreshState = _TokenRefreshStatus.failed;
88-
_tokenRefreshDioError = e;
88+
_tokenRefreshDioException = e;
8989
handler.reject(e);
9090
}
9191
}
@@ -125,7 +125,7 @@ class AuthInterceptor extends InterceptorsWrapper {
125125
}
126126

127127
return TokensResponse.fromJson(response['data']).getEntity();
128-
} on DioError catch (e) {
128+
} on DioException catch (e) {
129129
if (e.response?.statusCode == 401) {
130130
throw const ResponseError.unauthorized();
131131
}

lib/data/model/auth/auth_tokens.freezed.dart

Lines changed: 0 additions & 199 deletions
This file was deleted.

0 commit comments

Comments
 (0)