encodeScrollBehavior static method

Map<String, dynamic>? encodeScrollBehavior(
  1. ScrollBehavior? value, {
  2. bool validate = true,
})

Encodes the given value to a JSON compatible Map.

This returns the JSON representation to follow the structure:

{
  "androidOverscrollIndicator": <AndroidOverscrollIndicator>
}

See also:

Implementation

static Map<String, dynamic>? encodeScrollBehavior(
  ScrollBehavior? value, {
  bool validate = true,
}) {
  Map<String, dynamic>? result;

  if (value != null) {
    result = {
      'androidOverscrollIndicator': encodeAndroidOverscrollIndicator(
        value.androidOverscrollIndicator,
      ),
    };
  }

  return result;
}