Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 1012e72

Browse files
布局
1 parent 203891f commit 1012e72

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

‎lib/flutter_custom_dialog.dart

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ class CustomDialog {
278278
Color _barrierColor = Colors.black.withOpacity(.3);
279279
RouteTransitionsBuilder _transitionsBuilder;
280280
bool _barrierDismissible = true;
281-
Gravity _gravity = Gravity.bottom;
281+
Gravity _gravity = Gravity.center;
282282

283283
CustomDialog({
284284
@required Widget child,
@@ -349,12 +349,18 @@ class CustomDialog {
349349
).animate(animation);
350350
break;
351351
case Gravity.bottom:
352-
default:
353352
custom = Tween<Offset>(
354353
begin: Offset(0.0, 1.0),
355354
end: Offset(0.0, 0.0),
356355
).animate(animation);
357356
break;
357+
case Gravity.center:
358+
default:
359+
custom = Tween<Offset>(
360+
begin: Offset(0.0, 0.0),
361+
end: Offset(0.0, 0.0),
362+
).animate(animation);
363+
break;
358364
}
359365

360366
return SlideTransition(

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /