Masahiro Okubo

info: ‘typed’ is deprecated and shouldn’t be used. Use stream.cast instead.

info: ‘typed’ is deprecated and shouldn’t be used. Use stream.cast instead.
// だめ
final stream = http.ByteStream(DelegatingStream.typed(image.openRead()))

// ok
final stream = http.ByteStream(image.openRead())..cast<dynamic>();

これでいけました

参考記事

How do method cascades work exactly in dart?

Dartのカスケード記法(..)はRubyでいうtap

How should I use stream.cast instead of typed?

cascade_invocations


関連記事

copyright© 2016-2021 Masahiro Okubo