Skip to content

Commit e74236b

Browse files
authored
Merge pull request #35 from emreesen27/v114
v114 is completed
2 parents bd9c5ae + b384739 commit e74236b

File tree

11 files changed

+106
-79
lines changed

11 files changed

+106
-79
lines changed

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,85 @@
1+
## [1.1.4] - 09.03.2024
2+
3+
* Added support for `useRootNavigator` parameter in the `ProgressDialog` constructor.
4+
* `WillPopScope` usage has been deprecated in favor of `PopScope`
5+
* `SurfaceTintColor` now customizable
6+
17
## [1.1.3] - 08.02.2023
8+
29
* Issues 22 and 28 fix.
310
* Readme edited.
411
* Removed required fields in update method
512

613
## [1.1.2] - 22.01.2023
14+
715
* Auto hidden added.
816
* Readme edited.
917

1018
## [1.1.1] - 21.01.2023
19+
1120
* Readme edited.
1221

1322
## [1.1.0] - 21.01.2023
23+
1424
* Bug Fix.
1525
* Cancel option added.
1626
* Dialog status callback added.
1727

1828
## [1.0.9] - 09.12.2022
29+
1930
* Assets path edited.
2031
* The close function can be used with delay.
2132
* closeWithDelay property added.
2233

2334
## [1.0.8] - 20.05.2022
35+
2436
* Bug Fix.
2537

2638
## [1.0.7] - 01.05.2022
39+
2740
* Bug Fix.
2841

2942
## [1.0.6] - 28.03.2022
43+
3044
* Readme edited.
3145
* Completed type added.
3246

3347
## [1.0.3] - 15.08.2021
48+
3449
* Bug fix
3550

3651
## [1.0.2] - 04.05.2021
52+
3753
* The back button was prevented from closing the dialog.
3854
* Border radius added.
3955

4056
## [1.0.1] - 01.04.2021
57+
4158
* Example edited.
4259
* Readme edited.
4360

4461
## [1.0.0] - 31.03.2021
62+
4563
* Null Safety migrated.
4664
* Bug fix.
4765

4866
## [0.0.5] - 14.02.2021
67+
4968
* New properties added.
5069

5170
## [0.0.4] - 29.01.2021
71+
5272
* Progress Type added.
5373
* Documentation and example codes edited.
5474

5575
## [0.0.3] - 21.01.2021
76+
5677
* Msg added to update method.
5778

5879
## [0.0.2] - 16.01.2021
80+
5981
* Readme and description edited.
6082

6183
## [0.0.1] - 16.01.2021
84+
6285
* Initial build for flutter sn_progress_dialog package.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Progress dialog package for flutter
77
You must add the library as a dependency to your project.
88
```yaml
99
dependencies:
10-
sn_progress_dialog: ^1.1.3
10+
sn_progress_dialog: ^1.1.4
1111
```
1212
1313
You should then run `flutter packages get`

example/android/app/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
2626
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
2727

