altComponentSC<TOptionType, TValue> method

Widget altComponentSC<TOptionType, TValue>(
  1. String selectedOption,
  2. Map<String, Widget> branches, [
  3. Widget? defaultValue
])

Implementation

Widget altComponentSC<TOptionType, TValue>(
  String selectedOption,
  Map<String, Widget> branches, [
  Widget? defaultValue,
]) {
  if (!branches.containsKey(selectedOption)) {
    return defaultValue!;
  }
  return branches[selectedOption]!;
}