Skip to content

Commit

Permalink
1.0.4 done.
Browse files Browse the repository at this point in the history
  • Loading branch information
emreesen27 committed Mar 28, 2022
1 parent 8dcf6b7 commit 819f798
Show file tree
Hide file tree
Showing 15 changed files with 183 additions and 76 deletions.
48 changes: 21 additions & 27 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,33 @@
## [0.0.1] - 16.01.2021
## [1.0.4] - 28.03.2022
* Completed type added.

* Initial build for flutter sn_progress_dialog package.
## [1.0.3] - 15.08.2021
* Bug fix

## [0.0.2] - 16.01.2021
## [1.0.2] - 04.05.2021
* The back button was prevented from closing the dialog.
* Border radius added.

* Readme and description edited.
## [1.0.1] - 01.04.2021
* Example edited.
* Readme edited.

## [0.0.3] - 21.01.2021
## [1.0.0] - 31.03.2021
* Null Safety migrated.
* Bug fix.

* Msg added to update method
## [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.5] - 14.02.2021

* New properties added

## [1.0.0] - 31.03.2021

* Null Safety migrated
* Bug fix.

## [1.0.1] - 01.04.2021

* Example edited.
* Readme edited.

## [1.0.2] - 04.05.2021

* The back button was prevented from closing the dialog.
* Border radius added.
## [0.0.3] - 21.01.2021
* Msg added to update method.

## [1.0.3] - 15.08.2021
## [0.0.2] - 16.01.2021
* Readme and description edited.

* Bug fix
## [0.0.1] - 16.01.2021
* Initial build for flutter sn_progress_dialog package.
Binary file added assets/completed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,23 @@ class Home extends StatelessWidget {
}
}
_completedProgress(context) async {
ProgressDialog pd = ProgressDialog(context: context);
pd.show(
max: 100,
msg: 'File Downloading...',
completed: Completed(),
// Completed values can be customized
// Completed(completedMsg: "Downloading Done !", completedImage: AssetImage("assets/completed.png"), closedDelay: 2500,),
progressBgColor: Colors.transparent,
);
for (int i = 0; i <= 100; i++) {
pd.update(value: i);
i++;
await Future.delayed(Duration(milliseconds: 100));
}
}
@override
Widget build(BuildContext context) {
return Scaffold(
Expand All @@ -118,25 +135,35 @@ class Home extends StatelessWidget {
),
),
MaterialButton(
color: Color(0xfff7f7f7),
child: Text('Normal Progress'),
onPressed: () {
_normalProgress(context);
}),
MaterialButton(
color: Color(0xfff7f7f7),
child: Text('Valuable Progress'),
onPressed: () {
_valuableProgress(context);
}),
MaterialButton(
color: Color(0xfff7f7f7),
child: Text('Preparing Progress'),
onPressed: () {
_preparingProgress(context);
}),
MaterialButton(
color: Color(0xfff7f7f7),
child: Text('Custom Progress'),
onPressed: () {
_customProgress(context);
}),
MaterialButton(
color: Color(0xfff7f7f7),
child: Text('Completed Progress'),
onPressed: () {
_customProgress(context);
}),
],
),
),
Expand Down
2 changes: 1 addition & 1 deletion example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<application
android:name="io.flutter.app.FlutterApplication"
android:name="${applicationName}"
android:label="example"
android:icon="@mipmap/ic_launcher">
<activity
Expand Down
2 changes: 1 addition & 1 deletion example/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
buildscript {
ext.kotlin_version = '1.3.50'
ext.kotlin_version = '1.5.20'
repositories {
google()
jcenter()
Expand Down
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-5.6.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip
Binary file added example/assets/completed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,23 @@ class Home extends StatelessWidget {
}
}

_completedProgress(context) async {
ProgressDialog pd = ProgressDialog(context: context);
pd.show(
max: 100,
msg: 'File Downloading...',
completed: Completed(),
// Completed values can be customized
// Completed(completedMsg: "Downloading Done !", completedImage: AssetImage("assets/completed.png"), closedDelay: 2500,),
progressBgColor: Colors.transparent,
);
for (int i = 0; i <= 100; i++) {
pd.update(value: i);
i++;
await Future.delayed(Duration(milliseconds: 100));
}
}

@override
Widget build(BuildContext context) {
return Scaffold(
Expand Down Expand Up @@ -138,6 +155,12 @@ class Home extends StatelessWidget {
onPressed: () {
_customProgress(context);
}),
MaterialButton(
color: Color(0xfff7f7f7),
child: Text('Completed Progress'),
onPressed: () {
_completedProgress(context);
}),
],
),
),
Expand Down
27 changes: 17 additions & 10 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.5.0"
version: "2.8.2"
boolean_selector:
dependency: transitive
description:
Expand All @@ -21,14 +21,14 @@ packages:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
version: "1.2.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
version: "1.3.1"
clock:
dependency: transitive
description:
Expand Down Expand Up @@ -73,14 +73,21 @@ packages:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.10"
version: "0.12.11"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.3"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
version: "1.7.0"
path:
dependency: transitive
description:
Expand All @@ -99,14 +106,14 @@ packages:
path: ".."
relative: true
source: path
version: "1.0.3"
version: "1.0.4"
source_span:
dependency: transitive
description:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0"
version: "1.8.1"
stack_trace:
dependency: transitive
description:
Expand Down Expand Up @@ -141,7 +148,7 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.19"
version: "0.4.8"
typed_data:
dependency: transitive
description:
Expand All @@ -155,7 +162,7 @@ packages:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
version: "2.1.1"
sdks:
dart: ">=2.12.0 <3.0.0"
dart: ">=2.14.0 <3.0.0"
flutter: ">=1.17.0"
5 changes: 2 additions & 3 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,8 @@ flutter:
uses-material-design: true

# To add assets to your application, add an assets section, like this:
# assets:
# - images/a_dot_burr.jpeg
# - images/a_dot_ham.jpeg
assets:
- completed.png

# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware.
Expand Down
20 changes: 20 additions & 0 deletions lib/completed.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import 'package:flutter/material.dart';

class Completed {
/// [completedMsg] Assign the completed Message
// (Default: "completed")
final String completedMsg;

/// [closedDelay] The time the dialog window will wait to close
// (Default: 1500 ms)
final int closedDelay;

/// [completedImage] The default does not contain any value, if the value is assigned another asset image is created.
final AssetImage? completedImage;

Completed({
this.completedMsg = "Completed !",
this.closedDelay = 1500,
this.completedImage,
});
}
Loading

0 comments on commit 819f798

Please sign in to comment.