decode static method

NapaIndexedStack? decode(
  1. dynamic data
)
override

Deserialize a json compatible object into a NapaWidget or null.

Implementation

static NapaIndexedStack? decode(dynamic data) {
  if (data == null) {
    return null;
  }

  return NapaIndexedStack(
    index: data['index'],
    alignment: decodeAlignmentGeometry(data['alignment'])!,
    sizing: decodeStackFit(data['sizing']),
    children: decodeChildren(data['children']) ?? [],
  );
}