Skip to content

Commit

Permalink
2.0.0 fix clip
Browse files Browse the repository at this point in the history
  • Loading branch information
xyhxx committed Jul 13, 2021
1 parent 62d0d28 commit d6e4cb3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 7 additions & 2 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ class _MyAppHomeState extends State<MyAppHome>
context: context,
builder: (_) => ProsteDialog(
type: _tipType,
dialogRadius: 7,
content: Text('this is package preinstall dialog'),
insetPadding: EdgeInsets.all(15),
title: Text('this is package preinstall dialog title'),
Expand Down Expand Up @@ -210,7 +211,11 @@ class _MyAppHomeState extends State<MyAppHome>
content: Text('this is auto close dialog'),
showCancelButton: true,
showConfirmButton: true,
header: Image.asset(assetImg),
dialogRadius: 10,
header: Image.asset(
assetImg,
fit: BoxFit.cover,
),
backgroundColor: Colors.pink,
duration: Duration(seconds: 2),
),
Expand All @@ -229,7 +234,7 @@ class _MyAppHomeState extends State<MyAppHome>
context: context,
builder: (_) => ProsteCustomDialog(
insetPadding: EdgeInsets.symmetric(horizontal: 30),
dialogRadius: 4,
dialogRadius: 8,
header: AnimatedBuilder(
animation: _animationController,
builder: (context, child) {
Expand Down
2 changes: 2 additions & 0 deletions lib/src/dialog_base.dart
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ class ProsteBaseDialog extends StatelessWidget {
children: [
if (widget != null)
Container(
clipBehavior: Clip.antiAlias,
decoration: BoxDecoration(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(dialogRadius),
Expand All @@ -253,6 +254,7 @@ class ProsteBaseDialog extends StatelessWidget {
if (widget != null)
Expanded(
child: Container(
clipBehavior: Clip.antiAlias,
decoration: BoxDecoration(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(dialogRadius),
Expand Down

0 comments on commit d6e4cb3

Please sign in to comment.