-
Notifications
You must be signed in to change notification settings - Fork 20
feat(Core): Update core dependencies and logic #107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…nerator into feature/core-improvements
@@ -3,6 +3,7 @@ enum SwaggerPathRequestType { | |||
post, | |||
put, | |||
delete, | |||
patch, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cozvtieg9, one swagger did not work properly and fell on an unimplemented orElse
@@ -24,6 +24,12 @@ sealed class SwaggerType { | |||
String? getFileImportName(DataFileType fileType); | |||
|
|||
String? getDefaultReturnType(DataFileType fileType); | |||
|
|||
String? getFullFileImport(String projectName, DataFileType fileType) { | |||
final importName = getFileImportName(fileType); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cozvtieg9, added a null check so as not to break your existing logic of checking for import == null || imports.contains(import);
@@ -150,6 +150,9 @@ class DataObjectComponent with _$DataObjectComponent { | |||
} | |||
codeLines.addNewLine(); | |||
final classNamePrefix = fileReference.getTypeDeclaration(DataFileType.none); | |||
final objects = | |||
_getMapperObjectVariablesContent(MapperType.mapEntityToRequest); | |||
final classModifier = objects.isEmpty ? 'const ' : ''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cozvtieg9, added logic to the const constructor to have fewer hints in the analyzer
final responseFileImport = | ||
request.response.type.getFileImportName(DataFileType.response); | ||
final responseFileImport = request.response.type | ||
.getFullFileImport(projectName, DataFileType.response); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cozvtieg9, replaced getFileImportName with getFullFileImport to support paging. You can change the name if it doesn't quite fit
if (_baseConstructorProperties.isEmpty) { | ||
lines.add('factory $classFullName() = _$classFullName;'); | ||
lines.add('const factory $classFullName() = _$classFullName;'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cozvtieg9, I mentioned above that I added const constructors, this const factory has been updated for this
@@ -86,15 +86,15 @@ class ComponentGeneratorService | |||
final declarationFilePath = | |||
sourceComponent.getDeclarationFilePath(projectLibFolder); | |||
|
|||
final declarationBody = sourceComponent.getDeclarationBody(projectName); | |||
final declarationBody = sourceComponent.getSourceDeclarationBody(projectName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cozvtieg9, changed the name from getDecralationBody to getSourceDeclarationBody to make it easier to understand where the surfaces are and where the repos are
@@ -154,7 +154,7 @@ class GenerationScreenBloc extends BaseBloc<GenerationScreenEvent, | |||
|
|||
if (!state.config.graphql) { | |||
await Directory( | |||
'${state.config.projectPath}/${state.config.projectName}/lib/core/arch/data/remote/clients/graph_ql', | |||
'${state.config.projectPath}/${state.config.projectName}/lib/core/arch/data/remote/graph_ql', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cozvtieg9, removed the clients directory
@@ -70,7 +68,7 @@ class FirebaseAuthSourceImpl extends FirebaseAuthSource { | |||
return const DataResponse.unauthorized(); | |||
} | |||
} on FirebaseAuthException catch (e) { | |||
return DataResponse.firebaseError(e.code); | |||
return DataResponse.undefinedError(e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cozvtieg9, I removed the firebaseError. There is no way to extend the freezed class
No description provided.