Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,52 @@
## [2.13.0] - 10/05/2025

**Changes**

- Enable slide animation for bottom and top for bottom and top centered toasts [PR#150](https://github.com/koukibadr/Motion-Toast/pull/150)
- Refactor deprecated color opacity [PR#151](https://github.com/koukibadr/Motion-Toast/pull/151)

## [2.12.1] - 17/03/2025

**Bug Fix**

- Resolve compilation error with `wihValues` when setting opacity value [Issue #134](https://github.com/koukibadr/Motion-Toast/issues/134)

## [2.12.0] - 16/03/2025

**Bug Fix**

- Update toast overlay height to support app usage when the toast is displayed [PR](https://github.com/koukibadr/Motion-Toast/pull/135) [Issue #134](https://github.com/koukibadr/Motion-Toast/issues/134)

**Enhancement**

- Update alignment, MotionToastPosition is refactored to use Alignment object [PR](https://github.com/koukibadr/Motion-Toast/pull/140) [Issue #126](https://github.com/koukibadr/Motion-Toast/issues/126)
- Support for custom alignment values

**Changes**

- Refactor: AnimationTypes values are renamed [PR](https://github.com/koukibadr/Motion-Toast/pull/141)

## [2.11.0] - 07/08/2024

**Enhancement**

- Remove content padding effect on motion toast sidebar widget
- Replace EdgeInsets type with EdgeInsetsGeometry type for wider options (Support of EdgeInsets and EdgeInsetsDirectional) [PR](https://github.com/koukibadr/Motion-Toast/pull/125)
- Update custom motion toast rendering to support width and height constraints for large screens

**Changes**

- Update layoutDirection from LayoutDirection enum to TextDirection dart class

## [2.10.0] - 25/04/2024

**Enhancement**

- Replace `backgroundType` with `opacity` double attribute
- Updated predefined themes colors, themes now have different primary and secondary colors

**Changes**

- Remove motion toast type parameter and replace it with direct theme initialization
- Remove `iconType` parameter
- `MotionToast.delete` marked as deprecated and will be removed in the next version
Expand All @@ -48,15 +63,16 @@
## [2.8.0] - 21/01/2024

- Update motion toast display with Overlay instead of Navigator
- Fix center content issue [Issue #113](https://github.com/koukibadr/Motion-Toast/issues/113)
- Fix center content issue [Issue #113](https://github.com/koukibadr/Motion-Toast/issues/113)

## [2.7.9] - 27/09/2023

- Update package license to MIT license

## [2.7.10] - 10/12/2023

- Add `resources/arrays.dart` file export [Issue link](https://github.com/koukibadr/Motion-Toast/issues/112)
- Add `resources/arrays.dart` file export [Issue link](https://github.com/koukibadr/Motion-Toast/issues/112)

## [2.7.8] - 29/06/2023

- Add dark mode support (special thanks to [kmalyshev](https://github.com/kmalyshev))
Expand Down Expand Up @@ -84,7 +100,6 @@
- Add displayBorder attribute
- Add displaySideBar boolean attribute


## [2.5.4] - 13/11/2022

- Update package readme documentation
Expand Down
118 changes: 21 additions & 97 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,18 @@
# Motion Toast



<p align="center">
<img src="https://github.com/koukibadr/Motion-Toast/blob/main/MOTION%20TOAST.gif?raw=true" width="350"/>
<br>
<b>A well designed toast with animations for all platforms</b>
<b>Support material3 themes</b>
</p>


| ![success_mt.png](https://github.com/koukibadr/Motion-Toast/blob/main/example/success_mt.png?raw=true) | ![success_mt.png](https://github.com/koukibadr/Motion-Toast/blob/main/example/warning_mt.png?raw=true) |
|--|--|
| ![success_mt.png](https://github.com/koukibadr/Motion-Toast/blob/main/example/info_mt.png?raw=true) | ![success_mt.png](https://github.com/koukibadr/Motion-Toast/blob/main/example/error_mt.png?raw=true) |

| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ |
| ![success_mt.png](https://github.com/koukibadr/Motion-Toast/blob/main/example/info_mt.png?raw=true) | ![success_mt.png](https://github.com/koukibadr/Motion-Toast/blob/main/example/error_mt.png?raw=true) |

## Features



- Animated toasts with animated icons
- Support dark and light mode
- Built-in types (Success, Warning, Error, Info, Delete)
Expand All @@ -42,38 +36,28 @@
- Customizable toast padding
- Customizable border display
- Customizable sidebar widget display


## Getting Started



In order to add motion toast to your project add this line to your `pubspec.yaml` file

```yaml
dependencies:
motion_toast: ^2.12.1
motion_toast: ^2.13.0
```

Or you can reference the main repository directly by adding those lines



```yaml
dependencies:
motion_toast:
git: https://github.com/koukibadr/Motion-Toast.git

```



## Attributes




```dart
````dart
/// the text widget used for description message
final Widget description;

Expand Down Expand Up @@ -191,16 +175,11 @@ dependencies:
/// motion toast background opacity
/// by default opacity is set to .9
final double opacity;
```

````

## Implementation



- **Success Motion Toast**


- **Success Motion Toast**

```dart

Expand All @@ -211,11 +190,7 @@ MotionToast.success(

```



- **Warning Motion Toast**


- **Warning Motion Toast**

```dart

Expand All @@ -226,10 +201,7 @@ MotionToast.warning(

```



- **Error Motion Toast**

- **Error Motion Toast**

```dart
MotionToast.error(
Expand All @@ -239,10 +211,7 @@ MotionToast.error(

```


- **Info Motion Toast**


- **Info Motion Toast**

```dart

Expand All @@ -253,18 +222,11 @@ MotionToast.info(

```




- **Custom Motion Toast**


- **Custom Motion Toast**

To create your custom toast just use the default constructor,

**`icon` `description` and `color` are required**


**`icon` `description` and `color` are required**

```dart

Expand All @@ -279,17 +241,11 @@ MotionToast(

```



- **Right-Designed Motion Toast**


- **Right-Designed Motion Toast**

To change the toast layout you need to use `layoutOrientation`,

**`icon` `description`** and **`color`** are required


**`icon` `description`** and **`color`** are required

```dart
MotionToast.success(
Expand All @@ -301,16 +257,10 @@ MotionToast.success(
).show(context);
```



- **Top-displayed Motion Toast**


- **Top-displayed Motion Toast**

To change the display position of the motion toast use `position` attribute



```dart

MotionToast(
Expand All @@ -324,15 +274,11 @@ MotionToast(

```



- **Center-displayed Motion Toast**


- **Center-displayed Motion Toast**

```dart



MotionToast(
icon: Icons.zoom_out,
Expand All @@ -344,10 +290,7 @@ MotionToast(

```


- **Using onClose parameter** (display two successive toasts)


- **Using onClose parameter** (display two successive toasts)

```dart
MotionToast.success(
Expand All @@ -363,11 +306,7 @@ MotionToast.success(

```



- **Two-Colors Motion Toast**


- **Two-Colors Motion Toast**

```dart

Expand All @@ -384,10 +323,8 @@ MotionToast(
).show(context);

```


- **Transparent background motion toast**

- **Transparent background motion toast**

```dart

Expand All @@ -404,11 +341,8 @@ MotionToast(
).show(context);

```


- **Motion toast without sidebar and with border**


- **Motion toast without sidebar and with border**

```dart

Expand All @@ -424,9 +358,7 @@ MotionToast(

```

- **Dismiss the toast from your UI screen**


- **Dismiss the toast from your UI screen**

```dart

Expand All @@ -443,26 +375,18 @@ toast.dismiss();

```


## Contribution



Of course the project is open source, and you can contribute to it [repository link](https://github.com/koukibadr/Motion-Toast)



- If you **found a bug**, open an issue.

- If you **have a feature request**, open an issue.

- If you **want to contribute**, submit a pull request.


## Contributors



<a href = "https://github.com/koukibadr/Motion-Toast/graphs/contributors">

<img src = "https://contrib.rocks/image?repo=koukibadr/Motion-Toast"/>
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: motion_toast
description: 'A beautiful designed toast with animations, contains multiple built in designs and let you design your toast'
version: 2.12.1
version: 2.13.0
homepage: 'https://github.com/koukibadr/Motion-Toast'
funding:
- 'https://www.buymeacoffee.com/koukibadr'
Expand Down