🐛 Replace the push with go to view posts in creator centre in order to fix #172
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
@@ -56,7 +57,10 @@ class PostDetailScreen extends HookConsumerWidget {
|
||||
|
||||
return AppScaffold(
|
||||
isNoBackground: false,
|
||||
appBar: AppBar(title: const Text('Post')),
|
||||
appBar: AppBar(
|
||||
leading: const PageBackButton(),
|
||||
title: Text('postDetail').tr(),
|
||||
),
|
||||
body: postState.when(
|
||||
data: (post) {
|
||||
return Stack(
|
||||
|
@@ -235,7 +235,11 @@ class PageBackButton extends StatelessWidget {
|
||||
return IconButton(
|
||||
onPressed: () {
|
||||
onWillPop?.call();
|
||||
context.pop();
|
||||
if (context.canPop()) {
|
||||
context.pop();
|
||||
} else {
|
||||
context.go('/');
|
||||
}
|
||||
},
|
||||
icon: Icon(
|
||||
color: color,
|
||||
|
Reference in New Issue
Block a user