不少App好比微信、IT之家等都支持从屏幕左侧向右滑动,来返回上一个页面。ios
不少iOS上的App也都支持。微信
那么这个神奇的手势滑动是怎么实现的呢?less
其实很是简单,只须要添加一句话便可。ide
platform: TargetPlatform.iOS,
目前测试安卓设备上可用,ios设备理论上也能够。测试
完整代码:ui
void main() { runApp(MyApp()); } class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return new MaterialApp( home: new HomePage(), theme: new ThemeData( platform: TargetPlatform.iOS, primaryColor: Colors.orange, accentColor: Colors.orangeAccent), ); } }