actionsFromJson static method

List<WalletAction> actionsFromJson(
  1. Iterable docs
)

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

Returns: A list of WalletAction objects.

Implementation

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