mirror of
https://github.com/Iconica-Development/flutter_nested_categories.git
synced 2025-05-18 23:33:44 +02:00
fix(switch): change switch case to dart 3
This commit is contained in:
commit
98d0844da9
1 changed files with 8 additions and 11 deletions
|
@ -161,17 +161,14 @@ class _CategoryColumnState extends State<_CategoryColumn> {
|
|||
var name = widget.category.name;
|
||||
if (name == null) return null;
|
||||
|
||||
switch (widget.headerStyling?.capitalization) {
|
||||
case CategoryHeaderCapitalization.capitalizeFirstLetter:
|
||||
return name[0].toUpperCase() + name.substring(1);
|
||||
case CategoryHeaderCapitalization.lowercase:
|
||||
return name.toLowerCase();
|
||||
case CategoryHeaderCapitalization.uppercase:
|
||||
return name.toUpperCase();
|
||||
case CategoryHeaderCapitalization.none:
|
||||
default:
|
||||
return name;
|
||||
}
|
||||
return switch (widget.headerStyling?.capitalization) {
|
||||
CategoryHeaderCapitalization.capitalizeFirstLetter =>
|
||||
name[0].toUpperCase() + name.substring(1),
|
||||
CategoryHeaderCapitalization.lowercase => name.toLowerCase(),
|
||||
CategoryHeaderCapitalization.uppercase => name.toUpperCase(),
|
||||
CategoryHeaderCapitalization.none => name,
|
||||
_ => name,
|
||||
};
|
||||
}
|
||||
|
||||
Widget buildCollapsibleHeader(TextStyle styleOfCategory) => InkWell(
|
||||
|
|
Loading…
Reference in a new issue