Repository: flutter
Issue: [iPad]camera preview is cropped when compared with native camera
Labels: platform-ios,a: tablet,p: camera,package,P2,team-ios,triaged-ios

Hello,

I am programming an app for iOS and Android in Flutter that must use the camera to automatically capture images every second. I have to create a screen in portarit orientation that shows the preview of what I want to photograph and that preview  must fit the width of the screen. However, I am unable to get it to work correctly on iOS as the CameraPreview doesn't display all the visual information that it should. On Android, however, everything looks fine. Below I attach two images that show the problem. On the left is the image that I get in flutter on iOS, while on the right is the one that should appear.

I have done the tests in an iPad mini 4.

Thanks

## Steps to Reproduce

<!-- Please include full steps to reproduce so that we can reproduce the problem. -->

1. Execute `flutter run` on the code sample on iPad mini 


**Actual results (left) ** vs **Expected result (right)** <!-- what did you want to see? -->
![comparison](https://user-images.githubusercontent.com/65234949/170474145-45c103e0-d289-46ff-85e4-c8975a17243d.png)

 <!-- what did you see? -->

<details>
<summary>Code sample</summary>

```dart
import 'package:camera/camera.dart';
import 'package:flutter/material.dart';

List<CameraDescription> cameras = [];

Future<void> main() async {
  // Fetch the available cameras before initializing the app.
  try {
    WidgetsFlutterBinding.ensureInitialized();
    cameras = await availableCameras();
  } on CameraException catch (e) {
    print('Error in fetching the cameras: $e');
  }
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      debugShowCheckedModeBanner: false,
      home: TakePictureScreenG(
        camera: cameras.first,
      ),
    );
  }
}

class TakePictureScreenG extends StatefulWidget {
  const TakePictureScreenG({Key? key, required this.camera}) : super(key: key);

  final CameraDescription camera;

  @override
  TakePictureScreenGState createState() => TakePictureScreenGState();
}

class TakePictureScreenGState extends State<TakePictureScreenG> {
  late CameraController _controller;
  late Future<void> _initializeControllerFuture;

  final num resWPreset = 2160;
  final num resHPreset = 3840;
  final ResolutionPreset resolutionPreset = ResolutionPreset.ultraHigh;

  @override
  void initState() {
    super.initState();
    _controller = CameraController(widget.camera, resolutionPreset);
    _initializeControllerFuture = _controller.initialize();
  }

  @override
  void dispose() {
    _controller.dispose();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Stack(children: [
        _buildCamera(),
      ]),
    );
  }

  Widget _buildCamera() {
    return FutureBuilder<void>(
      future: _initializeControllerFuture,
      builder: (context, snapshot) {
        if (snapshot.connectionState != ConnectionState.done) {
          return Center(
            child: Column(
              mainAxisAlignment: MainAxisAlignment.spaceAround,
              children: [
                Spacer(),
                Text("LOADING CAMERA"),
                CircularProgressIndicator(),
                Spacer()
              ],
            ),
          );
        }

        var sizeWScreen = MediaQuery.of(context).size.width;

        return Container(
          width: sizeWScreen,
          height: resHPreset * sizeWScreen / resWPreset,
          child: CameraPreview(_controller),
        );
      },
    );
  }
}
```


</details>


<!-- Finally, paste the output of running `flutter doctor -v` here. -->

```
[√] Flutter (Channel stable, 3.0.1, on Microsoft Windows [Versi¢n 10.0.19044.1706], locale es-ES)
    • Flutter version 3.0.1 at D:\android-sdk-flutter\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision fb57da5f94 (7 days ago), 2022-05-19 15:50:29 -0700
    • Engine revision caaafc5604
    • Dart version 2.17.1
    • DevTools version 2.12.2

[√] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
    • Android SDK at D:\android-sdk-as
    • Platform android-32, build-tools 32.0.0
    • ANDROID_HOME = D:\android-sdk-as
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

 
[☠] Visual Studio - develop for Windows (the doctor check crashed)
    X Due to an error, the doctor check did not complete.   

[√] Android Studio (version 2021.2)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)

[√] VS Code (version 1.62.1)
    • VS Code at C:\Users\angel\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension can be installed from:
       https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
```

```
```

</details>


![comparison](https://user-images.githubusercontent.com/65234949/170474094-6c5286be-999e-4bba-8d0f-3c242ee4c4f7.png)


<!--
      Consider also attaching screenshots and/or videos to better
      illustrate the issue.

      You can upload them directly on GitHub.
      Beware that video file size is limited to 10MB.
--