Skip to content

Commit

Permalink
Merge pull request #35 from emreesen27/v114
Browse files Browse the repository at this point in the history
v114 is completed
  • Loading branch information
emreesen27 authored Mar 9, 2024
2 parents bd9c5ae + b384739 commit e74236b
Show file tree
Hide file tree
Showing 11 changed files with 106 additions and 79 deletions.
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,62 +1,85 @@
## [1.1.4] - 09.03.2024

* Added support for `useRootNavigator` parameter in the `ProgressDialog` constructor.
* `WillPopScope` usage has been deprecated in favor of `PopScope`
* `SurfaceTintColor` now customizable

## [1.1.3] - 08.02.2023

* Issues 22 and 28 fix.
* Readme edited.
* Removed required fields in update method

## [1.1.2] - 22.01.2023

* Auto hidden added.
* Readme edited.

## [1.1.1] - 21.01.2023

* Readme edited.

## [1.1.0] - 21.01.2023

* Bug Fix.
* Cancel option added.
* Dialog status callback added.

## [1.0.9] - 09.12.2022

* Assets path edited.
* The close function can be used with delay.
* closeWithDelay property added.

## [1.0.8] - 20.05.2022

* Bug Fix.

## [1.0.7] - 01.05.2022

* Bug Fix.

## [1.0.6] - 28.03.2022

* Readme edited.
* Completed type added.

## [1.0.3] - 15.08.2021

* Bug fix

## [1.0.2] - 04.05.2021

* The back button was prevented from closing the dialog.
* Border radius added.

## [1.0.1] - 01.04.2021

* Example edited.
* Readme edited.

## [1.0.0] - 31.03.2021

* Null Safety migrated.
* Bug fix.

## [0.0.5] - 14.02.2021

* New properties added.

## [0.0.4] - 29.01.2021

* Progress Type added.
* Documentation and example codes edited.

## [0.0.3] - 21.01.2021

* Msg added to update method.

## [0.0.2] - 16.01.2021

* Readme and description edited.

## [0.0.1] - 16.01.2021

