takePic method

dynamic takePic(
  1. dynamic context,
  2. dynamic isSelfie,
  3. dynamic label
)

Implementation

takePic(context, isSelfie, label) {
  myLogAll('takePic');
  //_globalLastFocus = _mFocusNode;
  //_globalLastID = _myDetailIDCurrent;

  //if (isNull(_screenLists[gTakepic])) {
  _screenLists[gTakepic] = {
    0: {gItem: '{"$gType":"$gLabel","$gValue":"$label","$gFontSize":24.0}'},
    1: {gItem: '{"$gType":"$gPhoto","$gValue":$isSelfie}'}
  };
  //}
  WidgetsFlutterBinding.ensureInitialized();
  //late Future<void> initializeControllerFuture;

  availableCameras().then((value) {
    if (isSelfie) {
      _camera = value.last;
    } else {
      _camera = value.first;
    }
    _cameraController = CameraController(
      // Get a specific camera from the list of available cameras.
      _camera,
      // Define the resolution to use.
      ResolutionPreset.medium,
    );

    _initializeControllerFuture = _cameraController.initialize();
    showMyDetail(_screenLists[gTakepic], context, null);
  });
}