mirror of
https://github.com/openfoodfacts/smooth-app.git
synced 2025-08-06 18:25:11 +08:00
20 lines
445 B
Dart
20 lines
445 B
Dart
class AppHelper {
|
|
const AppHelper._();
|
|
|
|
//static const String APP_PACKAGE = 'smooth_app';
|
|
static const String? APP_PACKAGE = null;
|
|
|
|
static String getAssetPath(String asset) {
|
|
if (asset.startsWith('/')) {
|
|
asset = asset.substring(1);
|
|
} else if (asset.startsWith('packages/')) {
|
|
return asset;
|
|
}
|
|
|
|
assert(asset.isNotEmpty);
|
|
return asset;
|
|
}
|
|
|
|
static String get defaultAssetPath => getAssetPath('assets/');
|
|
}
|