* Initial build for flutter sn_progress_dialog package.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Progress dialog package for flutter
You must add the library as a dependency to your project.
```yaml
dependencies:
sn_progress_dialog: ^1.1.3
sn_progress_dialog: ^1.1.4
```
You should then run `flutter packages get`
Expand Down
6 changes: 3 additions & 3 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 29
compileSdkVersion 31

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
Expand All @@ -39,8 +39,8 @@ android {
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.snstudio.example"
minSdkVersion 16
targetSdkVersion 29
minSdkVersion flutter.minSdkVersion
targetSdkVersion 31
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
Expand Down
1 change: 1 addition & 0 deletions example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:exported="true"
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
Expand Down
4 changes: 2 additions & 2 deletions example/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath 'com.android.tools.build:gradle:7.4.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand All @@ -26,6 +26,6 @@ subprojects {
project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
2 changes: 1 addition & 1 deletion example/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
68 changes: 34 additions & 34 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ packages:
dependency: transitive
description:
name: async
sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0
sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
url: "https://pub.dev"
source: hosted
version: "2.10.0"
version: "2.11.0"
boolean_selector:
dependency: transitive
description:
Expand All @@ -21,10 +21,10 @@ packages:
dependency: transitive
description:
name: characters
sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c
sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
url: "https://pub.dev"
source: hosted
version: "1.2.1"
version: "1.3.0"
clock:
dependency: transitive
description:
Expand All @@ -37,18 +37,18 @@ packages:
dependency: transitive
description:
name: collection
sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
url: "https://pub.dev"
source: hosted
version: "1.17.0"
version: "1.18.0"
cupertino_icons:
dependency: "direct main"
description:
name: cupertino_icons
sha256: e35129dc44c9118cee2a5603506d823bab99c68393879edb440e0090d07586be
sha256: d57953e10f9f8327ce64a508a355f0b1ec902193f66288e8cb5070e7c47eeb2d
url: "https://pub.dev"
source: hosted
version: "1.0.5"
version: "1.0.6"
fake_async:
dependency: transitive
description:
Expand All @@ -67,46 +67,38 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
js:
dependency: transitive
description:
name: js
sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7"
url: "https://pub.dev"
source: hosted
version: "0.6.5"
matcher:
dependency: transitive
description:
name: matcher
sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72"
sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e"
url: "https://pub.dev"
source: hosted
version: "0.12.13"
version: "0.12.16"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41"
url: "https://pub.dev"
source: hosted
version: "0.2.0"
version: "0.5.0"
meta:
dependency: transitive
description:
name: meta
sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42"
sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
url: "https://pub.dev"
source: hosted
version: "1.8.0"
version: "1.10.0"
path:
dependency: transitive
description:
name: path
sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
url: "https://pub.dev"
source: hosted
version: "1.8.2"
version: "1.8.3"
sky_engine:
dependency: transitive
description: flutter
Expand All @@ -118,31 +110,31 @@ packages:
path: ".."
relative: true
source: path
version: "1.1.3"
version: "1.1.4"
source_span:
dependency: transitive
description:
name: source_span
sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
url: "https://pub.dev"
source: hosted
version: "1.9.1"
version: "1.10.0"
stack_trace:
dependency: transitive
description:
name: stack_trace
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
url: "https://pub.dev"
source: hosted
version: "1.11.0"
version: "1.11.1"
stream_channel:
dependency: transitive
description:
name: stream_channel
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
url: "https://pub.dev"
source: hosted
version: "2.1.1"
version: "2.1.2"
string_scanner:
dependency: transitive
description:
Expand All @@ -163,10 +155,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
url: "https://pub.dev"
source: hosted
version: "0.4.16"
version: "0.6.1"
vector_math:
dependency: transitive
description:
Expand All @@ -175,6 +167,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.4"
web:
dependency: transitive
description:
name: web
sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152
url: "https://pub.dev"
source: hosted
version: "0.3.0"
sdks:
dart: ">=2.18.0 <3.0.0"
dart: ">=3.2.0-194.0.dev <4.0.0"
flutter: ">=1.17.0"
2 changes: 1 addition & 1 deletion example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1

environment:
sdk: ">=2.7.0 <3.0.0"
sdk: ">=2.12.0 <3.0.0"

dependencies:
flutter:
Expand Down
13 changes: 8 additions & 5 deletions lib/progress_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ class ProgressDialog {
ProgressType progressType = ProgressType.normal,
ValuePosition valuePosition = ValuePosition.right,
Color backgroundColor = Colors.white,
Color? surfaceTintColor,
Color barrierColor = Colors.transparent,
Color progressValueColor = Colors.blueAccent,
Color progressBgColor = Colors.blueGrey,
Expand Down Expand Up @@ -157,8 +158,10 @@ class ProgressDialog {
barrierColor: barrierColor,
context: _context,
useRootNavigator: _useRootNavigator,
builder: (context) => WillPopScope(
builder: (context) => PopScope(
canPop: barrierDismissible,
child: AlertDialog(
surfaceTintColor: surfaceTintColor,
backgroundColor: backgroundColor,
elevation: elevation,
shape: RoundedRectangleBorder(
Expand Down Expand Up @@ -188,8 +191,9 @@ class ProgressDialog {
splashColor: Colors.transparent,
onTap: () {
close();
if (cancel.cancelClicked != null)
if (cancel.cancelClicked != null) {
cancel.cancelClicked!();
}
},
child: Image(
width: cancel.cancelImageSize,
Expand Down Expand Up @@ -288,11 +292,10 @@ class ProgressDialog {
},
),
),
onWillPop: () {
if (barrierDismissible) {
onPopInvoked: (didPop) {
if (didPop) {
_dialogIsOpen = false;
}
return Future.value(barrierDismissible);
},
),
);
Expand Down
Loading

0 comments on commit e74236b

Please sign in to comment.