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
12 changes: 6 additions & 6 deletions .github/workflows/runnable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ on:

jobs:
analyze:
name: Analyze on ${{ matrix.os }}
name: Analyze on ${{ matrix.os }} with flutter ${{ matrix.version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest ]
version: [
'', # Stable
'3.0.0' # Minimum
'3.16.0', # Stable
'3.7.0' # Minimum
]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: 'adopt'
Expand Down Expand Up @@ -49,7 +49,7 @@ jobs:
matrix:
os: [ macos-latest ]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: 'adopt'
Expand All @@ -71,7 +71,7 @@ jobs:
matrix:
os: [ ubuntu-latest ]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: 'adopt'
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Change log

## 3.4.0

Feat:

- Wrapper a `Material` widget when the `OKToast` widget is not wrapped with `Material`.
- The min support of flutter SDK version to 3.7.0.

## 3.3.2+1

- Fix `Theatre` constructor and get rid of `View` for compatibilities. (#103)
Expand Down
11 changes: 10 additions & 1 deletion lib/src/widget/oktoast.dart
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class _OKToastState extends State<OKToast> {
],
);

final Widget w = Directionality(
Widget w = Directionality(
textDirection: widget.textDirection,
child: overlay,
);
Expand All @@ -102,6 +102,15 @@ class _OKToastState extends State<OKToast> {
final OKToastAnimationBuilder animationBuilder =
widget.animationBuilder ?? _defaultBuildAnimation;

final haveMaterialParent = Material.maybeOf(context) != null;

if (!haveMaterialParent) {
w = Material(
color: Colors.transparent,
child: w,
);
}

return ToastTheme(
backgroundColor: widget.backgroundColor,
radius: widget.radius,
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: oktoast
description: A pure flutter toast library, support custom style/widget, easy achieve the same effect with native toasts.
repository: https://github.com/OpenFlutter/flutter_oktoast
version: 3.3.2+1
version: 3.4.0

environment:
sdk: '>=2.17.0 <4.0.0'
flutter: '>=3.0.0'
flutter: '>=3.7.0'

dependencies:
flutter:
Expand Down