buildLanguageItem method
Builds a FastItem
that will be used to build a list item.
Implementation
FastItem<String> buildLanguageItem(String name, String languageCode) {
Widget? flagIcon;
if (kFastSettingsLanguageIcons.containsKey(languageCode)) {
flagIcon = FastShadowLayout(
child: FastImageAsset(
path: kFastSettingsLanguageIcons[languageCode]!,
width: 36,
),
);
}
var descriptor = FastListItemDescriptor(leading: flagIcon);
if (listItemDescriptor != null) {
descriptor = descriptor.merge(listItemDescriptor!);
}
return FastItem(
descriptor: descriptor,
value: languageCode,
labelText: name,
);
}