2828
android {
29-
compileSdkVersion 29
29+
compileSdkVersion 31
3030

3131
sourceSets {
3232
main.java.srcDirs += 'src/main/kotlin'
@@ -39,8 +39,8 @@ android {
3939
defaultConfig {
4040
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
4141
applicationId "com.snstudio.example"
42-
minSdkVersion 16
43-
targetSdkVersion 29
42+
minSdkVersion flutter.minSdkVersion
43+
targetSdkVersion 31
4444
versionCode flutterVersionCode.toInteger()
4545
versionName flutterVersionName
4646
}

example/android/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
android:theme="@style/LaunchTheme"
1616
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
1717
android:hardwareAccelerated="true"
18+
android:exported="true"
1819
android:windowSoftInputMode="adjustResize">
1920
<!-- Specifies an Android theme to apply to this Activity as soon as
2021
the Android process has started. This theme is visible to the user

example/android/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ buildscript {
66
}
77

88
dependencies {
9-
classpath 'com.android.tools.build:gradle:3.5.0'
9+
classpath 'com.android.tools.build:gradle:7.4.1'
1010
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1111
}
1212
}
@@ -26,6 +26,6 @@ subprojects {
2626
project.evaluationDependsOn(':app')
2727
}
2828

29-
task clean(type: Delete) {
29+
tasks.register("clean", Delete) {
3030
delete rootProject.buildDir
3131
}

example/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip

example/pubspec.lock

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ packages:
55
dependency: transitive
66
description:
77
name: async
8-
sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0
8+
sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
99
url: "https://pub.dev"
1010
source: hosted
11-
version: "2.10.0"
11+
version: "2.11.0"
1212
boolean_selector:
1313
dependency: transitive
1414
description:
@@ -21,10 +21,10 @@ packages:
2121
dependency: transitive
2222
description:
2323
name: characters
24-
sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c
24+
sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
2525
url: "https://pub.dev"
2626
source: hosted
27-
version: "1.2.1"
27+
version: "1.3.0"
2828
clock:
2929
dependency: transitive
3030
description:
@@ -37,18 +37,18 @@ packages:
3737
dependency: transitive
3838
description:
3939
name: collection
40-
sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0
40+
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
4141
url: "https://pub.dev"
4242
source: hosted
43-
version: "1.17.0"
43+
version: "1.18.0"
4444
cupertino_icons:
4545
dependency: "direct main"
4646
description:
4747
name: cupertino_icons
48-
sha256: e35129dc44c9118cee2a5603506d823bab99c68393879edb440e0090d07586be
48+
sha256: d57953e10f9f8327ce64a508a355f0b1ec902193f66288e8cb5070e7c47eeb2d
4949
url: "https://pub.dev"
5050
source: hosted
51-
version: "1.0.5"
51+
version: "1.0.6"
5252
fake_async:
5353
dependency: transitive
5454
description:
@@ -67,46 +67,38 @@ packages:
6767
description: flutter
6868
source: sdk
6969
version: "0.0.0"
70-
js:
71-
dependency: transitive
72-
description:
73-
name: js
74-
sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7"
75-
url: "https://pub.dev"
76-
source: hosted
77-
version: "0.6.5"
7870
matcher:
7971
dependency: transitive
8072
description:
8173
name: matcher
82-
sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72"
74+
sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e"
8375
url: "https://pub.dev"
8476
source: hosted
85-
version: "0.12.13"
77+
version: "0.12.16"
8678
material_color_utilities:
8779
dependency: transitive
8880
description:
8981
name: material_color_utilities
90-
sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
82+
sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41"
9183
url: "https://pub.dev"
9284
source: hosted
93-
version: "0.2.0"
85+
version: "0.5.0"
9486
meta:
9587
dependency: transitive
9688
description:
9789
name: meta
98-
sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42"
90+
sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
9991
url: "https://pub.dev"
10092
source: hosted
101-
version: "1.8.0"
93+
version: "1.10.0"
10294
path:
10395
dependency: transitive
10496
description:
10597
name: path
106-
sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b
98+
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
10799
url: "https://pub.dev"
108100
source: hosted
109-
version: "1.8.2"
101+
version: "1.8.3"
110102
sky_engine:
111103
dependency: transitive
112104
description: flutter
@@ -118,31 +110,31 @@ packages:
118110
path: ".."
119111
relative: true
120112
source: path
121-
version: "1.1.3"
113+
version: "1.1.4"
122114
source_span:
123115
dependency: transitive
124116
description:
125117
name: source_span
126-
sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
118+
sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
127119
url: "https://pub.dev"
128120
source: hosted
129-
version: "1.9.1"
121+
version: "1.10.0"
130122
stack_trace:
131123
dependency: transitive
132124
description:
133125
name: stack_trace
134-
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
126+
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
135127
url: "https://pub.dev"
136128
source: hosted
137-
version: "1.11.0"
129+
version: "1.11.1"
138130
stream_channel:
139131
dependency: transitive
140132
description:
141133
name: stream_channel
142-
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
134+
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
143135
url: "https://pub.dev"
144136
source: hosted
145-
version: "2.1.1"
137+
version: "2.1.2"
146138
string_scanner:
147139
dependency: transitive
148140
description:
@@ -163,10 +155,10 @@ packages:
163155
dependency: transitive
164156
description:
165157
name: test_api
166-
sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206
158+
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
167159
url: "https://pub.dev"
168160
source: hosted
169-
version: "0.4.16"
161+
version: "0.6.1"
170162
vector_math:
171163
dependency: transitive
172164
description:
@@ -175,6 +167,14 @@ packages:
175167
url: "https://pub.dev"
176168
source: hosted
177169
version: "2.1.4"
170+
web:
171+
dependency: transitive
172+
description:
173+
name: web
174+
sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152
175+
url: "https://pub.dev"
176+
source: hosted
177+
version: "0.3.0"
178178
sdks:
179-
dart: ">=2.18.0 <3.0.0"
179+
dart: ">=3.2.0-194.0.dev <4.0.0"
180180
flutter: ">=1.17.0"

example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
1818
version: 1.0.0+1
1919

2020
environment:
21-
sdk: ">=2.7.0 <3.0.0"
21+
sdk: ">=2.12.0 <3.0.0"
2222

2323
dependencies:
2424
flutter:

lib/progress_dialog.dart

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ class ProgressDialog {
130130
ProgressType progressType = ProgressType.normal,
131131
ValuePosition valuePosition = ValuePosition.right,
132132
Color backgroundColor = Colors.white,
133+
Color? surfaceTintColor,
133134
Color barrierColor = Colors.transparent,
134135
Color progressValueColor = Colors.blueAccent,
135136
Color progressBgColor = Colors.blueGrey,
@@ -157,8 +158,10 @@ class ProgressDialog {
157158
barrierColor: barrierColor,
158159
context: _context,
159160
useRootNavigator: _useRootNavigator,
160-
builder: (context) => WillPopScope(
161+
builder: (context) => PopScope(
162+
canPop: barrierDismissible,
161163
child: AlertDialog(
164+
surfaceTintColor: surfaceTintColor,
162165
backgroundColor: backgroundColor,
163166
elevation: elevation,
164167
shape: RoundedRectangleBorder(
@@ -188,8 +191,9 @@ class ProgressDialog {
188191
splashColor: Colors.transparent,
189192
onTap: () {
190193
close();
191-
if (cancel.cancelClicked != null)
194+
if (cancel.cancelClicked != null) {
192195
cancel.cancelClicked!();
196+
}
193197
},
194198
child: Image(
195199
width: cancel.cancelImageSize,
@@ -288,11 +292,10 @@ class ProgressDialog {
288292
},
289293
),
290294
),
291-
onWillPop: () {
292-
if (barrierDismissible) {
295+
onPopInvoked: (didPop) {
296+
if (didPop) {
293297
_dialogIsOpen = false;
294298
}
295-
return Future.value(barrierDismissible);
296299
},
297300
),
298301
);

0 commit comments

Comments
 (0)