fromDynamic static method
Builds the builder from a Map-like dynamic structure. This expects the JSON format to be of the following structure:
{
"dragDevices": <Set<PointerDeviceKind>>,
"overscroll": <bool>,
"physics": <ScrollPhysics>,
"platform": <TargetPlatform>,
"scrollbars": <bool>
}
See also:
ThemeDecoder.decodeScrollPhysics
Implementation
static JsonScrollConfigurationBuilder? fromDynamic(
dynamic map, {
JsonWidgetRegistry? registry,
}) {
JsonScrollConfigurationBuilder? result;
if (map != null) {
result = JsonScrollConfigurationBuilder(
dragDevices: map['dragDevices'],
overscroll: map['overscroll'] == null
? null
: JsonClass.parseBool(map['overscroll']),
physics: ThemeDecoder.decodeScrollPhysics(
map['physics'],
validate: false,
),
scrollbars: map['scrollbars'] == null
? null
: JsonClass.parseBool(map['scrollbars']),
);
}
return result;
}