use cupertino modal popups

This commit is contained in:
shilangyu 2020-09-21 20:18:57 +02:00
parent 5409cde5d0
commit 910e214f48
2 changed files with 4 additions and 4 deletions

View File

@ -62,9 +62,9 @@ class FullPostPage extends HookWidget {
sharePost() => Share.text('Share post', post.apId, 'text/plain');
comment() async {
final newComment = await showDialog<CommentView>(
final newComment = await showCupertinoModalPopup<CommentView>(
context: context,
child: WriteComment.toPost(post),
builder: (_) => WriteComment.toPost(post),
);
if (newComment != null) {
newComments.value = [...newComments.value, newComment];

View File

@ -170,9 +170,9 @@ class Comment extends HookWidget {
}
reply() async {
final newComment = await showDialog<CommentView>(
final newComment = await showCupertinoModalPopup<CommentView>(
context: context,
child: WriteComment.toComment(comment),
builder: (_) => WriteComment.toComment(comment),
);
if (newComment != null) {
newReplies.value = [...newReplies.value, CommentTree(newComment)];