cubepod_resources 0.1.5
cubepod_resources: ^0.1.5 copied to clipboard
Asset management and resource bundling for CubePod applications.
cubepod_resources #
Managed resource loading for CubePod. Handles loading, caching, and releasing assets, configs, or any external resources tied to CubePod's scope lifecycle.
Install #
dependencies:
cubepod_resources: ^0.1.1
Usage #
import 'package:cubepod_resources/cubepod_resources.dart';
final resources = CubePod.get<ResourceManager>();
// Load and cache a config file
final config = await resources.load<AppConfig>(
key: 'app-config',
loader: () => fetchRemoteConfig(),
);
// Release when no longer needed
resources.release('app-config');
See cubepod for the full docs.