From 910e214f488a5ee9011a1806160ac207ba844da6 Mon Sep 17 00:00:00 2001 From: shilangyu Date: Mon, 21 Sep 2020 20:18:57 +0200 Subject: [PATCH] use cupertino modal popups --- lib/pages/full_post.dart | 4 ++-- lib/widgets/comment.dart | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/pages/full_post.dart b/lib/pages/full_post.dart index ab5857b..03a4ff0 100644 --- a/lib/pages/full_post.dart +++ b/lib/pages/full_post.dart @@ -62,9 +62,9 @@ class FullPostPage extends HookWidget { sharePost() => Share.text('Share post', post.apId, 'text/plain'); comment() async { - final newComment = await showDialog( + final newComment = await showCupertinoModalPopup( context: context, - child: WriteComment.toPost(post), + builder: (_) => WriteComment.toPost(post), ); if (newComment != null) { newComments.value = [...newComments.value, newComment]; diff --git a/lib/widgets/comment.dart b/lib/widgets/comment.dart index c52f7c8..1470d58 100644 --- a/lib/widgets/comment.dart +++ b/lib/widgets/comment.dart @@ -170,9 +170,9 @@ class Comment extends HookWidget { } reply() async { - final newComment = await showDialog( + final newComment = await showCupertinoModalPopup( context: context, - child: WriteComment.toComment(comment), + builder: (_) => WriteComment.toComment(comment), ); if (newComment != null) { newReplies.value = [...newReplies.value, CommentTree(newComment)];