schulcloud-flutter
schulcloud-flutter copied to clipboard
Simplify tab(-controller) creation
A few lines above we check if initialTabIndex < 0
. Can't we directly after we do the indexOf
just clamp
it? Like initialTabIndex = initialTabIndex.clamp(0, tabs.length - 1)
Originally posted by @marcelgarus in https://github.com/schul-cloud/schulcloud-flutter/pull/301