Instead of an arbitrary <T> here, how about adding an api.dart interface (e.g. HasLocal) and requiring that?