# getSharedInstance static method

ConversionService getSharedInstance()

Return a shared default ConversionService instance, lazily building it once needed.

NOTE: We highly recommend constructing individual ConversionService instances for customization purposes. This accessor is only meant as a fallback for code paths which need simple type coercion but cannot access a longer-lived ConversionService instance any other way.

## Implementation

    static ConversionService getSharedInstance() {
      DefaultConversionService? cs = _sharedInstance;
      if (cs == null) {
        return synchronized(DefaultConversionService, () {
          cs = _sharedInstance;
          if (cs == null) {
            cs = DefaultConversionService();
            _sharedInstance = cs;
          }

          return cs!;
        });
      }
      return cs;
    }