actionsFromJson static method

List<Action> actionsFromJson(
  1. Iterable docs
)

Creates a list of Action objects from an iterable of dynamic objects.

Returns: A list of Action objects.

Implementation

static List<Action> actionsFromJson(Iterable<dynamic> docs) =>
    List.from(docs).fold<List<Action>>([], (previousValue, action) {
      try {
        return [...previousValue, Action.create(action)];
      } catch (e) {
        return previousValue;
      }
    });