diff --git a/packages/go_router_builder/lib/src/route_config.dart b/packages/go_router_builder/lib/src/route_config.dart index 3f53838891a..35c16e68b9b 100644 --- a/packages/go_router_builder/lib/src/route_config.dart +++ b/packages/go_router_builder/lib/src/route_config.dart @@ -623,6 +623,7 @@ abstract class RouteBaseConfig { }) { assert(!reader.isNull, 'reader should not be null'); final InterfaceType type = reader.objectValue.type! as InterfaceType; + // ignore: experimental_member_use final String typeName = type.element.displayName; if (isAncestorRelative && typeName == 'TypedGoRoute') { @@ -942,6 +943,7 @@ $routeDataClassName.$dataConvertionFunctionName( String _enumMapConst(InterfaceType type) { assert(type.isEnum); + // ignore: experimental_member_use final String enumName = type.element.displayName; final StringBuffer buffer = StringBuffer('const ${enumMapName(type)} = {'); diff --git a/packages/go_router_builder/lib/src/type_helpers.dart b/packages/go_router_builder/lib/src/type_helpers.dart index 2bc4fb23eee..bb249c43141 100644 --- a/packages/go_router_builder/lib/src/type_helpers.dart +++ b/packages/go_router_builder/lib/src/type_helpers.dart @@ -225,9 +225,11 @@ String compareField( /// Gets the name of the `const` map generated to help encode [Enum] types. String enumMapName(InterfaceType type) => + // ignore: experimental_member_use '_\$${type.element.displayName}EnumMap'; /// Gets the name of the `const` map generated to help encode [Json] types. +// ignore: experimental_member_use String jsonMapName(InterfaceType type) => type.element.displayName; String _stateValueAccess( @@ -795,9 +797,12 @@ class _TypeHelperJson extends _TypeHelperWithHelper { } final FunctionType functionType = secondParam.type as FunctionType; + // ignore: experimental_member_use if (functionType.formalParameters.length != 1 || functionType.returnType.getDisplayString() != + // ignore: experimental_member_use type.element.typeParameters.first.displayName || + // ignore: experimental_member_use functionType.formalParameters[0].type.getDisplayString() != 'Object?') { throw InvalidGenerationSourceError( 'The parameter type '