Commit 7374fbfe by tanghuan

ios手势测试

1 parent 5171c860
......@@ -16,7 +16,7 @@ class LinkPage extends StatelessWidget {
final String? url = extraData?['url'];
final String? title = extraData?['title'];
if(Platform.isIOS) {
if (Platform.isIOS) {
// 初始化 iOS 边缘滑动监听
IosEdgeSwipeDetector.init();
......@@ -51,17 +51,18 @@ class LinkPage extends StatelessWidget {
: const Center(child: CircularProgressIndicator(color: Color(0xFF7691fa))),
);
// 为所有平台添加PopScope支持
// return PopScope(
// canPop: false,
// onPopInvokedWithResult: (didPop, result) async {
// // if (didPop) return;
// await ctx.read<LinkCubit>().handleBack(ctx);
// },
// child: scaffold,
// );
if (Platform.isIOS) {
return scaffold;
}
return scaffold;
return PopScope(
canPop: false,
onPopInvokedWithResult: (didPop, result) async {
// if (didPop) return;
await ctx.read<LinkCubit>().handleBack(ctx);
},
child: scaffold,
);
},
listener: (context, state) {},
),
......
......@@ -117,6 +117,10 @@ class WebPage extends StatelessWidget {
: const SizedBox.shrink(),
);
if(Platform.isIOS) {
return scaffold;
}
return PopScope(
canPop: false,
onPopInvokedWithResult: (didPop, result) async {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!