decodeBottomNavigationBarLandscapeLayout static method
Decodes the value
to a BottomNavigationBarLandscapeLayout. Supported values are:
centered
linear
spread
Implementation
static BottomNavigationBarLandscapeLayout?
decodeBottomNavigationBarLandscapeLayout(
dynamic value, {
bool validate = true,
}) {
BottomNavigationBarLandscapeLayout? result;
if (value is BottomNavigationBarLandscapeLayout) {
result = value;
} else {
_checkSupported(
'BottomNavigationBarLandscapeLayout',
[
'centered',
'linear',
'spread',
],
value,
);
if (value != null) {
assert(SchemaValidator.validate(
schemaId: '$_baseSchemaUrl/bottom_navigation_bar_landscape_layout',
value: value,
validate: validate,
));
switch (value) {
case 'centered':
result = BottomNavigationBarLandscapeLayout.centered;
break;
case 'linear':
result = BottomNavigationBarLandscapeLayout.linear;
break;
case 'spread':
result = BottomNavigationBarLandscapeLayout.spread;
break;
}
}
}
return result;
}