Commit e7cbb1fd by tanghuan

测试iOS返回的手势操作

1 parent 647c7088
import 'dart:io';
import 'package:appframe/bloc/web_cubit.dart'; import 'package:appframe/bloc/web_cubit.dart';
import 'package:appframe/config/constant.dart'; import 'package:appframe/config/constant.dart';
import 'package:appframe/config/evn_config.dart'; import 'package:appframe/config/evn_config.dart';
...@@ -45,19 +43,7 @@ class WebPage extends StatelessWidget { ...@@ -45,19 +43,7 @@ class WebPage extends StatelessWidget {
), ),
child: BlocConsumer<WebCubit, WebState>( child: BlocConsumer<WebCubit, WebState>(
builder: (ctx, state) { builder: (ctx, state) {
return PopScope( return Scaffold(
canPop: Platform.isIOS,
onPopInvokedWithResult: (didPop, result) {
print("onPopInvokedWithResult--------------------------- $didPop $result");
if (Platform.isIOS) {
if (didPop) {
ctx.read<WebCubit>().handleBack();
}
} else {
ctx.read<WebCubit>().handleBack();
}
},
child: Scaffold(
appBar: _buildAppBar(ctx, state), appBar: _buildAppBar(ctx, state),
endDrawer: _buildDrawer(ctx, state), endDrawer: _buildDrawer(ctx, state),
body: Stack( body: Stack(
...@@ -125,7 +111,6 @@ class WebPage extends StatelessWidget { ...@@ -125,7 +111,6 @@ class WebPage extends StatelessWidget {
], ],
) )
: null, : null,
),
); );
}, },
listener: (context, state) { listener: (context, state) {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!