Reputation: 419
I have the line of code below from a tutorial I am following, but with my version of Flutter this syntax is wrong:
I am using Flutter 1.7.8 and the tutorial is using 0.11.2, so I guess this is an issue with my version of Dart.
final type = _typeOf<BlocProvider<T>>();
How can I convert the code above to the latest version of Dart?
Upvotes: 1
Views: 421
Reputation: 277027
_typeOf
isn't part of the language. You have to implement it yourself.
It's fairly straightforward:
Type _typeOf<T>() => T;
Upvotes: 1