diff --git a/packages/camera/example/ios/Flutter/app.flx b/packages/camera/example/ios/Flutter/app.flx index 31e281859449..eb4d9f7b2012 100644 Binary files a/packages/camera/example/ios/Flutter/app.flx and b/packages/camera/example/ios/Flutter/app.flx differ diff --git a/packages/camera/example/ios/Runner.xcodeproj/project.pbxproj b/packages/camera/example/ios/Runner.xcodeproj/project.pbxproj index 5a54057fee45..f640fb97f24a 100644 --- a/packages/camera/example/ios/Runner.xcodeproj/project.pbxproj +++ b/packages/camera/example/ios/Runner.xcodeproj/project.pbxproj @@ -161,7 +161,6 @@ 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, FE224661708E6DA2A0F8B952 /* [CP] Embed Pods Frameworks */, - EACF0929FF12B6CC70C2D6BE /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -269,21 +268,6 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; }; - EACF0929FF12B6CC70C2D6BE /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; FE224661708E6DA2A0F8B952 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -291,7 +275,7 @@ ); inputPaths = ( "${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh", - "${PODS_ROOT}/../../../../../../flutter/bin/cache/artifacts/engine/ios-release/Flutter.framework", + "${PODS_ROOT}/../../../../../../flutter/bin/cache/artifacts/engine/ios/Flutter.framework", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( diff --git a/packages/camera/example/lib/main.dart b/packages/camera/example/lib/main.dart index 0009eb0ce635..3f13076614da 100644 --- a/packages/camera/example/lib/main.dart +++ b/packages/camera/example/lib/main.dart @@ -37,7 +37,6 @@ class _CameraExampleHomeState extends State { final GlobalKey _scaffoldKey = new GlobalKey(); - @override Widget build(BuildContext context) { final List controlsChildren = []; @@ -74,9 +73,9 @@ class _CameraExampleHomeState extends State { // Depending on controller state display a message or the camera preview. if (controller == null || !controller.value.isInitialized) { - previewChildren.add(new Text( + previewChildren.add(const Text( 'Tap a camera', - style: new TextStyle( + style: const TextStyle( color: Colors.white, fontSize: 24.0, fontWeight: FontWeight.w900, @@ -102,9 +101,9 @@ class _CameraExampleHomeState extends State { // The main scaffolding of the app. return new Scaffold( - key: _scaffoldKey, - appBar: new AppBar( - title: const Text('Camera example'), + key: _scaffoldKey, + appBar: new AppBar( + title: const Text('Camera example'), ), body: new Column(children: [ new Container( @@ -123,14 +122,13 @@ class _CameraExampleHomeState extends State { decoration: new BoxDecoration( color: Colors.black, border: new Border.all( - color: controller != null && - controller.value.isRecordingVideo - ? Colors.redAccent : Colors.grey, + color: controller != null && controller.value.isRecordingVideo + ? Colors.redAccent + : Colors.grey, width: 3.0, ), ), ), - new Padding( padding: const EdgeInsets.all(5.0), child: new Row( @@ -148,7 +146,7 @@ class _CameraExampleHomeState extends State { mainAxisSize: MainAxisSize.max, children: [ new IconButton( - icon: new Icon(Icons.camera_alt), + icon: const Icon(Icons.camera_alt), color: Colors.blue, onPressed: controller.value.isInitialized && !controller.value.isRecordingVideo @@ -156,7 +154,7 @@ class _CameraExampleHomeState extends State { : null, ), new IconButton( - icon: new Icon(Icons.videocam), + icon: const Icon(Icons.videocam), color: Colors.blue, onPressed: controller.value.isInitialized && !controller.value.isRecordingVideo @@ -164,7 +162,7 @@ class _CameraExampleHomeState extends State { : null, ), new IconButton( - icon: new Icon(Icons.stop), + icon: const Icon(Icons.stop), color: Colors.red, onPressed: controller.value.isInitialized && controller.value.isRecordingVideo @@ -199,7 +197,8 @@ class _CameraExampleHomeState extends State { String timestamp() => new DateTime.now().millisecondsSinceEpoch.toString(); void showInSnackBar(String message) { - _scaffoldKey.currentState.showSnackBar(new SnackBar(content: new Text(message))); + _scaffoldKey.currentState + .showSnackBar(new SnackBar(content: new Text(message))); } void onNewCameraSelected(CameraDescription cameraDescription) async { @@ -211,7 +210,7 @@ class _CameraExampleHomeState extends State { // If the controller is updated then update the UI. controller.addListener(() { if (mounted) setState(() {}); - if(controller.value.hasError) { + if (controller.value.hasError) { showInSnackBar('Camera error ${controller.value.errorDescription}'); } });