Skip to content

Commit

Permalink
Updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Marsad committed Aug 9, 2021
1 parent 0a9843a commit 7d4ddda
Show file tree
Hide file tree
Showing 9 changed files with 204 additions and 169 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## 0.0.4+1

```diff
+ dismissOnTouchOutside:
+ ..show()
+ ..dismiss()

```


## 0.0.4

### Added
Expand All @@ -8,6 +18,7 @@
+ cancelPressEvent:
```


## 0.0.3+1

* Fixed content text alignment
Expand Down
76 changes: 53 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
# stylish_dialog

Stylish Alert Dialogs for Flutter.
A collection of stylish animated dialogs like Normal, Progress, Success, Info, Warning, and Error for flutter.

<img src="https://github.com/MarsadMaqsood/StylishDialogFlutter/blob/master/assets/stylish_dialog-screen%20recording.gif" alt="alt text" width="300" height="620">
## Showcase
<img src="https://github.com/MarsadMaqsood/StylishDialogFlutter/blob/master/assets/showcase.gif" width="300" height="620">

## ⭐ Installing

dependencies:
stylish_dialog: ^0.0.4
stylish_dialog: ^0.0.4+1
## ⚡ Import

import 'package:stylish_dialog/stylish_dialog.dart';

## 📙 How To Use
Expand All @@ -22,8 +24,10 @@ Stylish Alert Dialogs for Flutter.
cancelText:
confirmPressEvent:
cancelPressEvent:
dismissOnTouchOutside:

### Prperties

#### Prperties
`context → BuildContext`

`alertType → int`
Expand All @@ -40,8 +44,11 @@ Stylish Alert Dialogs for Flutter.

`cancelPressEvent → void Function ()`


#### Alert Type
`dismissOnTouchOutside → bool`


### Alert Type

StylishDialog.NORMAL
StylishDialog.PROGRESS
StylishDialog.SUCCESS
Expand All @@ -50,33 +57,51 @@ Stylish Alert Dialogs for Flutter.
StylishDialog.ERROR

#### Press Event

confirmPressEvent: (){
}

cancelPressEvent: (){
}

### Example

StylishDialog dialog = StylishDialog(
context: context,
alertType: StylishDialog.NORMAL,
titleText: 'This is title',
contentText: 'This is content text',
);
//show stylish dialog
dialog..show();

//dismiss stylish dialog
dialog..dismiss();

### Simple Dialog

Simple Stylish Dialog with title and content text

StylishDialog(
context: context,
alertType: StylishDialog.NORMAL,
titleText: 'This is title',
contentText: 'This is content text',
);
)..show();

### Progress Dialog

Progress dialog without title and content text

StylishDialog(
context: context,
alertType: StylishDialog.PROGRESS,
titleText: 'This is title',
contentText: 'This is content text',
);
)..show();

Progress dialog with only title

Expand All @@ -85,7 +110,7 @@ Progress dialog with only title
alertType: StylishDialog.PROGRESS,
titleText: 'This is title',
contentText: 'This is content text',
);
)..show();

Progress dialog with title and content text

Expand All @@ -94,23 +119,24 @@ Progress dialog with title and content text
alertType: StylishDialog.PROGRESS,
titleText: 'This is title',
contentText: 'This is content text',
);
)..show();

### Success Dialog

Success dialog without title and content text

StylishDialog(
context: context,
alertType: StylishDialog.SUCCESS,
);
)..show();

Success dialog with only title

StylishDialog(
context: context,
alertType: StylishDialog.SUCCESS,
titleText: 'Wow',
);
)..show();

Success Dialog with title and content text

Expand All @@ -119,15 +145,16 @@ Success Dialog with title and content text
alertType: StylishDialog.SUCCESS,
titleText: 'Wow',
contentText: 'Task completed',
);
)..show();

### Info Dialog

Info Dialog without title and content text

StylishDialog(
context: context,
alertType: StylishDialog.INFO,
),
)..show();


Info Dialog with only title
Expand All @@ -136,7 +163,7 @@ Info Dialog with only title
context: context,
alertType: StylishDialog.INFO,
titleText: 'You know',
),
)..show();

Info Dialog with title and content text

Expand All @@ -145,23 +172,24 @@ Info Dialog with title and content text
alertType: StylishDialog.INFO,
titleText: 'You know',
contentText: 'This is an amazing dialog',
),
)..show();

### Warning Dialog

Warning Dialog without title and content text

StylishDialog(
context: context,
alertType: StylishDialog.WARNING,
);
)..show();

Warning Dialog with only title

StylishDialog(
context: context,
alertType: StylishDialog.WARNING,
titleText: 'Wait',
);
)..show();


Warning Dialog with title and content text
Expand All @@ -171,23 +199,24 @@ Warning Dialog with title and content text
alertType: StylishDialog.WARNING,
titleText: 'Wait',
contentText: 'Are you sure you want to delete',
);
)..show();

### Error Dialog

Error Dialog without title and content text

StylishDialog(
context: context,
alertType: StylishDialog.ERROR,
);
)..show();

Error Dialog with only title

StylishDialog(
context: context,
alertType: StylishDialog.ERROR,
titleText: 'Oops',
);
)..show();

Error Dialog with title and content text

Expand All @@ -196,9 +225,10 @@ Error Dialog with title and content text
alertType: StylishDialog.ERROR,
titleText: 'Oops',
contentText: 'Task Failed',
);
)..show();

### Success Dialog

Success Dialog with click

StylishDialog(
Expand All @@ -211,6 +241,6 @@ Success Dialog with click
//Dismiss stylish dialog
Navigator.of(context).pop();
},
);
)..show();


Loading

0 comments on commit 7d4ddda

Please sign in to comment.