# determineExtension static method

String? determineExtension(

1. Object source

)

Determines the file extension for a given `source`.

- Consults all registered AssetResourceExtensionStrategy functions in the order they were registered.
- Returns the first non-null, non-empty extension.
- Falls back to `_AssetResource.determineExtension(source)` if none match.

### Example

    final ext = AssetResource.determineExtension('config.yaml');
    print(ext); // 'yaml'

## Implementation

    static String? determineExtension(Object source) {
      for (final strat in _extensionStrategies) {
        try {
          final ext = strat(source);
          if (ext != null && ext.isNotEmpty) return ext;
        } catch (_) {
          // ignore strategy errors so one faulty strategy won't break others
        }
      }
      return _AssetResource.determineExtension(source);
    }