[camera] Make Optional.of constructor const (#11247) Resolves old TODO from 2023 ( https://github.com/flutter/packages/commit/6e09f5b0d26f77bf70ab27d6ab4c7f8b46968c34 committed by @camsim99 ) by making the `Optional.of` constructor `const` and removing the obsolete runtime `ArgumentError.checkNotNull` guard that was only needed during Dart 2's mixed-mode (unsound null safety) era. Mixed-mode execution was removed in Dart 3.0, so this is dead code. Not a breaking change. Note that the entire `Optional<T>` class (and surrounding `CameraController`) is copy-pasted across 4 files in the camera packages. Would you prefer to move `Optional<T>` into `camera_platform_interface` to share it, or replace it entirely e.g. with a private sentinel pattern in `copyWith` (as the Flutter framework does for `ThemeData`)? ## Pre-Review Checklist
This repo is a companion repo to the main flutter repo. It contains the source code for Flutter's first-party packages (i.e., packages developed by the core Flutter team). Check the packages directory to see all packages.
These packages are also available on pub.
Please file any issues, bugs, or feature requests in the main flutter repo. Issues pertaining to this repository are labeled “package”.
If you wish to contribute a new package to the Flutter ecosystem, please see the documentation for developing packages. You can store your package source code in any GitHub repository (the present repo is only intended for packages developed by the core Flutter team). Once your package is ready you can publish to the pub repository.
If you wish to contribute a change to any of the existing packages in this repo, please review our contribution guide, and send a pull request.
These are the packages hosted in this repository: