castFrom<SS, ST, TS, TT> method

Converter<TS, TT> castFrom <SS, ST, TS, TT>(
  1. Converter<SS, ST> source
)
override

Adapts source to be a Converter<TS, TT>.

This allows source to be used at the new type, but at run-time it must satisfy the requirements of both the new type and its original type.

Conversion input must be both SS and TS and the output created by source for those input must be both ST and TT.

Implementation

static Converter<TS, TT> castFrom<SS, ST, TS, TT>(Converter<SS, ST> source) =>
    CastConverter<SS, ST, TS, TT>(source);

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dart.dev/stable/2.13.0/dart-convert/Converter/castFrom.html