1
0
mirror of https://github.com/flutter/samples.git synced 2026-04-05 19:22:08 +00:00

let add-to-app ios demo page transitions be animated (#603)

This commit is contained in:
xster
2020-11-26 00:23:10 -08:00
committed by GitHub
parent a0d314bf5e
commit 7cab73a075
2 changed files with 2 additions and 2 deletions

View File

@@ -147,7 +147,7 @@ class Contents extends StatelessWidget {
if (showExit) ...[ if (showExit) ...[
SizedBox(height: 16), SizedBox(height: 16),
RaisedButton( RaisedButton(
onPressed: () => SystemNavigator.pop(), onPressed: () => SystemNavigator.pop(animated: true),
child: Text('Exit this screen'), child: Text('Exit this screen'),
), ),
], ],

View File

@@ -44,7 +44,7 @@ class ViewController: UIViewController {
@IBAction func buttonWasTapped(_ sender: Any) { @IBAction func buttonWasTapped(_ sender: Any) {
if let flutterEngine = (UIApplication.shared.delegate as? AppDelegate)?.flutterEngine { if let flutterEngine = (UIApplication.shared.delegate as? AppDelegate)?.flutterEngine {
let flutterViewController = FlutterViewController(engine: flutterEngine, nibName: nil, bundle: nil) let flutterViewController = FlutterViewController(engine: flutterEngine, nibName: nil, bundle: nil)
self.present(flutterViewController, animated: false, completion: nil) self.present(flutterViewController, animated: true, completion: nil)
} }
} }
} }