registerRouteBloc method
Code
registerRouteBloc({})
Implementation
Code registerRouteBloc(
{required String routeType,
String? routeTypeImport,
Code? extra,
bool usePageBuilder = false}) {
return Block.of([
const Code('return '),
Reference(routeType, routeTypeImport).code,
usePageBuilder
? Code(
'<$processedReturnType>(pageBuilder: (context, animation, secondaryAnimation) => ')
: Code('<$processedReturnType>(builder: (context) => '),
joinedConstructerParams,
const Code(', settings: data,'),
if (extra != null) extra,
if (fullscreenDialog) const Code('fullscreenDialog:true,'),
if (!maintainState) const Code('maintainState:false,'),
const Code(');')
]);
}