@@ -41,14 +41,13 @@ class GenericFunctionType implements SupportedFunctionType {
4141 String get typedefName => _typedefName;
4242
4343 @override
44- String get typeDescription => _functionTypeAliasElement.aliasedElement
44+ String get typeDescription => _functionTypeAliasElement.aliasedElement!
4545 .getDisplayString (withNullability: false );
4646
4747 final TypeAliasElement _functionTypeAliasElement;
4848 final bool _withContext;
4949
50- GenericFunctionType ._(this ._functionTypeAliasElement, this ._withContext)
51- : assert (_functionTypeAliasElement != null );
50+ GenericFunctionType ._(this ._functionTypeAliasElement, this ._withContext);
5251
5352 static Future <GenericFunctionType > create (Resolver resolver) async {
5453 final lib = await resolver.libraryFor (AssetId .resolve (_libraryUri));
@@ -71,7 +70,7 @@ class GenericFunctionType implements SupportedFunctionType {
7170 }
7271
7372 @override
74- FactoryData createReference (
73+ FactoryData ? createReference (
7574 LibraryElement library,
7675 String targetName,
7776 FunctionElement element,
@@ -101,11 +100,11 @@ class GenericFunctionType implements SupportedFunctionType {
101100
102101 if (library.typeSystem.isSubtypeOf (element.type, functionType)) {
103102 if (paramInfo.paramType != null ) {
104- if (library.exportNamespace.get (paramInfo.paramType.element.name) ==
103+ if (library.exportNamespace.get (paramInfo.paramType! .element.name) ==
105104 null ) {
106105 // TODO: add a test for this!
107106 throw InvalidGenerationSourceError (
108- 'The type `${paramInfo .paramType .element .name }` is not exposed by '
107+ 'The type `${paramInfo .paramType ! .element .name }` is not exposed by '
109108 'the function library `${library .source .uri }` so it cannot '
110109 'be used.' ,
111110 );
@@ -152,7 +151,7 @@ class _GenericFactoryData implements FactoryData {
152151 final typeDisplayName = info.paramType == null
153152 ? jsonTypeDisplay
154153 : '$functionsLibraryPrefix .'
155- '${info .paramType .getDisplayString (withNullability : false )}' ;
154+ '${info .paramType ! .getDisplayString (withNullability : false )}' ;
156155
157156 final returnBlock = info.paramType == null
158157 ? 'return $_jsonParamName ;'
0 commit comments