Repository: flutter
Issue: [Camera] Should warn when attempting to change settings before initializing
Labels: platform-ios,p: camera,package,has reproducible steps,P2,found in release: 2.8,found in release: 2.9,team-ios,triaged-ios

<!-- Thank you for using Flutter!

     If you are looking for support, please check out our documentation
     or consider asking a question on Stack Overflow:
      * https://flutter.dev/
      * https://api.flutter.dev/
      * https://stackoverflow.com/questions/tagged/flutter?sort=frequent

     If you have found a bug or if our documentation doesn't have an answer
     to what you're looking for, then fill out the template below. Please read
     our guide to filing a bug first: https://flutter.dev/docs/resources/bug-reports
-->

## Steps to Reproduce

<!-- Please include full steps to reproduce so that we can reproduce the problem. -->

I am trying to turn off flash mode for front camera on my iOS Device (version 14.8). I set the controller's flash mode to off, then print the controller.value.flashMode in my logs, I see FlashMode.off in my logs. All looks good. But when I try to call takePicture() flash bursts. Here is [related github issue](https://github.com/flutter/flutter/issues/82627) for Android 

1. Execute `flutter run` on the code sample <!-- (see "Code sample" section below) -->
2. Tap on "take pic" 

**Expected results:** <!-- what did you want to see? -->
I want to off flash for my front camera.

**Actual results:** <!-- what did you see? -->
For front camera setFlash camera doesn't work properly and acting like FlashMode.always.

<details>
<summary>Code sample</summary>



```
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:camera/camera.dart';

class PageMain extends StatefulWidget {
  const PageMain({Key? key}) : super(key: key);

  @override
  _PageMainState createState() => _PageMainState();
}

class _PageMainState extends State<PageMain> with WidgetsBindingObserver {
  late CameraController _camera;

  Future _initializeCamera() async {
    List<CameraDescription> cameras = await availableCameras();
    _camera = CameraController(
      cameras[1],
      ResolutionPreset.high,
      imageFormatGroup: ImageFormatGroup.yuv420,
    );
    _camera.setFlashMode(FlashMode.off);
    return _camera.initialize();
  }

  Future<void> takePic() async {
    print("Flash mode: ${_camera.value.flashMode}");
    final img = await _camera.takePicture();
  }

  @override
  Widget build(BuildContext context) {
    return FutureBuilder<void>(
      future: _initializeCamera(),
      builder: (context, snapshot) {
        if (snapshot.connectionState == ConnectionState.done) {
          return Stack(
            children: [
              CameraPreview(_camera),
              Center(
                  child: Column(
                mainAxisSize: MainAxisSize.min,
                children: [
                  ElevatedButton(onPressed: takePic, child: Text("take pic"))
                ],
              )),
            ],
          );
        } else {
          return const Center(child: CircularProgressIndicator());
        }
      },
    );
  }
}

```

</details>

<details>
  <summary>Logs</summary>


```
Analyzing camera_test...                                                

   info • The import of 'package:flutter/cupertino.dart' is unnecessary because all of the used elements are also provided by the import of 'package:flutter/material.dart' • lib/page_main.dart:1:8 • unnecessary_import
   info • Avoid `print` calls in production code • lib/page_main.dart:27:5 • avoid_print
   info • The value of the local variable 'img' isn't used • lib/page_main.dart:28:11 • unused_local_variable

```

```
[✓] Flutter (Channel stable, 2.8.1, on macOS 12.0.1 21A559 darwin-arm, locale tr-TR)
    • Flutter version 2.8.1 at /Users/xx/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 77d935af4d (6 days ago), 2021-12-16 08:37:33 -0800
    • Engine revision 890a5fca2e
    • Dart version 2.15.1

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/xx/Library/Android/sdk
    • Platform android-31, build-tools 31.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2020.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • 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.10+0-b96-7281165)

[✓] IntelliJ IDEA Community Edition (version 2021.2.1)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 59.0.4
    • Dart plugin version 212.5080.8

[✓] VS Code (version 1.58.2)
    • VS Code at /Users/xx/Downloads/Visual Studio Code.app/Contents
    • Flutter extension version 3.25.0

[✓] Connected device (2 available)
    • İphone7 (mobile) • 1e097eda5701578fdc40f65829929a2d2d548de3 • ios            • iOS 14.8 18H17
    • Chrome (web)     • chrome                                   • web-javascript • Google Chrome 96.0.4664.110

• No issues found!

```


</details>


<!--
      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.
-->