# registerExtensionStrategy static method

void registerExtensionStrategy(

1. AssetResourceExtensionStrategy strategy

)

Registers a new extension strategy.

A strategy is a function that attempts to determine the extension of a given `source`. If it cannot, it should return `null`.

### Example

    AssetResource.registerExtensionStrategy((source) {
      if (source is String && source.contains('xml')) return 'xml';
      return null;
    });

## Implementation

    static void registerExtensionStrategy(AssetResourceExtensionStrategy strategy) {
      _extensionStrategies.add(strategy);
    }