loadFromPackage static method
Loads a string from a file within a package
Parameters:
- packageName: Name of the package (e.g., 'gtd_utils')
- filePath: Path to the file within the package (e.g., 'lib/data/resource/file.txt')
Returns a Future
Implementation
static Future<String> loadFromPackage({
required String packageName,
required String filePath,
}) {
final fullPath = 'packages/$packageName/$filePath';
return rootBundle.loadString(fullPath);
}