decodeScrollBehavior static method
Decodes the given value
to an ScrollBehavior. This expects the given
value
to follow the structure below:
{
}
Implementation
static ScrollBehavior? decodeScrollBehavior(
dynamic value, {
bool validate = true,
}) {
ScrollBehavior? result;
if (value is ScrollBehavior) {
result = value;
} else if (value != null) {
assert(SchemaValidator.validate(
schemaId: '$_baseSchemaUrl/scroll_behavior',
value: value,
validate: validate,
));
result = ScrollBehavior();
}
return result;
}