import 'dart:convert'; import '../types/actor.dart'; import 'api.dart'; Future> loadAllActors() async { final data = await API.query("actor", "getAllActors", {}); final d = (jsonDecode(data) ?? []) as List; final actors = d.map((e) => Actor.fromJson(e)).toList(growable: false); return actors; }