Case-modddels pattern matching
weather.mapWeather(
sunny: (Sunny sunny) {},
rainy: (Rainy rainy) {},
);
weather.mapOrNullWeather(
rainy: (Rainy rainy) {},
);
weather.maybeMapWeather(
sunny: (Sunny sunny) {},
orElse: () {},
);Super-sealed class
Case-Modddels you can map between
Last updated