File tree Expand file tree Collapse file tree 12 files changed +163
-95
lines changed Expand file tree Collapse file tree 12 files changed +163
-95
lines changed Original file line number Diff line number Diff line change
1
+ name : " Init Flutter"
2
+ description : " Initializes Flutter repo"
3
+ runs :
4
+ using : " composite"
5
+ steps :
6
+ - name : 📚 Checkout repository
7
+ uses : actions/checkout@v4
8
+
9
+ - name : 🐦 Setup Flutter
10
+ uses : subosito/flutter-action@v2
11
+ with :
12
+ flutter-version : ' 3.22.2'
13
+ cache : true
14
+
15
+ - name : 📦 Get dependencies
16
+ shell : bash
17
+ run : flutter pub get
18
+
19
+ - name : ☕️ Set up JDK 17
20
+ uses : actions/setup-java@v1
21
+ with :
22
+ java-version : ' 17'
23
+ distribution : ' temurin'
24
+
25
+ - name : 🔎 Check Flutter environment
26
+ shell : bash
27
+ run : flutter doctor -v
Original file line number Diff line number Diff line change @@ -3,9 +3,12 @@ name: Publish to pub.dev
3
3
on :
4
4
push :
5
5
tags :
6
- - ' [0-9]+.[0-9]+.[0-9]+*'
7
- workflow_dispatch :
6
+ - " [0-9]+.[0-9]+.[0-9]+*"
8
7
9
8
jobs :
10
9
publish :
11
- uses : VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_pub_publish.yml@v1
10
+ permissions :
11
+ id-token : write # Required for authentication using OIDC
12
+ uses : dart-lang/setup-dart/.github/workflows/publish.yml@v1
13
+ # with:
14
+ # working-directory: path/to/package/within/repository
Original file line number Diff line number Diff line change
1
+ name : validate
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ pull_request :
6
+ branches :
7
+ - main
8
+
9
+ jobs :
10
+ analyze :
11
+ runs-on : ubuntu-latest
12
+ steps :
13
+ - name : 📚 Checkout repository
14
+ uses : actions/checkout@v4
15
+
16
+ - name : 📦 Setup Flutter & Deps
17
+ uses : ./.github/actions/setup-flutter
18
+
19
+ - name : 📝 Format
20
+ run : dart format . --set-exit-if-changed
21
+
22
+ - name : 📊 Analyze
23
+ run : flutter analyze
24
+
25
+ - name : 🧪 Test
26
+ run : flutter test --coverage
27
+
28
+ - name : 🔎 Check Publish Warnings
29
+ run : flutter pub publish --dry-run
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change @@ -22,8 +22,8 @@ EXTERNAL SOURCES:
22
22
SPEC CHECKSUMS:
23
23
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
24
24
image_picker_ios: 4a8aadfbb6dc30ad5141a2ce3832af9214a705b5
25
- shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126
25
+ shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
26
26
27
27
PODFILE CHECKSUM: c4c93c5f6502fe2754f48404d3594bf779584011
28
28
29
- COCOAPODS: 1.11.3
29
+ COCOAPODS: 1.15.2
Original file line number Diff line number Diff line change 156
156
97C146E61CF9000F007C117D /* Project object */ = {
157
157
isa = PBXProject;
158
158
attributes = {
159
- LastUpgradeCheck = 1430 ;
159
+ LastUpgradeCheck = 1510 ;
160
160
ORGANIZATIONNAME = "";
161
161
TargetAttributes = {
162
162
97C146ED1CF9000F007C117D = {
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" UTF-8" ?>
2
2
<Scheme
3
- LastUpgradeVersion = " 1430 "
3
+ LastUpgradeVersion = " 1510 "
4
4
version = " 1.3" >
5
5
<BuildAction
6
6
parallelizeBuildables = " YES"
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ class LoggerInterceptor extends InterceptorContract {
10
10
log ('----- Request -----' );
11
11
log (request.toString ());
12
12
log (request.headers.toString ());
13
+ log ('Request type: ${request .runtimeType }' );
13
14
return request;
14
15
}
15
16
@@ -19,6 +20,7 @@ class LoggerInterceptor extends InterceptorContract {
19
20
}) async {
20
21
log ('----- Response -----' );
21
22
log ('Code: ${response .statusCode }' );
23
+ log ('Response type: ${response .runtimeType }' );
22
24
if (response is Response ) {
23
25
log ((response).body);
24
26
}
Original file line number Diff line number Diff line change @@ -11,11 +11,11 @@ dependencies:
11
11
sdk : flutter
12
12
http_interceptor :
13
13
path : ../
14
- image_picker : ^0.8.9
15
- shared_preferences : ^2.2.2
14
+ image_picker : ^1.1.2
15
+ shared_preferences : ^2.2.3
16
16
17
17
dev_dependencies :
18
- flutter_lints : ^3 .0.1
18
+ flutter_lints : ^4 .0.0
19
19
flutter_test :
20
20
sdk : flutter
21
21
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ v2.0.0 and up
39
39
``` dart
40
40
class WeatherApiInterceptor extends InterceptorContract {
41
41
@override
42
- Future <BaseRequest> interceptRequest({required BaseRequest request}) async {
42
+ FutureOr <BaseRequest> interceptRequest({required BaseRequest request}) async {
43
43
final cache = await SharedPreferences.getInstance();
44
44
45
45
final Map<String, String>? headers = Map.from(request.headers);
@@ -55,7 +55,7 @@ class WeatherApiInterceptor extends InterceptorContract {
55
55
}
56
56
57
57
@override
58
- Future <BaseResponse> interceptResponse(
58
+ FutureOr <BaseResponse> interceptResponse(
59
59
{required BaseResponse response}) async =>
60
60
response;
61
61
}
@@ -92,7 +92,7 @@ v2.0.0 and up
92
92
class ExpiredTokenRetryPolicy extends RetryPolicy {
93
93
94
94
@override
95
- Future <bool> shouldAttemptRetryOnResponse(BaseResponse response) async {
95
+ FutureOr <bool> shouldAttemptRetryOnResponse(BaseResponse response) async {
96
96
if (response.statusCode == 401) {
97
97
log("Retrying request...");
98
98
final cache = await SharedPreferences.getInstance();
@@ -111,7 +111,7 @@ If you are using `shouldAttemptRetryOnException` then you will also have to conv
111
111
112
112
``` dart
113
113
@override
114
- Future <bool> shouldAttemptRetryOnException(
114
+ FutureOr <bool> shouldAttemptRetryOnException(
115
115
Exception reason,
116
116
BaseRequest request,
117
117
) async {
You can’t perform that action at this time.
0 commit comments