wrap<T> function
Wrap the dart source code fragment of a type in Future
. i.e. Future<${type}>
.
Implementation
String wrap<T>(String returnType, {bool nullable = false}) =>
'${T.toString().split("<")[0]}<${returnType}${nullable && returnType != "void" ? "?" : ""}>';