fallback property

  1. @override
dynamic fallback
override

An alternate UI to render in place of the actual UI if it has not finished loading. Any valid React node is accepted, though in practice, a fallback is a lightweight placeholder view, such as a loading spinner or skeleton. Suspense will automatically switch to fallback when children suspends, and back to children when the data is ready. If fallback suspends while rendering, it will activate the closest parent Suspense boundary.

Implementation

@override
dynamic get fallback =>
    (props[_$key__fallback__SuspensePropsMixin] ?? null) as dynamic;
  1. @override
void fallback=(dynamic value)
override

An alternate UI to render in place of the actual UI if it has not finished loading. Any valid React node is accepted, though in practice, a fallback is a lightweight placeholder view, such as a loading spinner or skeleton. Suspense will automatically switch to fallback when children suspends, and back to children when the data is ready. If fallback suspends while rendering, it will activate the closest parent Suspense boundary.

Implementation

@override
set fallback(dynamic value) =>
    props[_$key__fallback__SuspensePropsMixin] = value;