Skip to content

Commit

Permalink
fix: model updates from main
Browse files Browse the repository at this point in the history
  • Loading branch information
Equartey committed Apr 29, 2024
1 parent c0210e4 commit 85970b6
Show file tree
Hide file tree
Showing 10 changed files with 45 additions and 79 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -273,9 +273,6 @@ class AttributeExistsQueryOperator<T> extends QueryFieldOperator<T> {
return other == null;
}

@override
bool evaluateSerialized(T? other) => evaluate(other);

@override
Map<String, dynamic> serializeAsMap() {
return <String, dynamic>{
Expand Down
23 changes: 8 additions & 15 deletions packages/api/amplify_api/example/lib/models/Blog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
// Generated files can be excluded from analysis in analysis_options.yaml
// For more info, see: https://dart.dev/guides/language/analysis-options#excluding-code-from-analysis

// ignore_for_file: public_member_api_docs, annotate_overrides, dead_code, dead_codepublic_member_api_docs, depend_on_referenced_packages, file_names, library_private_types_in_public_api, no_leading_underscores_for_library_prefixes, no_leading_underscores_for_local_identifiers, non_constant_identifier_names, null_check_on_nullable_type_parameter, override_on_non_overriding_member, prefer_adjacent_string_concatenation, prefer_const_constructors, prefer_if_null_operators, prefer_interpolation_to_compose_strings, slash_for_doc_comments, sort_child_properties_last, unnecessary_const, unnecessary_constructor_name, unnecessary_late, unnecessary_new, unnecessary_null_aware_assignments, unnecessary_nullable_for_final_variable_declarations, unnecessary_string_interpolations, use_build_context_synchronously
// ignore_for_file: public_member_api_docs, annotate_overrides, dead_code, dead_codepublic_member_api_docs, depend_on_referenced_packages, file_names, library_private_types_in_public_api, no_leading_underscores_for_library_prefixes, no_leading_underscores_for_local_identifiers, non_constant_identifier_names, null_check_on_nullable_type_parameter, prefer_adjacent_string_concatenation, prefer_const_constructors, prefer_if_null_operators, prefer_interpolation_to_compose_strings, slash_for_doc_comments, sort_child_properties_last, unnecessary_const, unnecessary_constructor_name, unnecessary_late, unnecessary_new, unnecessary_null_aware_assignments, unnecessary_nullable_for_final_variable_declarations, unnecessary_string_interpolations, use_build_context_synchronously

import 'ModelProvider.dart';
import 'package:amplify_core/amplify_core.dart' as amplify_core;
Expand Down Expand Up @@ -132,20 +132,13 @@ class Blog extends amplify_core.Model {
Blog.fromJson(Map<String, dynamic> json)
: id = json['id'],
_name = json['name'],
_posts = json['posts'] is Map
? (json['posts']['items'] is List
? (json['posts']['items'] as List)
.where((e) => e != null)
.map((e) => Post.fromJson(new Map<String, dynamic>.from(e)))
.toList()
: null)
: (json['posts'] is List
? (json['posts'] as List)
.where((e) => e?['serializedData'] != null)
.map((e) => Post.fromJson(
new Map<String, dynamic>.from(e?['serializedData'])))
.toList()
: null),
_posts = json['posts'] is List
? (json['posts'] as List)
.where((e) => e?['serializedData'] != null)
.map((e) => Post.fromJson(
new Map<String, dynamic>.from(e['serializedData'])))
.toList()
: null,
_createdAt = json['createdAt'] != null
? amplify_core.TemporalDateTime.fromString(json['createdAt'])
: null,
Expand Down
10 changes: 4 additions & 6 deletions packages/api/amplify_api/example/lib/models/Comment.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
// Generated files can be excluded from analysis in analysis_options.yaml
// For more info, see: https://dart.dev/guides/language/analysis-options#excluding-code-from-analysis

// ignore_for_file: public_member_api_docs, annotate_overrides, dead_code, dead_codepublic_member_api_docs, depend_on_referenced_packages, file_names, library_private_types_in_public_api, no_leading_underscores_for_library_prefixes, no_leading_underscores_for_local_identifiers, non_constant_identifier_names, null_check_on_nullable_type_parameter, override_on_non_overriding_member, prefer_adjacent_string_concatenation, prefer_const_constructors, prefer_if_null_operators, prefer_interpolation_to_compose_strings, slash_for_doc_comments, sort_child_properties_last, unnecessary_const, unnecessary_constructor_name, unnecessary_late, unnecessary_new, unnecessary_null_aware_assignments, unnecessary_nullable_for_final_variable_declarations, unnecessary_string_interpolations, use_build_context_synchronously
// ignore_for_file: public_member_api_docs, annotate_overrides, dead_code, dead_codepublic_member_api_docs, depend_on_referenced_packages, file_names, library_private_types_in_public_api, no_leading_underscores_for_library_prefixes, no_leading_underscores_for_local_identifiers, non_constant_identifier_names, null_check_on_nullable_type_parameter, prefer_adjacent_string_concatenation, prefer_const_constructors, prefer_if_null_operators, prefer_interpolation_to_compose_strings, slash_for_doc_comments, sort_child_properties_last, unnecessary_const, unnecessary_constructor_name, unnecessary_late, unnecessary_new, unnecessary_null_aware_assignments, unnecessary_nullable_for_final_variable_declarations, unnecessary_string_interpolations, use_build_context_synchronously

import 'ModelProvider.dart';
import 'package:amplify_core/amplify_core.dart' as amplify_core;
Expand Down Expand Up @@ -131,11 +131,9 @@ class Comment extends amplify_core.Model {

Comment.fromJson(Map<String, dynamic> json)
: id = json['id'],
_post = json['post'] != null
? json['post']['serializedData'] != null
? Post.fromJson(new Map<String, dynamic>.from(
json['post']['serializedData']))
: Post.fromJson(new Map<String, dynamic>.from(json['post']))
_post = json['post']?['serializedData'] != null
? Post.fromJson(
new Map<String, dynamic>.from(json['post']['serializedData']))
: null,
_content = json['content'],
_createdAt = json['createdAt'] != null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
// Generated files can be excluded from analysis in analysis_options.yaml
// For more info, see: https://dart.dev/guides/language/analysis-options#excluding-code-from-analysis

// ignore_for_file: public_member_api_docs, annotate_overrides, dead_code, dead_codepublic_member_api_docs, depend_on_referenced_packages, file_names, library_private_types_in_public_api, no_leading_underscores_for_library_prefixes, no_leading_underscores_for_local_identifiers, non_constant_identifier_names, null_check_on_nullable_type_parameter, override_on_non_overriding_member, prefer_adjacent_string_concatenation, prefer_const_constructors, prefer_if_null_operators, prefer_interpolation_to_compose_strings, slash_for_doc_comments, sort_child_properties_last, unnecessary_const, unnecessary_constructor_name, unnecessary_late, unnecessary_new, unnecessary_null_aware_assignments, unnecessary_nullable_for_final_variable_declarations, unnecessary_string_interpolations, use_build_context_synchronously
// ignore_for_file: public_member_api_docs, annotate_overrides, dead_code, dead_codepublic_member_api_docs, depend_on_referenced_packages, file_names, library_private_types_in_public_api, no_leading_underscores_for_library_prefixes, no_leading_underscores_for_local_identifiers, non_constant_identifier_names, null_check_on_nullable_type_parameter, prefer_adjacent_string_concatenation, prefer_const_constructors, prefer_if_null_operators, prefer_interpolation_to_compose_strings, slash_for_doc_comments, sort_child_properties_last, unnecessary_const, unnecessary_constructor_name, unnecessary_late, unnecessary_new, unnecessary_null_aware_assignments, unnecessary_nullable_for_final_variable_declarations, unnecessary_string_interpolations, use_build_context_synchronously

import 'ModelProvider.dart';
import 'package:amplify_core/amplify_core.dart' as amplify_core;
Expand Down Expand Up @@ -153,13 +153,10 @@ class CpkOneToOneBidirectionalChildExplicitCD extends amplify_core.Model {
CpkOneToOneBidirectionalChildExplicitCD.fromJson(Map<String, dynamic> json)
: id = json['id'],
_name = json['name'],
_belongsToParent = json['belongsToParent'] != null
? json['belongsToParent']['serializedData'] != null
? CpkOneToOneBidirectionalParentCD.fromJson(
new Map<String, dynamic>.from(
json['belongsToParent']['serializedData']))
: CpkOneToOneBidirectionalParentCD.fromJson(
new Map<String, dynamic>.from(json['belongsToParent']))
_belongsToParent = json['belongsToParent']?['serializedData'] != null
? CpkOneToOneBidirectionalParentCD.fromJson(
new Map<String, dynamic>.from(
json['belongsToParent']['serializedData']))
: null,
_createdAt = json['createdAt'] != null
? amplify_core.TemporalDateTime.fromString(json['createdAt'])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
// Generated files can be excluded from analysis in analysis_options.yaml
// For more info, see: https://dart.dev/guides/language/analysis-options#excluding-code-from-analysis

// ignore_for_file: public_member_api_docs, annotate_overrides, dead_code, dead_codepublic_member_api_docs, depend_on_referenced_packages, file_names, library_private_types_in_public_api, no_leading_underscores_for_library_prefixes, no_leading_underscores_for_local_identifiers, non_constant_identifier_names, null_check_on_nullable_type_parameter, override_on_non_overriding_member, prefer_adjacent_string_concatenation, prefer_const_constructors, prefer_if_null_operators, prefer_interpolation_to_compose_strings, slash_for_doc_comments, sort_child_properties_last, unnecessary_const, unnecessary_constructor_name, unnecessary_late, unnecessary_new, unnecessary_null_aware_assignments, unnecessary_nullable_for_final_variable_declarations, unnecessary_string_interpolations, use_build_context_synchronously
// ignore_for_file: public_member_api_docs, annotate_overrides, dead_code, dead_codepublic_member_api_docs, depend_on_referenced_packages, file_names, library_private_types_in_public_api, no_leading_underscores_for_library_prefixes, no_leading_underscores_for_local_identifiers, non_constant_identifier_names, null_check_on_nullable_type_parameter, prefer_adjacent_string_concatenation, prefer_const_constructors, prefer_if_null_operators, prefer_interpolation_to_compose_strings, slash_for_doc_comments, sort_child_properties_last, unnecessary_const, unnecessary_constructor_name, unnecessary_late, unnecessary_new, unnecessary_null_aware_assignments, unnecessary_nullable_for_final_variable_declarations, unnecessary_string_interpolations, use_build_context_synchronously

import 'ModelProvider.dart';
import 'package:amplify_core/amplify_core.dart' as amplify_core;
Expand Down Expand Up @@ -153,13 +153,10 @@ class CpkOneToOneBidirectionalChildImplicitCD extends amplify_core.Model {
CpkOneToOneBidirectionalChildImplicitCD.fromJson(Map<String, dynamic> json)
: id = json['id'],
_name = json['name'],
_belongsToParent = json['belongsToParent'] != null
? json['belongsToParent']['serializedData'] != null
? CpkOneToOneBidirectionalParentCD.fromJson(
new Map<String, dynamic>.from(
json['belongsToParent']['serializedData']))
: CpkOneToOneBidirectionalParentCD.fromJson(
new Map<String, dynamic>.from(json['belongsToParent']))
_belongsToParent = json['belongsToParent']?['serializedData'] != null
? CpkOneToOneBidirectionalParentCD.fromJson(
new Map<String, dynamic>.from(
json['belongsToParent']['serializedData']))
: null,
_createdAt = json['createdAt'] != null
? amplify_core.TemporalDateTime.fromString(json['createdAt'])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
// Generated files can be excluded from analysis in analysis_options.yaml
// For more info, see: https://dart.dev/guides/language/analysis-options#excluding-code-from-analysis

// ignore_for_file: public_member_api_docs, annotate_overrides, dead_code, dead_codepublic_member_api_docs, depend_on_referenced_packages, file_names, library_private_types_in_public_api, no_leading_underscores_for_library_prefixes, no_leading_underscores_for_local_identifiers, non_constant_identifier_names, null_check_on_nullable_type_parameter, override_on_non_overriding_member, prefer_adjacent_string_concatenation, prefer_const_constructors, prefer_if_null_operators, prefer_interpolation_to_compose_strings, slash_for_doc_comments, sort_child_properties_last, unnecessary_const, unnecessary_constructor_name, unnecessary_late, unnecessary_new, unnecessary_null_aware_assignments, unnecessary_nullable_for_final_variable_declarations, unnecessary_string_interpolations, use_build_context_synchronously
// ignore_for_file: public_member_api_docs, annotate_overrides, dead_code, dead_codepublic_member_api_docs, depend_on_referenced_packages, file_names, library_private_types_in_public_api, no_leading_underscores_for_library_prefixes, no_leading_underscores_for_local_identifiers, non_constant_identifier_names, null_check_on_nullable_type_parameter, prefer_adjacent_string_concatenation, prefer_const_constructors, prefer_if_null_operators, prefer_interpolation_to_compose_strings, slash_for_doc_comments, sort_child_properties_last, unnecessary_const, unnecessary_constructor_name, unnecessary_late, unnecessary_new, unnecessary_null_aware_assignments, unnecessary_nullable_for_final_variable_declarations, unnecessary_string_interpolations, use_build_context_synchronously

import 'ModelProvider.dart';
import 'package:amplify_core/amplify_core.dart' as amplify_core;
Expand Down Expand Up @@ -283,21 +283,15 @@ class CpkOneToOneBidirectionalParentCD extends amplify_core.Model {
CpkOneToOneBidirectionalParentCD.fromJson(Map<String, dynamic> json)
: _customId = json['customId'],
_name = json['name'],
_implicitChild = json['implicitChild'] != null
? json['implicitChild']['serializedData'] != null
? CpkOneToOneBidirectionalChildImplicitCD.fromJson(
new Map<String, dynamic>.from(
json['implicitChild']['serializedData']))
: CpkOneToOneBidirectionalChildImplicitCD.fromJson(
new Map<String, dynamic>.from(json['implicitChild']))
_implicitChild = json['implicitChild']?['serializedData'] != null
? CpkOneToOneBidirectionalChildImplicitCD.fromJson(
new Map<String, dynamic>.from(
json['implicitChild']['serializedData']))
: null,
_explicitChild = json['explicitChild'] != null
? json['explicitChild']['serializedData'] != null
? CpkOneToOneBidirectionalChildExplicitCD.fromJson(
new Map<String, dynamic>.from(
json['explicitChild']['serializedData']))
: CpkOneToOneBidirectionalChildExplicitCD.fromJson(
new Map<String, dynamic>.from(json['explicitChild']))
_explicitChild = json['explicitChild']?['serializedData'] != null
? CpkOneToOneBidirectionalChildExplicitCD.fromJson(
new Map<String, dynamic>.from(
json['explicitChild']['serializedData']))
: null,
_createdAt = json['createdAt'] != null
? amplify_core.TemporalDateTime.fromString(json['createdAt'])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
// Generated files can be excluded from analysis in analysis_options.yaml
// For more info, see: https://dart.dev/guides/language/analysis-options#excluding-code-from-analysis

// ignore_for_file: public_member_api_docs, annotate_overrides, dead_code, dead_codepublic_member_api_docs, depend_on_referenced_packages, file_names, library_private_types_in_public_api, no_leading_underscores_for_library_prefixes, no_leading_underscores_for_local_identifiers, non_constant_identifier_names, null_check_on_nullable_type_parameter, override_on_non_overriding_member, prefer_adjacent_string_concatenation, prefer_const_constructors, prefer_if_null_operators, prefer_interpolation_to_compose_strings, slash_for_doc_comments, sort_child_properties_last, unnecessary_const, unnecessary_constructor_name, unnecessary_late, unnecessary_new, unnecessary_null_aware_assignments, unnecessary_nullable_for_final_variable_declarations, unnecessary_string_interpolations, use_build_context_synchronously
// ignore_for_file: public_member_api_docs, annotate_overrides, dead_code, dead_codepublic_member_api_docs, depend_on_referenced_packages, file_names, library_private_types_in_public_api, no_leading_underscores_for_library_prefixes, no_leading_underscores_for_local_identifiers, non_constant_identifier_names, null_check_on_nullable_type_parameter, prefer_adjacent_string_concatenation, prefer_const_constructors, prefer_if_null_operators, prefer_interpolation_to_compose_strings, slash_for_doc_comments, sort_child_properties_last, unnecessary_const, unnecessary_constructor_name, unnecessary_late, unnecessary_new, unnecessary_null_aware_assignments, unnecessary_nullable_for_final_variable_declarations, unnecessary_string_interpolations, use_build_context_synchronously

import 'package:amplify_core/amplify_core.dart' as amplify_core;
import 'Blog.dart';
Expand Down
2 changes: 1 addition & 1 deletion packages/api/amplify_api/example/lib/models/OwnerOnly.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
// Generated files can be excluded from analysis in analysis_options.yaml
// For more info, see: https://dart.dev/guides/language/analysis-options#excluding-code-from-analysis

// ignore_for_file: public_member_api_docs, annotate_overrides, dead_code, dead_codepublic_member_api_docs, depend_on_referenced_packages, file_names, library_private_types_in_public_api, no_leading_underscores_for_library_prefixes, no_leading_underscores_for_local_identifiers, non_constant_identifier_names, null_check_on_nullable_type_parameter, override_on_non_overriding_member, prefer_adjacent_string_concatenation, prefer_const_constructors, prefer_if_null_operators, prefer_interpolation_to_compose_strings, slash_for_doc_comments, sort_child_properties_last, unnecessary_const, unnecessary_constructor_name, unnecessary_late, unnecessary_new, unnecessary_null_aware_assignments, unnecessary_nullable_for_final_variable_declarations, unnecessary_string_interpolations, use_build_context_synchronously
// ignore_for_file: public_member_api_docs, annotate_overrides, dead_code, dead_codepublic_member_api_docs, depend_on_referenced_packages, file_names, library_private_types_in_public_api, no_leading_underscores_for_library_prefixes, no_leading_underscores_for_local_identifiers, non_constant_identifier_names, null_check_on_nullable_type_parameter, prefer_adjacent_string_concatenation, prefer_const_constructors, prefer_if_null_operators, prefer_interpolation_to_compose_strings, slash_for_doc_comments, sort_child_properties_last, unnecessary_const, unnecessary_constructor_name, unnecessary_late, unnecessary_new, unnecessary_null_aware_assignments, unnecessary_nullable_for_final_variable_declarations, unnecessary_string_interpolations, use_build_context_synchronously

import 'ModelProvider.dart';
import 'package:amplify_core/amplify_core.dart' as amplify_core;
Expand Down
Loading

0 comments on commit 85970b6

Please sign in to comment.