flcShowResolutionMenu function

void flcShowResolutionMenu({
  1. required FlcUi ui,
  2. required Fw<ResolutionPresetEnm> resolution,
})

Implementation

void flcShowResolutionMenu({
  required FlcUi ui,
  required Fw<ResolutionPresetEnm> resolution,
}) {
  ui.showBottomSheet(
    (popper) => flcFrr(
      () {
        final groupValue = resolution();
        return flcBottomMenu([
          ...ResolutionPresetEnm.values.map((r) {
            return RadioListTile(
              value: r,
              groupValue: groupValue,
              onChanged: (value) {
                if (value != null) {
                  resolution.value = value;
                }
              },
              title: r.label.txt,
            );
          }),
        ]);
      },
    ),
  );
}