From 794e8158c336c430047cb374beafd884515d4602 Mon Sep 17 00:00:00 2001 From: John Ramberger Date: Sun, 31 Dec 2023 22:39:24 -0500 Subject: [PATCH 1/6] fix --- .gitignore | 1 + android/app/build.gradle | 2 +- android/build.gradle | 4 +- lib/models/AdminSettings.dart | 97 +- lib/models/Checkin.dart | 153 ++-- lib/models/ClaimShirt.dart | 105 ++- lib/models/Event.dart | 184 ++-- lib/models/EventRSVP.dart | 126 +-- lib/models/Log.dart | 160 ++-- lib/models/ModelProvider.dart | 21 +- lib/models/Points.dart | 116 ++- lib/models/ScavengerHunt.dart | 115 ++- lib/models/ScavengerHuntCheckin.dart | 105 ++- lib/view/CheckinUserList.view.dart | 24 +- lib/view/Home.view.dart | 4 +- lib/viewmodel/checkin.viewmodel.dart | 57 +- linux/flutter/generated_plugin_registrant.cc | 8 + linux/flutter/generated_plugins.cmake | 2 + macos/Flutter/GeneratedPluginRegistrant.swift | 16 +- pubspec.lock | 857 +++++++++++++----- pubspec.yaml | 12 +- windows/flutter/CMakeLists.txt | 7 +- .../flutter/generated_plugin_registrant.cc | 9 + windows/flutter/generated_plugins.cmake | 3 + 24 files changed, 1429 insertions(+), 759 deletions(-) diff --git a/.gitignore b/.gitignore index ff82c1f..5f38d38 100644 --- a/.gitignore +++ b/.gitignore @@ -82,6 +82,7 @@ amplify/\#current-cloud-backend amplify/.config/local-* amplify/logs amplify/mock-data +amplify/mock-api-resources amplify/backend/amplify-meta.json amplify/backend/.temp build/ diff --git a/android/app/build.gradle b/android/app/build.gradle index 4a11786..030d3ab 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -47,7 +47,7 @@ android { applicationId "com.example.hacklytics_checkin_flutter" // You can update the following values to match your application needs. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. - minSdkVersion 21 + minSdkVersion 24 targetSdkVersion flutter.targetSdkVersion versionCode flutterVersionCode.toInteger() versionName flutterVersionName diff --git a/android/build.gradle b/android/build.gradle index 83ae220..e06c40a 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,5 +1,5 @@ buildscript { - ext.kotlin_version = '1.6.10' + ext.kotlin_version = '1.8.0' repositories { google() mavenCentral() @@ -26,6 +26,6 @@ subprojects { project.evaluationDependsOn(':app') } -task clean(type: Delete) { +tasks.register("clean", Delete) { delete rootProject.buildDir } diff --git a/lib/models/AdminSettings.dart b/lib/models/AdminSettings.dart index 922f441..2dc7d08 100644 --- a/lib/models/AdminSettings.dart +++ b/lib/models/AdminSettings.dart @@ -19,20 +19,19 @@ // 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'; +import 'ModelProvider.dart'; +import 'package:amplify_core/amplify_core.dart' as amplify_core; import 'package:collection/collection.dart'; -import 'package:flutter/foundation.dart'; /** This is an auto generated class representing the AdminSettings type in your schema. */ -@immutable -class AdminSettings extends Model { +class AdminSettings extends amplify_core.Model { static const classType = const _AdminSettingsModelType(); final String id; final bool? _hacklyticsOpen; final List? _participantEmails; - final TemporalDateTime? _createdAt; - final TemporalDateTime? _updatedAt; + final amplify_core.TemporalDateTime? _createdAt; + final amplify_core.TemporalDateTime? _updatedAt; @override getInstanceType() => classType; @@ -50,11 +49,11 @@ class AdminSettings extends Model { return _participantEmails; } - TemporalDateTime? get createdAt { + amplify_core.TemporalDateTime? get createdAt { return _createdAt; } - TemporalDateTime? get updatedAt { + amplify_core.TemporalDateTime? get updatedAt { return _updatedAt; } @@ -62,7 +61,7 @@ class AdminSettings extends Model { factory AdminSettings({String? id, bool? hacklyticsOpen, List? participantEmails}) { return AdminSettings._internal( - id: id == null ? UUID.getUUID() : id, + id: id == null ? amplify_core.UUID.getUUID() : id, hacklyticsOpen: hacklyticsOpen, participantEmails: participantEmails != null ? List.unmodifiable(participantEmails) : participantEmails); } @@ -105,82 +104,98 @@ class AdminSettings extends Model { participantEmails: participantEmails ?? this.participantEmails); } + AdminSettings copyWithModelFieldValues({ + ModelFieldValue? id, + ModelFieldValue? hacklyticsOpen, + ModelFieldValue?>? participantEmails + }) { + return AdminSettings._internal( + id: id == null ? this.id : id.value, + hacklyticsOpen: hacklyticsOpen == null ? this.hacklyticsOpen : hacklyticsOpen.value, + participantEmails: participantEmails == null ? this.participantEmails : participantEmails.value + ); + } + AdminSettings.fromJson(Map json) : id = json['id'], _hacklyticsOpen = json['hacklyticsOpen'], _participantEmails = json['participantEmails']?.cast(), - _createdAt = json['createdAt'] != null ? TemporalDateTime.fromString(json['createdAt']) : null, - _updatedAt = json['updatedAt'] != null ? TemporalDateTime.fromString(json['updatedAt']) : null; + _createdAt = json['createdAt'] != null ? amplify_core.TemporalDateTime.fromString(json['createdAt']) : null, + _updatedAt = json['updatedAt'] != null ? amplify_core.TemporalDateTime.fromString(json['updatedAt']) : null; Map toJson() => { 'id': id, 'hacklyticsOpen': _hacklyticsOpen, 'participantEmails': _participantEmails, 'createdAt': _createdAt?.format(), 'updatedAt': _updatedAt?.format() }; Map toMap() => { - 'id': id, 'hacklyticsOpen': _hacklyticsOpen, 'participantEmails': _participantEmails, 'createdAt': _createdAt, 'updatedAt': _updatedAt + 'id': id, + 'hacklyticsOpen': _hacklyticsOpen, + 'participantEmails': _participantEmails, + 'createdAt': _createdAt, + 'updatedAt': _updatedAt }; - static final QueryField ID = QueryField(fieldName: "id"); - static final QueryField HACKLYTICSOPEN = QueryField(fieldName: "hacklyticsOpen"); - static final QueryField PARTICIPANTEMAILS = QueryField(fieldName: "participantEmails"); - static var schema = Model.defineSchema(define: (ModelSchemaDefinition modelSchemaDefinition) { + static final ID = amplify_core.QueryField(fieldName: "id"); + static final HACKLYTICSOPEN = amplify_core.QueryField(fieldName: "hacklyticsOpen"); + static final PARTICIPANTEMAILS = amplify_core.QueryField(fieldName: "participantEmails"); + static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { modelSchemaDefinition.name = "AdminSettings"; modelSchemaDefinition.pluralName = "AdminSettings"; modelSchemaDefinition.authRules = [ - AuthRule( - authStrategy: AuthStrategy.PUBLIC, - operations: [ - ModelOperation.CREATE, - ModelOperation.UPDATE, - ModelOperation.DELETE, - ModelOperation.READ + amplify_core.AuthRule( + authStrategy: amplify_core.AuthStrategy.PUBLIC, + operations: const [ + amplify_core.ModelOperation.CREATE, + amplify_core.ModelOperation.UPDATE, + amplify_core.ModelOperation.DELETE, + amplify_core.ModelOperation.READ ]), - AuthRule( - authStrategy: AuthStrategy.GROUPS, + amplify_core.AuthRule( + authStrategy: amplify_core.AuthStrategy.GROUPS, groupClaim: "cognito:groups", groups: [ "Administrator" ], - provider: AuthRuleProvider.USERPOOLS, - operations: [ - ModelOperation.READ, - ModelOperation.CREATE, - ModelOperation.UPDATE, - ModelOperation.DELETE + provider: amplify_core.AuthRuleProvider.USERPOOLS, + operations: const [ + amplify_core.ModelOperation.READ, + amplify_core.ModelOperation.CREATE, + amplify_core.ModelOperation.UPDATE, + amplify_core.ModelOperation.DELETE ]) ]; - modelSchemaDefinition.addField(ModelFieldDefinition.id()); + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); - modelSchemaDefinition.addField(ModelFieldDefinition.field( + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.field( key: AdminSettings.HACKLYTICSOPEN, isRequired: false, - ofType: ModelFieldType(ModelFieldTypeEnum.bool) + ofType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.bool) )); - modelSchemaDefinition.addField(ModelFieldDefinition.field( + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.field( key: AdminSettings.PARTICIPANTEMAILS, isRequired: false, isArray: true, - ofType: ModelFieldType(ModelFieldTypeEnum.collection, ofModelName: describeEnum(ModelFieldTypeEnum.string)) + ofType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.collection, ofModelName: amplify_core.ModelFieldTypeEnum.string.name) )); - modelSchemaDefinition.addField(ModelFieldDefinition.nonQueryField( + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.nonQueryField( fieldName: 'createdAt', isRequired: false, isReadOnly: true, - ofType: ModelFieldType(ModelFieldTypeEnum.dateTime) + ofType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.dateTime) )); - modelSchemaDefinition.addField(ModelFieldDefinition.nonQueryField( + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.nonQueryField( fieldName: 'updatedAt', isRequired: false, isReadOnly: true, - ofType: ModelFieldType(ModelFieldTypeEnum.dateTime) + ofType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.dateTime) )); }); } -class _AdminSettingsModelType extends ModelType { +class _AdminSettingsModelType extends amplify_core.ModelType { const _AdminSettingsModelType(); @override diff --git a/lib/models/Checkin.dart b/lib/models/Checkin.dart index 894e1b2..746ae0c 100644 --- a/lib/models/Checkin.dart +++ b/lib/models/Checkin.dart @@ -20,13 +20,11 @@ // 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'; -import 'package:flutter/foundation.dart'; +import 'package:amplify_core/amplify_core.dart' as amplify_core; /** This is an auto generated class representing the Checkin type in your schema. */ -@immutable -class Checkin extends Model { +class Checkin extends amplify_core.Model { static const classType = const _CheckinModelType(); final String id; final String? _createdBy; @@ -34,8 +32,8 @@ class Checkin extends Model { final String? _user; final String? _userName; final Event? _event; - final TemporalDateTime? _createdAt; - final TemporalDateTime? _updatedAt; + final amplify_core.TemporalDateTime? _createdAt; + final amplify_core.TemporalDateTime? _updatedAt; @override getInstanceType() => classType; @@ -49,10 +47,10 @@ class Checkin extends Model { try { return _createdBy!; } catch(e) { - throw new AmplifyCodeGenModelException( - AmplifyExceptionMessages.codeGenRequiredFieldForceCastExceptionMessage, + throw amplify_core.AmplifyCodeGenModelException( + amplify_core.AmplifyExceptionMessages.codeGenRequiredFieldForceCastExceptionMessage, recoverySuggestion: - AmplifyExceptionMessages.codeGenRequiredFieldForceCastRecoverySuggestion, + amplify_core.AmplifyExceptionMessages.codeGenRequiredFieldForceCastRecoverySuggestion, underlyingException: e.toString() ); } @@ -62,10 +60,10 @@ class Checkin extends Model { try { return _createdByName!; } catch(e) { - throw new AmplifyCodeGenModelException( - AmplifyExceptionMessages.codeGenRequiredFieldForceCastExceptionMessage, + throw amplify_core.AmplifyCodeGenModelException( + amplify_core.AmplifyExceptionMessages.codeGenRequiredFieldForceCastExceptionMessage, recoverySuggestion: - AmplifyExceptionMessages.codeGenRequiredFieldForceCastRecoverySuggestion, + amplify_core.AmplifyExceptionMessages.codeGenRequiredFieldForceCastRecoverySuggestion, underlyingException: e.toString() ); } @@ -75,10 +73,10 @@ class Checkin extends Model { try { return _user!; } catch(e) { - throw new AmplifyCodeGenModelException( - AmplifyExceptionMessages.codeGenRequiredFieldForceCastExceptionMessage, + throw amplify_core.AmplifyCodeGenModelException( + amplify_core.AmplifyExceptionMessages.codeGenRequiredFieldForceCastExceptionMessage, recoverySuggestion: - AmplifyExceptionMessages.codeGenRequiredFieldForceCastRecoverySuggestion, + amplify_core.AmplifyExceptionMessages.codeGenRequiredFieldForceCastRecoverySuggestion, underlyingException: e.toString() ); } @@ -88,10 +86,10 @@ class Checkin extends Model { try { return _userName!; } catch(e) { - throw new AmplifyCodeGenModelException( - AmplifyExceptionMessages.codeGenRequiredFieldForceCastExceptionMessage, + throw amplify_core.AmplifyCodeGenModelException( + amplify_core.AmplifyExceptionMessages.codeGenRequiredFieldForceCastExceptionMessage, recoverySuggestion: - AmplifyExceptionMessages.codeGenRequiredFieldForceCastRecoverySuggestion, + amplify_core.AmplifyExceptionMessages.codeGenRequiredFieldForceCastRecoverySuggestion, underlyingException: e.toString() ); } @@ -101,20 +99,20 @@ class Checkin extends Model { try { return _event!; } catch(e) { - throw new AmplifyCodeGenModelException( - AmplifyExceptionMessages.codeGenRequiredFieldForceCastExceptionMessage, + throw amplify_core.AmplifyCodeGenModelException( + amplify_core.AmplifyExceptionMessages.codeGenRequiredFieldForceCastExceptionMessage, recoverySuggestion: - AmplifyExceptionMessages.codeGenRequiredFieldForceCastRecoverySuggestion, + amplify_core.AmplifyExceptionMessages.codeGenRequiredFieldForceCastRecoverySuggestion, underlyingException: e.toString() ); } } - TemporalDateTime? get createdAt { + amplify_core.TemporalDateTime? get createdAt { return _createdAt; } - TemporalDateTime? get updatedAt { + amplify_core.TemporalDateTime? get updatedAt { return _updatedAt; } @@ -122,7 +120,7 @@ class Checkin extends Model { factory Checkin({String? id, required String createdBy, required String createdByName, required String user, required String userName, required Event event}) { return Checkin._internal( - id: id == null ? UUID.getUUID() : id, + id: id == null ? amplify_core.UUID.getUUID() : id, createdBy: createdBy, createdByName: createdByName, user: user, @@ -177,6 +175,24 @@ class Checkin extends Model { event: event ?? this.event); } + Checkin copyWithModelFieldValues({ + ModelFieldValue? id, + ModelFieldValue? createdBy, + ModelFieldValue? createdByName, + ModelFieldValue? user, + ModelFieldValue? userName, + ModelFieldValue? event + }) { + return Checkin._internal( + id: id == null ? this.id : id.value, + createdBy: createdBy == null ? this.createdBy : createdBy.value, + createdByName: createdByName == null ? this.createdByName : createdByName.value, + user: user == null ? this.user : user.value, + userName: userName == null ? this.userName : userName.value, + event: event == null ? this.event : event.value + ); + } + Checkin.fromJson(Map json) : id = json['id'], _createdBy = json['createdBy'], @@ -186,101 +202,108 @@ class Checkin extends Model { _event = json['event']?['serializedData'] != null ? Event.fromJson(new Map.from(json['event']['serializedData'])) : null, - _createdAt = json['createdAt'] != null ? TemporalDateTime.fromString(json['createdAt']) : null, - _updatedAt = json['updatedAt'] != null ? TemporalDateTime.fromString(json['updatedAt']) : null; + _createdAt = json['createdAt'] != null ? amplify_core.TemporalDateTime.fromString(json['createdAt']) : null, + _updatedAt = json['updatedAt'] != null ? amplify_core.TemporalDateTime.fromString(json['updatedAt']) : null; Map toJson() => { 'id': id, 'createdBy': _createdBy, 'createdByName': _createdByName, 'user': _user, 'userName': _userName, 'event': _event?.toJson(), 'createdAt': _createdAt?.format(), 'updatedAt': _updatedAt?.format() }; Map toMap() => { - 'id': id, 'createdBy': _createdBy, 'createdByName': _createdByName, 'user': _user, 'userName': _userName, 'event': _event, 'createdAt': _createdAt, 'updatedAt': _updatedAt + 'id': id, + 'createdBy': _createdBy, + 'createdByName': _createdByName, + 'user': _user, + 'userName': _userName, + 'event': _event, + 'createdAt': _createdAt, + 'updatedAt': _updatedAt }; - static final QueryField ID = QueryField(fieldName: "id"); - static final QueryField CREATEDBY = QueryField(fieldName: "createdBy"); - static final QueryField CREATEDBYNAME = QueryField(fieldName: "createdByName"); - static final QueryField USER = QueryField(fieldName: "user"); - static final QueryField USERNAME = QueryField(fieldName: "userName"); - static final QueryField EVENT = QueryField( + static final ID = amplify_core.QueryField(fieldName: "id"); + static final CREATEDBY = amplify_core.QueryField(fieldName: "createdBy"); + static final CREATEDBYNAME = amplify_core.QueryField(fieldName: "createdByName"); + static final USER = amplify_core.QueryField(fieldName: "user"); + static final USERNAME = amplify_core.QueryField(fieldName: "userName"); + static final EVENT = amplify_core.QueryField( fieldName: "event", - fieldType: ModelFieldType(ModelFieldTypeEnum.model, ofModelName: 'Event')); - static var schema = Model.defineSchema(define: (ModelSchemaDefinition modelSchemaDefinition) { + fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Event')); + static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { modelSchemaDefinition.name = "Checkin"; modelSchemaDefinition.pluralName = "Checkins"; modelSchemaDefinition.authRules = [ - AuthRule( - authStrategy: AuthStrategy.GROUPS, + amplify_core.AuthRule( + authStrategy: amplify_core.AuthStrategy.GROUPS, groupClaim: "cognito:groups", groups: [ "Administrator" ], - provider: AuthRuleProvider.USERPOOLS, - operations: [ - ModelOperation.READ, - ModelOperation.CREATE, - ModelOperation.UPDATE, - ModelOperation.DELETE + provider: amplify_core.AuthRuleProvider.USERPOOLS, + operations: const [ + amplify_core.ModelOperation.READ, + amplify_core.ModelOperation.CREATE, + amplify_core.ModelOperation.UPDATE, + amplify_core.ModelOperation.DELETE ]), - AuthRule( - authStrategy: AuthStrategy.PRIVATE, - operations: [ - ModelOperation.CREATE, - ModelOperation.READ, - ModelOperation.UPDATE, - ModelOperation.DELETE + amplify_core.AuthRule( + authStrategy: amplify_core.AuthStrategy.PRIVATE, + operations: const [ + amplify_core.ModelOperation.CREATE, + amplify_core.ModelOperation.READ, + amplify_core.ModelOperation.UPDATE, + amplify_core.ModelOperation.DELETE ]) ]; - modelSchemaDefinition.addField(ModelFieldDefinition.id()); + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); - modelSchemaDefinition.addField(ModelFieldDefinition.field( + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.field( key: Checkin.CREATEDBY, isRequired: true, - ofType: ModelFieldType(ModelFieldTypeEnum.string) + ofType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.string) )); - modelSchemaDefinition.addField(ModelFieldDefinition.field( + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.field( key: Checkin.CREATEDBYNAME, isRequired: true, - ofType: ModelFieldType(ModelFieldTypeEnum.string) + ofType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.string) )); - modelSchemaDefinition.addField(ModelFieldDefinition.field( + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.field( key: Checkin.USER, isRequired: true, - ofType: ModelFieldType(ModelFieldTypeEnum.string) + ofType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.string) )); - modelSchemaDefinition.addField(ModelFieldDefinition.field( + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.field( key: Checkin.USERNAME, isRequired: true, - ofType: ModelFieldType(ModelFieldTypeEnum.string) + ofType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.string) )); - modelSchemaDefinition.addField(ModelFieldDefinition.belongsTo( + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.belongsTo( key: Checkin.EVENT, isRequired: true, targetName: 'eventCheckinsId', ofModelName: 'Event' )); - modelSchemaDefinition.addField(ModelFieldDefinition.nonQueryField( + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.nonQueryField( fieldName: 'createdAt', isRequired: false, isReadOnly: true, - ofType: ModelFieldType(ModelFieldTypeEnum.dateTime) + ofType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.dateTime) )); - modelSchemaDefinition.addField(ModelFieldDefinition.nonQueryField( + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.nonQueryField( fieldName: 'updatedAt', isRequired: false, isReadOnly: true, - ofType: ModelFieldType(ModelFieldTypeEnum.dateTime) + ofType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.dateTime) )); }); } -class _CheckinModelType extends ModelType { +class _CheckinModelType extends amplify_core.ModelType { const _CheckinModelType(); @override diff --git a/lib/models/ClaimShirt.dart b/lib/models/ClaimShirt.dart index ca66d53..a3d7038 100644 --- a/lib/models/ClaimShirt.dart +++ b/lib/models/ClaimShirt.dart @@ -19,19 +19,18 @@ // 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'; -import 'package:flutter/foundation.dart'; +import 'ModelProvider.dart'; +import 'package:amplify_core/amplify_core.dart' as amplify_core; /** This is an auto generated class representing the ClaimShirt type in your schema. */ -@immutable -class ClaimShirt extends Model { +class ClaimShirt extends amplify_core.Model { static const classType = const _ClaimShirtModelType(); final String id; final String? _userID; final String? _userName; - final TemporalDateTime? _createdAt; - final TemporalDateTime? _updatedAt; + final amplify_core.TemporalDateTime? _createdAt; + final amplify_core.TemporalDateTime? _updatedAt; @override getInstanceType() => classType; @@ -45,10 +44,10 @@ class ClaimShirt extends Model { try { return _userID!; } catch(e) { - throw new AmplifyCodeGenModelException( - AmplifyExceptionMessages.codeGenRequiredFieldForceCastExceptionMessage, + throw amplify_core.AmplifyCodeGenModelException( + amplify_core.AmplifyExceptionMessages.codeGenRequiredFieldForceCastExceptionMessage, recoverySuggestion: - AmplifyExceptionMessages.codeGenRequiredFieldForceCastRecoverySuggestion, + amplify_core.AmplifyExceptionMessages.codeGenRequiredFieldForceCastRecoverySuggestion, underlyingException: e.toString() ); } @@ -58,20 +57,20 @@ class ClaimShirt extends Model { try { return _userName!; } catch(e) { - throw new AmplifyCodeGenModelException( - AmplifyExceptionMessages.codeGenRequiredFieldForceCastExceptionMessage, + throw amplify_core.AmplifyCodeGenModelException( + amplify_core.AmplifyExceptionMessages.codeGenRequiredFieldForceCastExceptionMessage, recoverySuggestion: - AmplifyExceptionMessages.codeGenRequiredFieldForceCastRecoverySuggestion, + amplify_core.AmplifyExceptionMessages.codeGenRequiredFieldForceCastRecoverySuggestion, underlyingException: e.toString() ); } } - TemporalDateTime? get createdAt { + amplify_core.TemporalDateTime? get createdAt { return _createdAt; } - TemporalDateTime? get updatedAt { + amplify_core.TemporalDateTime? get updatedAt { return _updatedAt; } @@ -79,7 +78,7 @@ class ClaimShirt extends Model { factory ClaimShirt({String? id, required String userID, required String userName}) { return ClaimShirt._internal( - id: id == null ? UUID.getUUID() : id, + id: id == null ? amplify_core.UUID.getUUID() : id, userID: userID, userName: userName); } @@ -122,79 +121,95 @@ class ClaimShirt extends Model { userName: userName ?? this.userName); } + ClaimShirt copyWithModelFieldValues({ + ModelFieldValue? id, + ModelFieldValue? userID, + ModelFieldValue? userName + }) { + return ClaimShirt._internal( + id: id == null ? this.id : id.value, + userID: userID == null ? this.userID : userID.value, + userName: userName == null ? this.userName : userName.value + ); + } + ClaimShirt.fromJson(Map json) : id = json['id'], _userID = json['userID'], _userName = json['userName'], - _createdAt = json['createdAt'] != null ? TemporalDateTime.fromString(json['createdAt']) : null, - _updatedAt = json['updatedAt'] != null ? TemporalDateTime.fromString(json['updatedAt']) : null; + _createdAt = json['createdAt'] != null ? amplify_core.TemporalDateTime.fromString(json['createdAt']) : null, + _updatedAt = json['updatedAt'] != null ? amplify_core.TemporalDateTime.fromString(json['updatedAt']) : null; Map toJson() => { 'id': id, 'userID': _userID, 'userName': _userName, 'createdAt': _createdAt?.format(), 'updatedAt': _updatedAt?.format() }; Map toMap() => { - 'id': id, 'userID': _userID, 'userName': _userName, 'createdAt': _createdAt, 'updatedAt': _updatedAt + 'id': id, + 'userID': _userID, + 'userName': _userName, + 'createdAt': _createdAt, + 'updatedAt': _updatedAt }; - static final QueryField ID = QueryField(fieldName: "id"); - static final QueryField USERID = QueryField(fieldName: "userID"); - static final QueryField USERNAME = QueryField(fieldName: "userName"); - static var schema = Model.defineSchema(define: (ModelSchemaDefinition modelSchemaDefinition) { + static final ID = amplify_core.QueryField(fieldName: "id"); + static final USERID = amplify_core.QueryField(fieldName: "userID"); + static final USERNAME = amplify_core.QueryField(fieldName: "userName"); + static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { modelSchemaDefinition.name = "ClaimShirt"; modelSchemaDefinition.pluralName = "ClaimShirts"; modelSchemaDefinition.authRules = [ - AuthRule( - authStrategy: AuthStrategy.GROUPS, + amplify_core.AuthRule( + authStrategy: amplify_core.AuthStrategy.GROUPS, groupClaim: "cognito:groups", groups: [ "Administrator" ], - provider: AuthRuleProvider.USERPOOLS, - operations: [ - ModelOperation.READ, - ModelOperation.CREATE, - ModelOperation.UPDATE, - ModelOperation.DELETE + provider: amplify_core.AuthRuleProvider.USERPOOLS, + operations: const [ + amplify_core.ModelOperation.READ, + amplify_core.ModelOperation.CREATE, + amplify_core.ModelOperation.UPDATE, + amplify_core.ModelOperation.DELETE ]), - AuthRule( - authStrategy: AuthStrategy.PRIVATE, - operations: [ - ModelOperation.READ, - ModelOperation.CREATE + amplify_core.AuthRule( + authStrategy: amplify_core.AuthStrategy.PRIVATE, + operations: const [ + amplify_core.ModelOperation.READ, + amplify_core.ModelOperation.CREATE ]) ]; - modelSchemaDefinition.addField(ModelFieldDefinition.id()); + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); - modelSchemaDefinition.addField(ModelFieldDefinition.field( + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.field( key: ClaimShirt.USERID, isRequired: true, - ofType: ModelFieldType(ModelFieldTypeEnum.string) + ofType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.string) )); - modelSchemaDefinition.addField(ModelFieldDefinition.field( + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.field( key: ClaimShirt.USERNAME, isRequired: true, - ofType: ModelFieldType(ModelFieldTypeEnum.string) + ofType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.string) )); - modelSchemaDefinition.addField(ModelFieldDefinition.nonQueryField( + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.nonQueryField( fieldName: 'createdAt', isRequired: false, isReadOnly: true, - ofType: ModelFieldType(ModelFieldTypeEnum.dateTime) + ofType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.dateTime) )); - modelSchemaDefinition.addField(ModelFieldDefinition.nonQueryField( + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.nonQueryField( fieldName: 'updatedAt', isRequired: false, isReadOnly: true, - ofType: ModelFieldType(ModelFieldTypeEnum.dateTime) + ofType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.dateTime) )); }); } -class _ClaimShirtModelType extends ModelType { +class _ClaimShirtModelType extends amplify_core.ModelType { const _ClaimShirtModelType(); @override diff --git a/lib/models/Event.dart b/lib/models/Event.dart index a5e842d..ea4a287 100644 --- a/lib/models/Event.dart +++ b/lib/models/Event.dart @@ -20,14 +20,12 @@ // 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'; +import 'package:amplify_core/amplify_core.dart' as amplify_core; import 'package:collection/collection.dart'; -import 'package:flutter/foundation.dart'; /** This is an auto generated class representing the Event type in your schema. */ -@immutable -class Event extends Model { +class Event extends amplify_core.Model { static const classType = const _EventModelType(); final String id; final String? _name; @@ -35,13 +33,13 @@ class Event extends Model { final bool? _status; final bool? _requireRSVP; final bool? _canRSVP; - final TemporalDateTime? _start; - final TemporalDateTime? _end; + final amplify_core.TemporalDateTime? _start; + final amplify_core.TemporalDateTime? _end; final String? _location; final int? _points; final List? _checkins; - final TemporalDateTime? _createdAt; - final TemporalDateTime? _updatedAt; + final amplify_core.TemporalDateTime? _createdAt; + final amplify_core.TemporalDateTime? _updatedAt; @override getInstanceType() => classType; @@ -55,10 +53,10 @@ class Event extends Model { try { return _name!; } catch(e) { - throw new AmplifyCodeGenModelException( - AmplifyExceptionMessages.codeGenRequiredFieldForceCastExceptionMessage, + throw amplify_core.AmplifyCodeGenModelException( + amplify_core.AmplifyExceptionMessages.codeGenRequiredFieldForceCastExceptionMessage, recoverySuggestion: - AmplifyExceptionMessages.codeGenRequiredFieldForceCastRecoverySuggestion, + amplify_core.AmplifyExceptionMessages.codeGenRequiredFieldForceCastRecoverySuggestion, underlyingException: e.toString() ); } @@ -80,11 +78,11 @@ class Event extends Model { return _canRSVP; } - TemporalDateTime? get start { + amplify_core.TemporalDateTime? get start { return _start; } - TemporalDateTime? get end { + amplify_core.TemporalDateTime? get end { return _end; } @@ -100,19 +98,19 @@ class Event extends Model { return _checkins; } - TemporalDateTime? get createdAt { + amplify_core.TemporalDateTime? get createdAt { return _createdAt; } - TemporalDateTime? get updatedAt { + amplify_core.TemporalDateTime? get updatedAt { return _updatedAt; } const Event._internal({required this.id, required name, description, status, requireRSVP, canRSVP, start, end, location, points, checkins, createdAt, updatedAt}): _name = name, _description = description, _status = status, _requireRSVP = requireRSVP, _canRSVP = canRSVP, _start = start, _end = end, _location = location, _points = points, _checkins = checkins, _createdAt = createdAt, _updatedAt = updatedAt; - factory Event({String? id, required String name, String? description, bool? status, bool? requireRSVP, bool? canRSVP, TemporalDateTime? start, TemporalDateTime? end, String? location, int? points, List? checkins}) { + factory Event({String? id, required String name, String? description, bool? status, bool? requireRSVP, bool? canRSVP, amplify_core.TemporalDateTime? start, amplify_core.TemporalDateTime? end, String? location, int? points, List? checkins}) { return Event._internal( - id: id == null ? UUID.getUUID() : id, + id: id == null ? amplify_core.UUID.getUUID() : id, name: name, description: description, status: status, @@ -171,7 +169,7 @@ class Event extends Model { return buffer.toString(); } - Event copyWith({String? id, String? name, String? description, bool? status, bool? requireRSVP, bool? canRSVP, TemporalDateTime? start, TemporalDateTime? end, String? location, int? points, List? checkins}) { + Event copyWith({String? id, String? name, String? description, bool? status, bool? requireRSVP, bool? canRSVP, amplify_core.TemporalDateTime? start, amplify_core.TemporalDateTime? end, String? location, int? points, List? checkins}) { return Event._internal( id: id ?? this.id, name: name ?? this.name, @@ -186,6 +184,34 @@ class Event extends Model { checkins: checkins ?? this.checkins); } + Event copyWithModelFieldValues({ + ModelFieldValue? id, + ModelFieldValue? name, + ModelFieldValue? description, + ModelFieldValue? status, + ModelFieldValue? requireRSVP, + ModelFieldValue? canRSVP, + ModelFieldValue? start, + ModelFieldValue? end, + ModelFieldValue? location, + ModelFieldValue? points, + ModelFieldValue?>? checkins + }) { + return Event._internal( + id: id == null ? this.id : id.value, + name: name == null ? this.name : name.value, + description: description == null ? this.description : description.value, + status: status == null ? this.status : status.value, + requireRSVP: requireRSVP == null ? this.requireRSVP : requireRSVP.value, + canRSVP: canRSVP == null ? this.canRSVP : canRSVP.value, + start: start == null ? this.start : start.value, + end: end == null ? this.end : end.value, + location: location == null ? this.location : location.value, + points: points == null ? this.points : points.value, + checkins: checkins == null ? this.checkins : checkins.value + ); + } + Event.fromJson(Map json) : id = json['id'], _name = json['name'], @@ -193,8 +219,8 @@ class Event extends Model { _status = json['status'], _requireRSVP = json['requireRSVP'], _canRSVP = json['canRSVP'], - _start = json['start'] != null ? TemporalDateTime.fromString(json['start']) : null, - _end = json['end'] != null ? TemporalDateTime.fromString(json['end']) : null, + _start = json['start'] != null ? amplify_core.TemporalDateTime.fromString(json['start']) : null, + _end = json['end'] != null ? amplify_core.TemporalDateTime.fromString(json['end']) : null, _location = json['location'], _points = (json['points'] as num?)?.toInt(), _checkins = json['checkins'] is List @@ -203,133 +229,145 @@ class Event extends Model { .map((e) => Checkin.fromJson(new Map.from(e['serializedData']))) .toList() : null, - _createdAt = json['createdAt'] != null ? TemporalDateTime.fromString(json['createdAt']) : null, - _updatedAt = json['updatedAt'] != null ? TemporalDateTime.fromString(json['updatedAt']) : null; + _createdAt = json['createdAt'] != null ? amplify_core.TemporalDateTime.fromString(json['createdAt']) : null, + _updatedAt = json['updatedAt'] != null ? amplify_core.TemporalDateTime.fromString(json['updatedAt']) : null; Map toJson() => { 'id': id, 'name': _name, 'description': _description, 'status': _status, 'requireRSVP': _requireRSVP, 'canRSVP': _canRSVP, 'start': _start?.format(), 'end': _end?.format(), 'location': _location, 'points': _points, 'checkins': _checkins?.map((Checkin? e) => e?.toJson()).toList(), 'createdAt': _createdAt?.format(), 'updatedAt': _updatedAt?.format() }; Map toMap() => { - 'id': id, 'name': _name, 'description': _description, 'status': _status, 'requireRSVP': _requireRSVP, 'canRSVP': _canRSVP, 'start': _start, 'end': _end, 'location': _location, 'points': _points, 'checkins': _checkins, 'createdAt': _createdAt, 'updatedAt': _updatedAt + 'id': id, + 'name': _name, + 'description': _description, + 'status': _status, + 'requireRSVP': _requireRSVP, + 'canRSVP': _canRSVP, + 'start': _start, + 'end': _end, + 'location': _location, + 'points': _points, + 'checkins': _checkins, + 'createdAt': _createdAt, + 'updatedAt': _updatedAt }; - static final QueryField ID = QueryField(fieldName: "id"); - static final QueryField NAME = QueryField(fieldName: "name"); - static final QueryField DESCRIPTION = QueryField(fieldName: "description"); - static final QueryField STATUS = QueryField(fieldName: "status"); - static final QueryField REQUIRERSVP = QueryField(fieldName: "requireRSVP"); - static final QueryField CANRSVP = QueryField(fieldName: "canRSVP"); - static final QueryField START = QueryField(fieldName: "start"); - static final QueryField END = QueryField(fieldName: "end"); - static final QueryField LOCATION = QueryField(fieldName: "location"); - static final QueryField POINTS = QueryField(fieldName: "points"); - static final QueryField CHECKINS = QueryField( + static final ID = amplify_core.QueryField(fieldName: "id"); + static final NAME = amplify_core.QueryField(fieldName: "name"); + static final DESCRIPTION = amplify_core.QueryField(fieldName: "description"); + static final STATUS = amplify_core.QueryField(fieldName: "status"); + static final REQUIRERSVP = amplify_core.QueryField(fieldName: "requireRSVP"); + static final CANRSVP = amplify_core.QueryField(fieldName: "canRSVP"); + static final START = amplify_core.QueryField(fieldName: "start"); + static final END = amplify_core.QueryField(fieldName: "end"); + static final LOCATION = amplify_core.QueryField(fieldName: "location"); + static final POINTS = amplify_core.QueryField(fieldName: "points"); + static final CHECKINS = amplify_core.QueryField( fieldName: "checkins", - fieldType: ModelFieldType(ModelFieldTypeEnum.model, ofModelName: 'Checkin')); - static var schema = Model.defineSchema(define: (ModelSchemaDefinition modelSchemaDefinition) { + fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Checkin')); + static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { modelSchemaDefinition.name = "Event"; modelSchemaDefinition.pluralName = "Events"; modelSchemaDefinition.authRules = [ - AuthRule( - authStrategy: AuthStrategy.GROUPS, + amplify_core.AuthRule( + authStrategy: amplify_core.AuthStrategy.GROUPS, groupClaim: "cognito:groups", groups: [ "Administrator" ], - provider: AuthRuleProvider.USERPOOLS, - operations: [ - ModelOperation.READ, - ModelOperation.CREATE, - ModelOperation.UPDATE, - ModelOperation.DELETE + provider: amplify_core.AuthRuleProvider.USERPOOLS, + operations: const [ + amplify_core.ModelOperation.READ, + amplify_core.ModelOperation.CREATE, + amplify_core.ModelOperation.UPDATE, + amplify_core.ModelOperation.DELETE ]), - AuthRule( - authStrategy: AuthStrategy.PRIVATE, - operations: [ - ModelOperation.READ + amplify_core.AuthRule( + authStrategy: amplify_core.AuthStrategy.PRIVATE, + operations: const [ + amplify_core.ModelOperation.READ ]) ]; - modelSchemaDefinition.addField(ModelFieldDefinition.id()); + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); - modelSchemaDefinition.addField(ModelFieldDefinition.field( + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.field( key: Event.NAME, isRequired: true, - ofType: ModelFieldType(ModelFieldTypeEnum.string) + ofType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.string) )); - modelSchemaDefinition.addField(ModelFieldDefinition.field( + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.field( key: Event.DESCRIPTION, isRequired: false, - ofType: ModelFieldType(ModelFieldTypeEnum.string) + ofType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.string) )); - modelSchemaDefinition.addField(ModelFieldDefinition.field( + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.field( key: Event.STATUS, isRequired: false, - ofType: ModelFieldType(ModelFieldTypeEnum.bool) + ofType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.bool) )); - modelSchemaDefinition.addField(ModelFieldDefinition.field( + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.field( key: Event.REQUIRERSVP, isRequired: false, - ofType: ModelFieldType(ModelFieldTypeEnum.bool) + ofType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.bool) )); - modelSchemaDefinition.addField(ModelFieldDefinition.field( + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.field( key: Event.CANRSVP, isRequired: false, - ofType: ModelFieldType(ModelFieldTypeEnum.bool) + ofType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.bool) )); - modelSchemaDefinition.addField(ModelFieldDefinition.field( + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.field( key: Event.START, isRequired: false, - ofType: ModelFieldType(ModelFieldTypeEnum.dateTime) + ofType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.dateTime) )); - modelSchemaDefinition.addField(ModelFieldDefinition.field( + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.field( key: Event.END, isRequired: false, - ofType: ModelFieldType(ModelFieldTypeEnum.dateTime) + ofType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.dateTime) )); - modelSchemaDefinition.addField(ModelFieldDefinition.field( + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.field( key: Event.LOCATION, isRequired: false, - ofType: ModelFieldType(ModelFieldTypeEnum.string) + ofType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.string) )); - modelSchemaDefinition.addField(ModelFieldDefinition.field( + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.field( key: Event.POINTS, isRequired: false, - ofType: ModelFieldType(ModelFieldTypeEnum.int) + ofType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.int) )); - modelSchemaDefinition.addField(ModelFieldDefinition.hasMany( + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.hasMany( key: Event.CHECKINS, isRequired: false, ofModelName: 'Checkin', associatedKey: Checkin.EVENT )); - modelSchemaDefinition.addField(ModelFieldDefinition.nonQueryField( + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.nonQueryField( fieldName: 'createdAt', isRequired: false, isReadOnly: true, - ofType: ModelFieldType(ModelFieldTypeEnum.dateTime) + ofType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.dateTime) )); - modelSchemaDefinition.addField(ModelFieldDefinition.nonQueryField( + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.nonQueryField( fieldName: 'updatedAt', isRequired: false, isReadOnly: true, - ofType: ModelFieldType(ModelFieldTypeEnum.dateTime) + ofType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.dateTime) )); }); } -class _EventModelType extends ModelType { +class _EventModelType extends amplify_core.ModelType { const _EventModelType(); @override diff --git a/lib/models/EventRSVP.dart b/lib/models/EventRSVP.dart index bebb42a..302bf74 100644 --- a/lib/models/EventRSVP.dart +++ b/lib/models/EventRSVP.dart @@ -19,20 +19,19 @@ // 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'; -import 'package:flutter/foundation.dart'; +import 'ModelProvider.dart'; +import 'package:amplify_core/amplify_core.dart' as amplify_core; /** This is an auto generated class representing the EventRSVP type in your schema. */ -@immutable -class EventRSVP extends Model { +class EventRSVP extends amplify_core.Model { static const classType = const _EventRSVPModelType(); final String id; final String? _userID; final String? _userName; final String? _eventID; - final TemporalDateTime? _createdAt; - final TemporalDateTime? _updatedAt; + final amplify_core.TemporalDateTime? _createdAt; + final amplify_core.TemporalDateTime? _updatedAt; @override getInstanceType() => classType; @@ -46,10 +45,10 @@ class EventRSVP extends Model { try { return _userID!; } catch(e) { - throw new AmplifyCodeGenModelException( - AmplifyExceptionMessages.codeGenRequiredFieldForceCastExceptionMessage, + throw amplify_core.AmplifyCodeGenModelException( + amplify_core.AmplifyExceptionMessages.codeGenRequiredFieldForceCastExceptionMessage, recoverySuggestion: - AmplifyExceptionMessages.codeGenRequiredFieldForceCastRecoverySuggestion, + amplify_core.AmplifyExceptionMessages.codeGenRequiredFieldForceCastRecoverySuggestion, underlyingException: e.toString() ); } @@ -59,10 +58,10 @@ class EventRSVP extends Model { try { return _userName!; } catch(e) { - throw new AmplifyCodeGenModelException( - AmplifyExceptionMessages.codeGenRequiredFieldForceCastExceptionMessage, + throw amplify_core.AmplifyCodeGenModelException( + amplify_core.AmplifyExceptionMessages.codeGenRequiredFieldForceCastExceptionMessage, recoverySuggestion: - AmplifyExceptionMessages.codeGenRequiredFieldForceCastRecoverySuggestion, + amplify_core.AmplifyExceptionMessages.codeGenRequiredFieldForceCastRecoverySuggestion, underlyingException: e.toString() ); } @@ -72,20 +71,20 @@ class EventRSVP extends Model { try { return _eventID!; } catch(e) { - throw new AmplifyCodeGenModelException( - AmplifyExceptionMessages.codeGenRequiredFieldForceCastExceptionMessage, + throw amplify_core.AmplifyCodeGenModelException( + amplify_core.AmplifyExceptionMessages.codeGenRequiredFieldForceCastExceptionMessage, recoverySuggestion: - AmplifyExceptionMessages.codeGenRequiredFieldForceCastRecoverySuggestion, + amplify_core.AmplifyExceptionMessages.codeGenRequiredFieldForceCastRecoverySuggestion, underlyingException: e.toString() ); } } - TemporalDateTime? get createdAt { + amplify_core.TemporalDateTime? get createdAt { return _createdAt; } - TemporalDateTime? get updatedAt { + amplify_core.TemporalDateTime? get updatedAt { return _updatedAt; } @@ -93,7 +92,7 @@ class EventRSVP extends Model { factory EventRSVP({String? id, required String userID, required String userName, required String eventID}) { return EventRSVP._internal( - id: id == null ? UUID.getUUID() : id, + id: id == null ? amplify_core.UUID.getUUID() : id, userID: userID, userName: userName, eventID: eventID); @@ -140,92 +139,111 @@ class EventRSVP extends Model { eventID: eventID ?? this.eventID); } + EventRSVP copyWithModelFieldValues({ + ModelFieldValue? id, + ModelFieldValue? userID, + ModelFieldValue? userName, + ModelFieldValue? eventID + }) { + return EventRSVP._internal( + id: id == null ? this.id : id.value, + userID: userID == null ? this.userID : userID.value, + userName: userName == null ? this.userName : userName.value, + eventID: eventID == null ? this.eventID : eventID.value + ); + } + EventRSVP.fromJson(Map json) : id = json['id'], _userID = json['userID'], _userName = json['userName'], _eventID = json['eventID'], - _createdAt = json['createdAt'] != null ? TemporalDateTime.fromString(json['createdAt']) : null, - _updatedAt = json['updatedAt'] != null ? TemporalDateTime.fromString(json['updatedAt']) : null; + _createdAt = json['createdAt'] != null ? amplify_core.TemporalDateTime.fromString(json['createdAt']) : null, + _updatedAt = json['updatedAt'] != null ? amplify_core.TemporalDateTime.fromString(json['updatedAt']) : null; Map toJson() => { 'id': id, 'userID': _userID, 'userName': _userName, 'eventID': _eventID, 'createdAt': _createdAt?.format(), 'updatedAt': _updatedAt?.format() }; Map toMap() => { - 'id': id, 'userID': _userID, 'userName': _userName, 'eventID': _eventID, 'createdAt': _createdAt, 'updatedAt': _updatedAt + 'id': id, + 'userID': _userID, + 'userName': _userName, + 'eventID': _eventID, + 'createdAt': _createdAt, + 'updatedAt': _updatedAt }; - static final QueryField ID = QueryField(fieldName: "id"); - static final QueryField USERID = QueryField(fieldName: "userID"); - static final QueryField USERNAME = QueryField(fieldName: "userName"); - static final QueryField EVENTID = QueryField(fieldName: "eventID"); - static var schema = Model.defineSchema(define: (ModelSchemaDefinition modelSchemaDefinition) { + static final ID = amplify_core.QueryField(fieldName: "id"); + static final USERID = amplify_core.QueryField(fieldName: "userID"); + static final USERNAME = amplify_core.QueryField(fieldName: "userName"); + static final EVENTID = amplify_core.QueryField(fieldName: "eventID"); + static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { modelSchemaDefinition.name = "EventRSVP"; modelSchemaDefinition.pluralName = "EventRSVPS"; modelSchemaDefinition.authRules = [ - AuthRule( - authStrategy: AuthStrategy.GROUPS, + amplify_core.AuthRule( + authStrategy: amplify_core.AuthStrategy.GROUPS, groupClaim: "cognito:groups", groups: [ "Administrator" ], - provider: AuthRuleProvider.USERPOOLS, - operations: [ - ModelOperation.READ, - ModelOperation.CREATE, - ModelOperation.UPDATE, - ModelOperation.DELETE + provider: amplify_core.AuthRuleProvider.USERPOOLS, + operations: const [ + amplify_core.ModelOperation.READ, + amplify_core.ModelOperation.CREATE, + amplify_core.ModelOperation.UPDATE, + amplify_core.ModelOperation.DELETE ]), - AuthRule( - authStrategy: AuthStrategy.OWNER, + amplify_core.AuthRule( + authStrategy: amplify_core.AuthStrategy.OWNER, ownerField: "owner", identityClaim: "cognito:username", - provider: AuthRuleProvider.USERPOOLS, - operations: [ - ModelOperation.READ, - ModelOperation.CREATE, - ModelOperation.UPDATE, - ModelOperation.DELETE + provider: amplify_core.AuthRuleProvider.USERPOOLS, + operations: const [ + amplify_core.ModelOperation.READ, + amplify_core.ModelOperation.CREATE, + amplify_core.ModelOperation.UPDATE, + amplify_core.ModelOperation.DELETE ]) ]; - modelSchemaDefinition.addField(ModelFieldDefinition.id()); + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); - modelSchemaDefinition.addField(ModelFieldDefinition.field( + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.field( key: EventRSVP.USERID, isRequired: true, - ofType: ModelFieldType(ModelFieldTypeEnum.string) + ofType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.string) )); - modelSchemaDefinition.addField(ModelFieldDefinition.field( + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.field( key: EventRSVP.USERNAME, isRequired: true, - ofType: ModelFieldType(ModelFieldTypeEnum.string) + ofType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.string) )); - modelSchemaDefinition.addField(ModelFieldDefinition.field( + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.field( key: EventRSVP.EVENTID, isRequired: true, - ofType: ModelFieldType(ModelFieldTypeEnum.string) + ofType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.string) )); - modelSchemaDefinition.addField(ModelFieldDefinition.nonQueryField( + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.nonQueryField( fieldName: 'createdAt', isRequired: false, isReadOnly: true, - ofType: ModelFieldType(ModelFieldTypeEnum.dateTime) + ofType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.dateTime) )); - modelSchemaDefinition.addField(ModelFieldDefinition.nonQueryField( + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.nonQueryField( fieldName: 'updatedAt', isRequired: false, isReadOnly: true, - ofType: ModelFieldType(ModelFieldTypeEnum.dateTime) + ofType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.dateTime) )); }); } -class _EventRSVPModelType extends ModelType { +class _EventRSVPModelType extends amplify_core.ModelType { const _EventRSVPModelType(); @override diff --git a/lib/models/Log.dart b/lib/models/Log.dart index 00153af..307aa5d 100644 --- a/lib/models/Log.dart +++ b/lib/models/Log.dart @@ -19,22 +19,21 @@ // 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'; -import 'package:flutter/foundation.dart'; +import 'ModelProvider.dart'; +import 'package:amplify_core/amplify_core.dart' as amplify_core; /** This is an auto generated class representing the Log type in your schema. */ -@immutable -class Log extends Model { +class Log extends amplify_core.Model { static const classType = const _LogModelType(); final String id; final String? _userID; final String? _userName; final String? _type; final String? _message; - final TemporalDateTime? _timestamp; - final TemporalDateTime? _createdAt; - final TemporalDateTime? _updatedAt; + final amplify_core.TemporalDateTime? _timestamp; + final amplify_core.TemporalDateTime? _createdAt; + final amplify_core.TemporalDateTime? _updatedAt; @override getInstanceType() => classType; @@ -48,10 +47,10 @@ class Log extends Model { try { return _userID!; } catch(e) { - throw new AmplifyCodeGenModelException( - AmplifyExceptionMessages.codeGenRequiredFieldForceCastExceptionMessage, + throw amplify_core.AmplifyCodeGenModelException( + amplify_core.AmplifyExceptionMessages.codeGenRequiredFieldForceCastExceptionMessage, recoverySuggestion: - AmplifyExceptionMessages.codeGenRequiredFieldForceCastRecoverySuggestion, + amplify_core.AmplifyExceptionMessages.codeGenRequiredFieldForceCastRecoverySuggestion, underlyingException: e.toString() ); } @@ -61,10 +60,10 @@ class Log extends Model { try { return _userName!; } catch(e) { - throw new AmplifyCodeGenModelException( - AmplifyExceptionMessages.codeGenRequiredFieldForceCastExceptionMessage, + throw amplify_core.AmplifyCodeGenModelException( + amplify_core.AmplifyExceptionMessages.codeGenRequiredFieldForceCastExceptionMessage, recoverySuggestion: - AmplifyExceptionMessages.codeGenRequiredFieldForceCastRecoverySuggestion, + amplify_core.AmplifyExceptionMessages.codeGenRequiredFieldForceCastRecoverySuggestion, underlyingException: e.toString() ); } @@ -74,10 +73,10 @@ class Log extends Model { try { return _type!; } catch(e) { - throw new AmplifyCodeGenModelException( - AmplifyExceptionMessages.codeGenRequiredFieldForceCastExceptionMessage, + throw amplify_core.AmplifyCodeGenModelException( + amplify_core.AmplifyExceptionMessages.codeGenRequiredFieldForceCastExceptionMessage, recoverySuggestion: - AmplifyExceptionMessages.codeGenRequiredFieldForceCastRecoverySuggestion, + amplify_core.AmplifyExceptionMessages.codeGenRequiredFieldForceCastRecoverySuggestion, underlyingException: e.toString() ); } @@ -87,41 +86,41 @@ class Log extends Model { try { return _message!; } catch(e) { - throw new AmplifyCodeGenModelException( - AmplifyExceptionMessages.codeGenRequiredFieldForceCastExceptionMessage, + throw amplify_core.AmplifyCodeGenModelException( + amplify_core.AmplifyExceptionMessages.codeGenRequiredFieldForceCastExceptionMessage, recoverySuggestion: - AmplifyExceptionMessages.codeGenRequiredFieldForceCastRecoverySuggestion, + amplify_core.AmplifyExceptionMessages.codeGenRequiredFieldForceCastRecoverySuggestion, underlyingException: e.toString() ); } } - TemporalDateTime get timestamp { + amplify_core.TemporalDateTime get timestamp { try { return _timestamp!; } catch(e) { - throw new AmplifyCodeGenModelException( - AmplifyExceptionMessages.codeGenRequiredFieldForceCastExceptionMessage, + throw amplify_core.AmplifyCodeGenModelException( + amplify_core.AmplifyExceptionMessages.codeGenRequiredFieldForceCastExceptionMessage, recoverySuggestion: - AmplifyExceptionMessages.codeGenRequiredFieldForceCastRecoverySuggestion, + amplify_core.AmplifyExceptionMessages.codeGenRequiredFieldForceCastRecoverySuggestion, underlyingException: e.toString() ); } } - TemporalDateTime? get createdAt { + amplify_core.TemporalDateTime? get createdAt { return _createdAt; } - TemporalDateTime? get updatedAt { + amplify_core.TemporalDateTime? get updatedAt { return _updatedAt; } const Log._internal({required this.id, required userID, required userName, required type, required message, required timestamp, createdAt, updatedAt}): _userID = userID, _userName = userName, _type = type, _message = message, _timestamp = timestamp, _createdAt = createdAt, _updatedAt = updatedAt; - factory Log({String? id, required String userID, required String userName, required String type, required String message, required TemporalDateTime timestamp}) { + factory Log({String? id, required String userID, required String userName, required String type, required String message, required amplify_core.TemporalDateTime timestamp}) { return Log._internal( - id: id == null ? UUID.getUUID() : id, + id: id == null ? amplify_core.UUID.getUUID() : id, userID: userID, userName: userName, type: type, @@ -166,7 +165,7 @@ class Log extends Model { return buffer.toString(); } - Log copyWith({String? id, String? userID, String? userName, String? type, String? message, TemporalDateTime? timestamp}) { + Log copyWith({String? id, String? userID, String? userName, String? type, String? message, amplify_core.TemporalDateTime? timestamp}) { return Log._internal( id: id ?? this.id, userID: userID ?? this.userID, @@ -176,103 +175,128 @@ class Log extends Model { timestamp: timestamp ?? this.timestamp); } + Log copyWithModelFieldValues({ + ModelFieldValue? id, + ModelFieldValue? userID, + ModelFieldValue? userName, + ModelFieldValue? type, + ModelFieldValue? message, + ModelFieldValue? timestamp + }) { + return Log._internal( + id: id == null ? this.id : id.value, + userID: userID == null ? this.userID : userID.value, + userName: userName == null ? this.userName : userName.value, + type: type == null ? this.type : type.value, + message: message == null ? this.message : message.value, + timestamp: timestamp == null ? this.timestamp : timestamp.value + ); + } + Log.fromJson(Map json) : id = json['id'], _userID = json['userID'], _userName = json['userName'], _type = json['type'], _message = json['message'], - _timestamp = json['timestamp'] != null ? TemporalDateTime.fromString(json['timestamp']) : null, - _createdAt = json['createdAt'] != null ? TemporalDateTime.fromString(json['createdAt']) : null, - _updatedAt = json['updatedAt'] != null ? TemporalDateTime.fromString(json['updatedAt']) : null; + _timestamp = json['timestamp'] != null ? amplify_core.TemporalDateTime.fromString(json['timestamp']) : null, + _createdAt = json['createdAt'] != null ? amplify_core.TemporalDateTime.fromString(json['createdAt']) : null, + _updatedAt = json['updatedAt'] != null ? amplify_core.TemporalDateTime.fromString(json['updatedAt']) : null; Map toJson() => { 'id': id, 'userID': _userID, 'userName': _userName, 'type': _type, 'message': _message, 'timestamp': _timestamp?.format(), 'createdAt': _createdAt?.format(), 'updatedAt': _updatedAt?.format() }; Map toMap() => { - 'id': id, 'userID': _userID, 'userName': _userName, 'type': _type, 'message': _message, 'timestamp': _timestamp, 'createdAt': _createdAt, 'updatedAt': _updatedAt + 'id': id, + 'userID': _userID, + 'userName': _userName, + 'type': _type, + 'message': _message, + 'timestamp': _timestamp, + 'createdAt': _createdAt, + 'updatedAt': _updatedAt }; - static final QueryField ID = QueryField(fieldName: "id"); - static final QueryField USERID = QueryField(fieldName: "userID"); - static final QueryField USERNAME = QueryField(fieldName: "userName"); - static final QueryField TYPE = QueryField(fieldName: "type"); - static final QueryField MESSAGE = QueryField(fieldName: "message"); - static final QueryField TIMESTAMP = QueryField(fieldName: "timestamp"); - static var schema = Model.defineSchema(define: (ModelSchemaDefinition modelSchemaDefinition) { + static final ID = amplify_core.QueryField(fieldName: "id"); + static final USERID = amplify_core.QueryField(fieldName: "userID"); + static final USERNAME = amplify_core.QueryField(fieldName: "userName"); + static final TYPE = amplify_core.QueryField(fieldName: "type"); + static final MESSAGE = amplify_core.QueryField(fieldName: "message"); + static final TIMESTAMP = amplify_core.QueryField(fieldName: "timestamp"); + static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { modelSchemaDefinition.name = "Log"; modelSchemaDefinition.pluralName = "Logs"; modelSchemaDefinition.authRules = [ - AuthRule( - authStrategy: AuthStrategy.GROUPS, + amplify_core.AuthRule( + authStrategy: amplify_core.AuthStrategy.GROUPS, groupClaim: "cognito:groups", groups: [ "Administrator" ], - provider: AuthRuleProvider.USERPOOLS, - operations: [ - ModelOperation.READ, - ModelOperation.CREATE, - ModelOperation.UPDATE, - ModelOperation.DELETE + provider: amplify_core.AuthRuleProvider.USERPOOLS, + operations: const [ + amplify_core.ModelOperation.READ, + amplify_core.ModelOperation.CREATE, + amplify_core.ModelOperation.UPDATE, + amplify_core.ModelOperation.DELETE ]), - AuthRule( - authStrategy: AuthStrategy.PRIVATE, - operations: [ - ModelOperation.READ, - ModelOperation.CREATE + amplify_core.AuthRule( + authStrategy: amplify_core.AuthStrategy.PRIVATE, + operations: const [ + amplify_core.ModelOperation.READ, + amplify_core.ModelOperation.CREATE ]) ]; - modelSchemaDefinition.addField(ModelFieldDefinition.id()); + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); - modelSchemaDefinition.addField(ModelFieldDefinition.field( + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.field( key: Log.USERID, isRequired: true, - ofType: ModelFieldType(ModelFieldTypeEnum.string) + ofType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.string) )); - modelSchemaDefinition.addField(ModelFieldDefinition.field( + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.field( key: Log.USERNAME, isRequired: true, - ofType: ModelFieldType(ModelFieldTypeEnum.string) + ofType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.string) )); - modelSchemaDefinition.addField(ModelFieldDefinition.field( + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.field( key: Log.TYPE, isRequired: true, - ofType: ModelFieldType(ModelFieldTypeEnum.string) + ofType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.string) )); - modelSchemaDefinition.addField(ModelFieldDefinition.field( + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.field( key: Log.MESSAGE, isRequired: true, - ofType: ModelFieldType(ModelFieldTypeEnum.string) + ofType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.string) )); - modelSchemaDefinition.addField(ModelFieldDefinition.field( + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.field( key: Log.TIMESTAMP, isRequired: true, - ofType: ModelFieldType(ModelFieldTypeEnum.dateTime) + ofType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.dateTime) )); - modelSchemaDefinition.addField(ModelFieldDefinition.nonQueryField( + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.nonQueryField( fieldName: 'createdAt', isRequired: false, isReadOnly: true, - ofType: ModelFieldType(ModelFieldTypeEnum.dateTime) + ofType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.dateTime) )); - modelSchemaDefinition.addField(ModelFieldDefinition.nonQueryField( + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.nonQueryField( fieldName: 'updatedAt', isRequired: false, isReadOnly: true, - ofType: ModelFieldType(ModelFieldTypeEnum.dateTime) + ofType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.dateTime) )); }); } -class _LogModelType extends ModelType { +class _LogModelType extends amplify_core.ModelType { const _LogModelType(); @override diff --git a/lib/models/ModelProvider.dart b/lib/models/ModelProvider.dart index 7ab0373..e04d309 100644 --- a/lib/models/ModelProvider.dart +++ b/lib/models/ModelProvider.dart @@ -19,7 +19,7 @@ // 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'; +import 'package:amplify_core/amplify_core.dart' as amplify_core; import 'AdminSettings.dart'; import 'Checkin.dart'; import 'ClaimShirt.dart'; @@ -40,18 +40,18 @@ export 'Points.dart'; export 'ScavengerHunt.dart'; export 'ScavengerHuntCheckin.dart'; -class ModelProvider implements ModelProviderInterface { +class ModelProvider implements amplify_core.ModelProviderInterface { @override String version = "c49523e8244e726e6e2d25ff0fec2a07"; @override - List modelSchemas = [AdminSettings.schema, Checkin.schema, ClaimShirt.schema, Event.schema, EventRSVP.schema, Log.schema, Points.schema, ScavengerHunt.schema, ScavengerHuntCheckin.schema]; - static final ModelProvider _instance = ModelProvider(); + List modelSchemas = [AdminSettings.schema, Checkin.schema, ClaimShirt.schema, Event.schema, EventRSVP.schema, Log.schema, Points.schema, ScavengerHunt.schema, ScavengerHuntCheckin.schema]; @override - List customTypeSchemas = []; + List customTypeSchemas = []; + static final ModelProvider _instance = ModelProvider(); static ModelProvider get instance => _instance; - ModelType getModelTypeByModelName(String modelName) { + amplify_core.ModelType getModelTypeByModelName(String modelName) { switch(modelName) { case "AdminSettings": return AdminSettings.classType; @@ -75,4 +75,11 @@ class ModelProvider implements ModelProviderInterface { throw Exception("Failed to find model in model provider for model name: " + modelName); } } -} \ No newline at end of file +} + + +class ModelFieldValue { + const ModelFieldValue.value(this.value); + + final T value; +} diff --git a/lib/models/Points.dart b/lib/models/Points.dart index 80b91ac..b7a7ca7 100644 --- a/lib/models/Points.dart +++ b/lib/models/Points.dart @@ -19,20 +19,19 @@ // 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'; -import 'package:flutter/foundation.dart'; +import 'ModelProvider.dart'; +import 'package:amplify_core/amplify_core.dart' as amplify_core; /** This is an auto generated class representing the Points type in your schema. */ -@immutable -class Points extends Model { +class Points extends amplify_core.Model { static const classType = const _PointsModelType(); final String id; final String? _userID; final String? _userName; final int? _points; - final TemporalDateTime? _createdAt; - final TemporalDateTime? _updatedAt; + final amplify_core.TemporalDateTime? _createdAt; + final amplify_core.TemporalDateTime? _updatedAt; @override getInstanceType() => classType; @@ -46,10 +45,10 @@ class Points extends Model { try { return _userID!; } catch(e) { - throw new AmplifyCodeGenModelException( - AmplifyExceptionMessages.codeGenRequiredFieldForceCastExceptionMessage, + throw amplify_core.AmplifyCodeGenModelException( + amplify_core.AmplifyExceptionMessages.codeGenRequiredFieldForceCastExceptionMessage, recoverySuggestion: - AmplifyExceptionMessages.codeGenRequiredFieldForceCastRecoverySuggestion, + amplify_core.AmplifyExceptionMessages.codeGenRequiredFieldForceCastRecoverySuggestion, underlyingException: e.toString() ); } @@ -63,20 +62,20 @@ class Points extends Model { try { return _points!; } catch(e) { - throw new AmplifyCodeGenModelException( - AmplifyExceptionMessages.codeGenRequiredFieldForceCastExceptionMessage, + throw amplify_core.AmplifyCodeGenModelException( + amplify_core.AmplifyExceptionMessages.codeGenRequiredFieldForceCastExceptionMessage, recoverySuggestion: - AmplifyExceptionMessages.codeGenRequiredFieldForceCastRecoverySuggestion, + amplify_core.AmplifyExceptionMessages.codeGenRequiredFieldForceCastRecoverySuggestion, underlyingException: e.toString() ); } } - TemporalDateTime? get createdAt { + amplify_core.TemporalDateTime? get createdAt { return _createdAt; } - TemporalDateTime? get updatedAt { + amplify_core.TemporalDateTime? get updatedAt { return _updatedAt; } @@ -84,7 +83,7 @@ class Points extends Model { factory Points({String? id, required String userID, String? userName, required int points}) { return Points._internal( - id: id == null ? UUID.getUUID() : id, + id: id == null ? amplify_core.UUID.getUUID() : id, userID: userID, userName: userName, points: points); @@ -131,88 +130,107 @@ class Points extends Model { points: points ?? this.points); } + Points copyWithModelFieldValues({ + ModelFieldValue? id, + ModelFieldValue? userID, + ModelFieldValue? userName, + ModelFieldValue? points + }) { + return Points._internal( + id: id == null ? this.id : id.value, + userID: userID == null ? this.userID : userID.value, + userName: userName == null ? this.userName : userName.value, + points: points == null ? this.points : points.value + ); + } + Points.fromJson(Map json) : id = json['id'], _userID = json['userID'], _userName = json['userName'], _points = (json['points'] as num?)?.toInt(), - _createdAt = json['createdAt'] != null ? TemporalDateTime.fromString(json['createdAt']) : null, - _updatedAt = json['updatedAt'] != null ? TemporalDateTime.fromString(json['updatedAt']) : null; + _createdAt = json['createdAt'] != null ? amplify_core.TemporalDateTime.fromString(json['createdAt']) : null, + _updatedAt = json['updatedAt'] != null ? amplify_core.TemporalDateTime.fromString(json['updatedAt']) : null; Map toJson() => { 'id': id, 'userID': _userID, 'userName': _userName, 'points': _points, 'createdAt': _createdAt?.format(), 'updatedAt': _updatedAt?.format() }; Map toMap() => { - 'id': id, 'userID': _userID, 'userName': _userName, 'points': _points, 'createdAt': _createdAt, 'updatedAt': _updatedAt + 'id': id, + 'userID': _userID, + 'userName': _userName, + 'points': _points, + 'createdAt': _createdAt, + 'updatedAt': _updatedAt }; - static final QueryField ID = QueryField(fieldName: "id"); - static final QueryField USERID = QueryField(fieldName: "userID"); - static final QueryField USERNAME = QueryField(fieldName: "userName"); - static final QueryField POINTS = QueryField(fieldName: "points"); - static var schema = Model.defineSchema(define: (ModelSchemaDefinition modelSchemaDefinition) { + static final ID = amplify_core.QueryField(fieldName: "id"); + static final USERID = amplify_core.QueryField(fieldName: "userID"); + static final USERNAME = amplify_core.QueryField(fieldName: "userName"); + static final POINTS = amplify_core.QueryField(fieldName: "points"); + static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { modelSchemaDefinition.name = "Points"; modelSchemaDefinition.pluralName = "Points"; modelSchemaDefinition.authRules = [ - AuthRule( - authStrategy: AuthStrategy.GROUPS, + amplify_core.AuthRule( + authStrategy: amplify_core.AuthStrategy.GROUPS, groupClaim: "cognito:groups", groups: [ "Administrator" ], - provider: AuthRuleProvider.USERPOOLS, - operations: [ - ModelOperation.READ, - ModelOperation.CREATE, - ModelOperation.UPDATE, - ModelOperation.DELETE + provider: amplify_core.AuthRuleProvider.USERPOOLS, + operations: const [ + amplify_core.ModelOperation.READ, + amplify_core.ModelOperation.CREATE, + amplify_core.ModelOperation.UPDATE, + amplify_core.ModelOperation.DELETE ]), - AuthRule( - authStrategy: AuthStrategy.PRIVATE, - operations: [ - ModelOperation.READ, - ModelOperation.CREATE, - ModelOperation.UPDATE + amplify_core.AuthRule( + authStrategy: amplify_core.AuthStrategy.PRIVATE, + operations: const [ + amplify_core.ModelOperation.READ, + amplify_core.ModelOperation.CREATE, + amplify_core.ModelOperation.UPDATE ]) ]; - modelSchemaDefinition.addField(ModelFieldDefinition.id()); + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); - modelSchemaDefinition.addField(ModelFieldDefinition.field( + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.field( key: Points.USERID, isRequired: true, - ofType: ModelFieldType(ModelFieldTypeEnum.string) + ofType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.string) )); - modelSchemaDefinition.addField(ModelFieldDefinition.field( + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.field( key: Points.USERNAME, isRequired: false, - ofType: ModelFieldType(ModelFieldTypeEnum.string) + ofType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.string) )); - modelSchemaDefinition.addField(ModelFieldDefinition.field( + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.field( key: Points.POINTS, isRequired: true, - ofType: ModelFieldType(ModelFieldTypeEnum.int) + ofType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.int) )); - modelSchemaDefinition.addField(ModelFieldDefinition.nonQueryField( + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.nonQueryField( fieldName: 'createdAt', isRequired: false, isReadOnly: true, - ofType: ModelFieldType(ModelFieldTypeEnum.dateTime) + ofType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.dateTime) )); - modelSchemaDefinition.addField(ModelFieldDefinition.nonQueryField( + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.nonQueryField( fieldName: 'updatedAt', isRequired: false, isReadOnly: true, - ofType: ModelFieldType(ModelFieldTypeEnum.dateTime) + ofType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.dateTime) )); }); } -class _PointsModelType extends ModelType { +class _PointsModelType extends amplify_core.ModelType { const _PointsModelType(); @override diff --git a/lib/models/ScavengerHunt.dart b/lib/models/ScavengerHunt.dart index b4748e0..fb357b2 100644 --- a/lib/models/ScavengerHunt.dart +++ b/lib/models/ScavengerHunt.dart @@ -19,21 +19,20 @@ // 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'; -import 'package:flutter/foundation.dart'; +import 'ModelProvider.dart'; +import 'package:amplify_core/amplify_core.dart' as amplify_core; /** This is an auto generated class representing the ScavengerHunt type in your schema. */ -@immutable -class ScavengerHunt extends Model { +class ScavengerHunt extends amplify_core.Model { static const classType = const _ScavengerHuntModelType(); final String id; final String? _name; final String? _description; final bool? _status; final int? _points; - final TemporalDateTime? _createdAt; - final TemporalDateTime? _updatedAt; + final amplify_core.TemporalDateTime? _createdAt; + final amplify_core.TemporalDateTime? _updatedAt; @override getInstanceType() => classType; @@ -47,10 +46,10 @@ class ScavengerHunt extends Model { try { return _name!; } catch(e) { - throw new AmplifyCodeGenModelException( - AmplifyExceptionMessages.codeGenRequiredFieldForceCastExceptionMessage, + throw amplify_core.AmplifyCodeGenModelException( + amplify_core.AmplifyExceptionMessages.codeGenRequiredFieldForceCastExceptionMessage, recoverySuggestion: - AmplifyExceptionMessages.codeGenRequiredFieldForceCastRecoverySuggestion, + amplify_core.AmplifyExceptionMessages.codeGenRequiredFieldForceCastRecoverySuggestion, underlyingException: e.toString() ); } @@ -68,11 +67,11 @@ class ScavengerHunt extends Model { return _points; } - TemporalDateTime? get createdAt { + amplify_core.TemporalDateTime? get createdAt { return _createdAt; } - TemporalDateTime? get updatedAt { + amplify_core.TemporalDateTime? get updatedAt { return _updatedAt; } @@ -80,7 +79,7 @@ class ScavengerHunt extends Model { factory ScavengerHunt({String? id, required String name, String? description, bool? status, int? points}) { return ScavengerHunt._internal( - id: id == null ? UUID.getUUID() : id, + id: id == null ? amplify_core.UUID.getUUID() : id, name: name, description: description, status: status, @@ -131,94 +130,116 @@ class ScavengerHunt extends Model { points: points ?? this.points); } + ScavengerHunt copyWithModelFieldValues({ + ModelFieldValue? id, + ModelFieldValue? name, + ModelFieldValue? description, + ModelFieldValue? status, + ModelFieldValue? points + }) { + return ScavengerHunt._internal( + id: id == null ? this.id : id.value, + name: name == null ? this.name : name.value, + description: description == null ? this.description : description.value, + status: status == null ? this.status : status.value, + points: points == null ? this.points : points.value + ); + } + ScavengerHunt.fromJson(Map json) : id = json['id'], _name = json['name'], _description = json['description'], _status = json['status'], _points = (json['points'] as num?)?.toInt(), - _createdAt = json['createdAt'] != null ? TemporalDateTime.fromString(json['createdAt']) : null, - _updatedAt = json['updatedAt'] != null ? TemporalDateTime.fromString(json['updatedAt']) : null; + _createdAt = json['createdAt'] != null ? amplify_core.TemporalDateTime.fromString(json['createdAt']) : null, + _updatedAt = json['updatedAt'] != null ? amplify_core.TemporalDateTime.fromString(json['updatedAt']) : null; Map toJson() => { 'id': id, 'name': _name, 'description': _description, 'status': _status, 'points': _points, 'createdAt': _createdAt?.format(), 'updatedAt': _updatedAt?.format() }; Map toMap() => { - 'id': id, 'name': _name, 'description': _description, 'status': _status, 'points': _points, 'createdAt': _createdAt, 'updatedAt': _updatedAt + 'id': id, + 'name': _name, + 'description': _description, + 'status': _status, + 'points': _points, + 'createdAt': _createdAt, + 'updatedAt': _updatedAt }; - static final QueryField ID = QueryField(fieldName: "id"); - static final QueryField NAME = QueryField(fieldName: "name"); - static final QueryField DESCRIPTION = QueryField(fieldName: "description"); - static final QueryField STATUS = QueryField(fieldName: "status"); - static final QueryField POINTS = QueryField(fieldName: "points"); - static var schema = Model.defineSchema(define: (ModelSchemaDefinition modelSchemaDefinition) { + static final ID = amplify_core.QueryField(fieldName: "id"); + static final NAME = amplify_core.QueryField(fieldName: "name"); + static final DESCRIPTION = amplify_core.QueryField(fieldName: "description"); + static final STATUS = amplify_core.QueryField(fieldName: "status"); + static final POINTS = amplify_core.QueryField(fieldName: "points"); + static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { modelSchemaDefinition.name = "ScavengerHunt"; modelSchemaDefinition.pluralName = "ScavengerHunts"; modelSchemaDefinition.authRules = [ - AuthRule( - authStrategy: AuthStrategy.GROUPS, + amplify_core.AuthRule( + authStrategy: amplify_core.AuthStrategy.GROUPS, groupClaim: "cognito:groups", groups: [ "Administrator", "Scavenger" ], - provider: AuthRuleProvider.USERPOOLS, - operations: [ - ModelOperation.READ, - ModelOperation.CREATE, - ModelOperation.UPDATE, - ModelOperation.DELETE + provider: amplify_core.AuthRuleProvider.USERPOOLS, + operations: const [ + amplify_core.ModelOperation.READ, + amplify_core.ModelOperation.CREATE, + amplify_core.ModelOperation.UPDATE, + amplify_core.ModelOperation.DELETE ]), - AuthRule( - authStrategy: AuthStrategy.PRIVATE, - operations: [ - ModelOperation.READ + amplify_core.AuthRule( + authStrategy: amplify_core.AuthStrategy.PRIVATE, + operations: const [ + amplify_core.ModelOperation.READ ]) ]; - modelSchemaDefinition.addField(ModelFieldDefinition.id()); + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); - modelSchemaDefinition.addField(ModelFieldDefinition.field( + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.field( key: ScavengerHunt.NAME, isRequired: true, - ofType: ModelFieldType(ModelFieldTypeEnum.string) + ofType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.string) )); - modelSchemaDefinition.addField(ModelFieldDefinition.field( + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.field( key: ScavengerHunt.DESCRIPTION, isRequired: false, - ofType: ModelFieldType(ModelFieldTypeEnum.string) + ofType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.string) )); - modelSchemaDefinition.addField(ModelFieldDefinition.field( + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.field( key: ScavengerHunt.STATUS, isRequired: false, - ofType: ModelFieldType(ModelFieldTypeEnum.bool) + ofType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.bool) )); - modelSchemaDefinition.addField(ModelFieldDefinition.field( + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.field( key: ScavengerHunt.POINTS, isRequired: false, - ofType: ModelFieldType(ModelFieldTypeEnum.int) + ofType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.int) )); - modelSchemaDefinition.addField(ModelFieldDefinition.nonQueryField( + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.nonQueryField( fieldName: 'createdAt', isRequired: false, isReadOnly: true, - ofType: ModelFieldType(ModelFieldTypeEnum.dateTime) + ofType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.dateTime) )); - modelSchemaDefinition.addField(ModelFieldDefinition.nonQueryField( + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.nonQueryField( fieldName: 'updatedAt', isRequired: false, isReadOnly: true, - ofType: ModelFieldType(ModelFieldTypeEnum.dateTime) + ofType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.dateTime) )); }); } -class _ScavengerHuntModelType extends ModelType { +class _ScavengerHuntModelType extends amplify_core.ModelType { const _ScavengerHuntModelType(); @override diff --git a/lib/models/ScavengerHuntCheckin.dart b/lib/models/ScavengerHuntCheckin.dart index fd63bad..06ae41a 100644 --- a/lib/models/ScavengerHuntCheckin.dart +++ b/lib/models/ScavengerHuntCheckin.dart @@ -19,19 +19,18 @@ // 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'; -import 'package:flutter/foundation.dart'; +import 'ModelProvider.dart'; +import 'package:amplify_core/amplify_core.dart' as amplify_core; /** This is an auto generated class representing the ScavengerHuntCheckin type in your schema. */ -@immutable -class ScavengerHuntCheckin extends Model { +class ScavengerHuntCheckin extends amplify_core.Model { static const classType = const _ScavengerHuntCheckinModelType(); final String id; final String? _checkpointID; final String? _userID; - final TemporalDateTime? _createdAt; - final TemporalDateTime? _updatedAt; + final amplify_core.TemporalDateTime? _createdAt; + final amplify_core.TemporalDateTime? _updatedAt; @override getInstanceType() => classType; @@ -45,10 +44,10 @@ class ScavengerHuntCheckin extends Model { try { return _checkpointID!; } catch(e) { - throw new AmplifyCodeGenModelException( - AmplifyExceptionMessages.codeGenRequiredFieldForceCastExceptionMessage, + throw amplify_core.AmplifyCodeGenModelException( + amplify_core.AmplifyExceptionMessages.codeGenRequiredFieldForceCastExceptionMessage, recoverySuggestion: - AmplifyExceptionMessages.codeGenRequiredFieldForceCastRecoverySuggestion, + amplify_core.AmplifyExceptionMessages.codeGenRequiredFieldForceCastRecoverySuggestion, underlyingException: e.toString() ); } @@ -58,20 +57,20 @@ class ScavengerHuntCheckin extends Model { try { return _userID!; } catch(e) { - throw new AmplifyCodeGenModelException( - AmplifyExceptionMessages.codeGenRequiredFieldForceCastExceptionMessage, + throw amplify_core.AmplifyCodeGenModelException( + amplify_core.AmplifyExceptionMessages.codeGenRequiredFieldForceCastExceptionMessage, recoverySuggestion: - AmplifyExceptionMessages.codeGenRequiredFieldForceCastRecoverySuggestion, + amplify_core.AmplifyExceptionMessages.codeGenRequiredFieldForceCastRecoverySuggestion, underlyingException: e.toString() ); } } - TemporalDateTime? get createdAt { + amplify_core.TemporalDateTime? get createdAt { return _createdAt; } - TemporalDateTime? get updatedAt { + amplify_core.TemporalDateTime? get updatedAt { return _updatedAt; } @@ -79,7 +78,7 @@ class ScavengerHuntCheckin extends Model { factory ScavengerHuntCheckin({String? id, required String checkpointID, required String userID}) { return ScavengerHuntCheckin._internal( - id: id == null ? UUID.getUUID() : id, + id: id == null ? amplify_core.UUID.getUUID() : id, checkpointID: checkpointID, userID: userID); } @@ -122,79 +121,95 @@ class ScavengerHuntCheckin extends Model { userID: userID ?? this.userID); } + ScavengerHuntCheckin copyWithModelFieldValues({ + ModelFieldValue? id, + ModelFieldValue? checkpointID, + ModelFieldValue? userID + }) { + return ScavengerHuntCheckin._internal( + id: id == null ? this.id : id.value, + checkpointID: checkpointID == null ? this.checkpointID : checkpointID.value, + userID: userID == null ? this.userID : userID.value + ); + } + ScavengerHuntCheckin.fromJson(Map json) : id = json['id'], _checkpointID = json['checkpointID'], _userID = json['userID'], - _createdAt = json['createdAt'] != null ? TemporalDateTime.fromString(json['createdAt']) : null, - _updatedAt = json['updatedAt'] != null ? TemporalDateTime.fromString(json['updatedAt']) : null; + _createdAt = json['createdAt'] != null ? amplify_core.TemporalDateTime.fromString(json['createdAt']) : null, + _updatedAt = json['updatedAt'] != null ? amplify_core.TemporalDateTime.fromString(json['updatedAt']) : null; Map toJson() => { 'id': id, 'checkpointID': _checkpointID, 'userID': _userID, 'createdAt': _createdAt?.format(), 'updatedAt': _updatedAt?.format() }; Map toMap() => { - 'id': id, 'checkpointID': _checkpointID, 'userID': _userID, 'createdAt': _createdAt, 'updatedAt': _updatedAt + 'id': id, + 'checkpointID': _checkpointID, + 'userID': _userID, + 'createdAt': _createdAt, + 'updatedAt': _updatedAt }; - static final QueryField ID = QueryField(fieldName: "id"); - static final QueryField CHECKPOINTID = QueryField(fieldName: "checkpointID"); - static final QueryField USERID = QueryField(fieldName: "userID"); - static var schema = Model.defineSchema(define: (ModelSchemaDefinition modelSchemaDefinition) { + static final ID = amplify_core.QueryField(fieldName: "id"); + static final CHECKPOINTID = amplify_core.QueryField(fieldName: "checkpointID"); + static final USERID = amplify_core.QueryField(fieldName: "userID"); + static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { modelSchemaDefinition.name = "ScavengerHuntCheckin"; modelSchemaDefinition.pluralName = "ScavengerHuntCheckins"; modelSchemaDefinition.authRules = [ - AuthRule( - authStrategy: AuthStrategy.GROUPS, + amplify_core.AuthRule( + authStrategy: amplify_core.AuthStrategy.GROUPS, groupClaim: "cognito:groups", groups: [ "Administrator", "Scavenger" ], - provider: AuthRuleProvider.USERPOOLS, - operations: [ - ModelOperation.READ, - ModelOperation.CREATE, - ModelOperation.UPDATE, - ModelOperation.DELETE + provider: amplify_core.AuthRuleProvider.USERPOOLS, + operations: const [ + amplify_core.ModelOperation.READ, + amplify_core.ModelOperation.CREATE, + amplify_core.ModelOperation.UPDATE, + amplify_core.ModelOperation.DELETE ]), - AuthRule( - authStrategy: AuthStrategy.PRIVATE, - operations: [ - ModelOperation.READ, - ModelOperation.CREATE + amplify_core.AuthRule( + authStrategy: amplify_core.AuthStrategy.PRIVATE, + operations: const [ + amplify_core.ModelOperation.READ, + amplify_core.ModelOperation.CREATE ]) ]; - modelSchemaDefinition.addField(ModelFieldDefinition.id()); + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); - modelSchemaDefinition.addField(ModelFieldDefinition.field( + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.field( key: ScavengerHuntCheckin.CHECKPOINTID, isRequired: true, - ofType: ModelFieldType(ModelFieldTypeEnum.string) + ofType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.string) )); - modelSchemaDefinition.addField(ModelFieldDefinition.field( + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.field( key: ScavengerHuntCheckin.USERID, isRequired: true, - ofType: ModelFieldType(ModelFieldTypeEnum.string) + ofType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.string) )); - modelSchemaDefinition.addField(ModelFieldDefinition.nonQueryField( + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.nonQueryField( fieldName: 'createdAt', isRequired: false, isReadOnly: true, - ofType: ModelFieldType(ModelFieldTypeEnum.dateTime) + ofType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.dateTime) )); - modelSchemaDefinition.addField(ModelFieldDefinition.nonQueryField( + modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.nonQueryField( fieldName: 'updatedAt', isRequired: false, isReadOnly: true, - ofType: ModelFieldType(ModelFieldTypeEnum.dateTime) + ofType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.dateTime) )); }); } -class _ScavengerHuntCheckinModelType extends ModelType { +class _ScavengerHuntCheckinModelType extends amplify_core.ModelType { const _ScavengerHuntCheckinModelType(); @override diff --git a/lib/view/CheckinUserList.view.dart b/lib/view/CheckinUserList.view.dart index 921e8bf..72c1cd2 100644 --- a/lib/view/CheckinUserList.view.dart +++ b/lib/view/CheckinUserList.view.dart @@ -1,3 +1,4 @@ +import 'dart:async'; import 'dart:convert'; import 'package:amplify_api/amplify_api.dart'; @@ -23,7 +24,9 @@ class CheckinUserListView extends StatefulWidget { class _CheckinUserListState extends State { String _error = ""; bool _loadingCheckins = true; + bool _mounted = true; List _checkins = []; + late StreamSubscription> stream; @override void initState() { @@ -35,7 +38,7 @@ class _CheckinUserListState extends State { }); } }); - subscription.listen((checkin) { + stream = subscription.listen((checkin) { // print(checkin); if (checkin.data != null) { @@ -52,6 +55,13 @@ class _CheckinUserListState extends State { }); } + @override + void dispose() { + super.dispose(); + _mounted = false; + stream.cancel(); + } + @override Widget build(BuildContext context) { if (_loadingCheckins) { @@ -65,10 +75,11 @@ class _CheckinUserListState extends State { _loadingCheckins = false; }); } else { - setState(() { - _error = status.error.toString(); - _loadingCheckins = false; - }); + if (_mounted) + setState(() { + _error = status.error.toString(); + _loadingCheckins = false; + }); } }); } @@ -112,7 +123,8 @@ class _CheckinUserListState extends State { _getExistingCheckins(Function(Status) callback) async { try { final where = Checkin.EVENT.eq(widget.event.id); - final request = ModelQueries.list(Checkin.classType, where: where); + final request = + ModelQueries.list(Checkin.classType, where: where, limit: 10000); final result = await Amplify.API.query(request: request).response; if (result.data != null) { diff --git a/lib/view/Home.view.dart b/lib/view/Home.view.dart index 17a90fa..74c8776 100644 --- a/lib/view/Home.view.dart +++ b/lib/view/Home.view.dart @@ -228,7 +228,7 @@ class _HomeViewState extends State { if (authSessions.isSignedIn) { final accessToken = (authSessions as CognitoAuthSession).userPoolTokens?.accessToken; - if (accessToken == null || accessToken.isEmpty) { + if (accessToken == null || accessToken.raw.isEmpty) { callback(Status.withError(error: "No access token.")); return; } @@ -236,7 +236,7 @@ class _HomeViewState extends State { var attributes = await Amplify.Auth.fetchUserAttributes(); setState(() { - _user = AmplifyUser(accessToken: accessToken, attributes: attributes); + _user = AmplifyUser(accessToken: accessToken.raw, attributes: attributes); }); callback(Status.withSuccess(message: "Got user info.")); diff --git a/lib/viewmodel/checkin.viewmodel.dart b/lib/viewmodel/checkin.viewmodel.dart index edc24a7..dc1bc2b 100644 --- a/lib/viewmodel/checkin.viewmodel.dart +++ b/lib/viewmodel/checkin.viewmodel.dart @@ -1,7 +1,7 @@ import 'dart:convert'; import 'package:amplify_api/amplify_api.dart'; -import 'package:amplify_api/model_mutations.dart'; +// import 'package:amplify_api/model_mutations.dart'; import 'package:amplify_flutter/amplify_flutter.dart'; import 'package:flutter/cupertino.dart'; import 'package:hacklytics_checkin_flutter/model/amplifyuser.dart'; @@ -77,7 +77,7 @@ class CheckinViewModel extends ChangeNotifier { Future checkIfUserCheckedIn() async { var request = GraphQLRequest(document: ''' query queryCheckins { - listCheckins(filter: {user: {eq: "${_user.username}"}}) { + listCheckins(filter: {user: {eq: "${_user.username}"}}, limit: 10000) { items { user updatedAt @@ -93,6 +93,7 @@ class CheckinViewModel extends ChangeNotifier { var operation = Amplify.API.query(request: request); var response = await operation.response; var data = response.data; + var res = responseGetCheckins(data, event); if (res.error != null && res.error!.isNotEmpty) { _error = res.error!; @@ -214,37 +215,33 @@ class CheckinViewModel extends ChangeNotifier { // '''); // attempt to check in until it works - var checkinWorked = false; - - while (!checkinWorked) { - Checkin c = Checkin( - user: _user.username, - userName: _user.attributes["name"], - createdBy: currentUser.username, - createdByName: currentUserName, - event: event); - - var request2 = ModelMutations.create(c); - var operation2 = Amplify.API.mutate(request: request2); - var response2 = await operation2.response; - - print(response2.data); - print(response2.errors); - if (response2.errors.isNotEmpty) { - _error = response2.errors.first.message; - - _loadingUser = false; - if (_mounted) notifyListeners(); - return; - } + Checkin c = Checkin( + user: _user.username, + userName: _user.attributes["name"], + createdBy: currentUser.username, + createdByName: currentUserName, + event: event); + + var request2 = ModelMutations.create(c); + var operation2 = Amplify.API.mutate(request: request2); + var response2 = await operation2.response; + + print(response2.data); + print(response2.errors); + if (response2.errors.isNotEmpty) { + _error = response2.errors.first.message; - // check if user is already checked in - var res1 = await checkIfUserCheckedIn(); - if (res1 == true) { - checkinWorked = true; - } + _loadingUser = false; + if (_mounted) notifyListeners(); + return; } + // check if user is already checked in + // var res1 = await checkIfUserCheckedIn(); + // if (res1 == true) { + // checkinWorked = true; + // } + // final predicate = Points.USERID.eq(_user.username); // var request3 = ModelQueries.list(Points.classType, where: predicate); // var operation3 = Amplify.API.query(request: request3); diff --git a/linux/flutter/generated_plugin_registrant.cc b/linux/flutter/generated_plugin_registrant.cc index e71a16d..a66c593 100644 --- a/linux/flutter/generated_plugin_registrant.cc +++ b/linux/flutter/generated_plugin_registrant.cc @@ -6,6 +6,14 @@ #include "generated_plugin_registrant.h" +#include +#include void fl_register_plugins(FlPluginRegistry* registry) { + g_autoptr(FlPluginRegistrar) amplify_db_common_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "AmplifyDbCommonPlugin"); + amplify_db_common_plugin_register_with_registrar(amplify_db_common_registrar); + g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin"); + url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar); } diff --git a/linux/flutter/generated_plugins.cmake b/linux/flutter/generated_plugins.cmake index 2e1de87..a7fd6af 100644 --- a/linux/flutter/generated_plugins.cmake +++ b/linux/flutter/generated_plugins.cmake @@ -3,6 +3,8 @@ # list(APPEND FLUTTER_PLUGIN_LIST + amplify_db_common + url_launcher_linux ) list(APPEND FLUTTER_FFI_PLUGIN_LIST diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index 08d9c9c..8b6fd0e 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -5,8 +5,20 @@ import FlutterMacOS import Foundation -import package_info_plus_macos +import amplify_auth_cognito +import amplify_secure_storage +import connectivity_plus +import device_info_plus +import package_info_plus +import path_provider_foundation +import url_launcher_macos func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { - FLTPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlusPlugin")) + AmplifyAuthCognitoPlugin.register(with: registry.registrar(forPlugin: "AmplifyAuthCognitoPlugin")) + AmplifySecureStoragePlugin.register(with: registry.registrar(forPlugin: "AmplifySecureStoragePlugin")) + ConnectivityPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlugin")) + DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin")) + FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin")) + PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) + UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) } diff --git a/pubspec.lock b/pubspec.lock index 329a085..6bb9f8e 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,233 +5,370 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - url: "https://pub.dartlang.org" + sha256: eb376e9acf6938204f90eb3b1f00b578640d3188b4c8a8ec054f9f479af8d051 + url: "https://pub.dev" source: hosted - version: "47.0.0" - amplify_api: - dependency: "direct main" + version: "64.0.0" + amplify_analytics_pinpoint: + dependency: transitive description: - name: amplify_api - url: "https://pub.dartlang.org" + name: amplify_analytics_pinpoint + sha256: "70ca12740ce7b13c2dde9c55a026056eee07a31429e72b404c525830d3950bb1" + url: "https://pub.dev" source: hosted - version: "0.6.10" - amplify_api_android: + version: "1.6.2" + amplify_analytics_pinpoint_dart: dependency: transitive description: - name: amplify_api_android - url: "https://pub.dartlang.org" + name: amplify_analytics_pinpoint_dart + sha256: "576c1c1ea07b65425ee488240a01163293605a2d476a7f9324aeb7d0dfc30678" + url: "https://pub.dev" source: hosted - version: "0.6.10" - amplify_api_ios: + version: "0.3.5" + amplify_api: + dependency: "direct main" + description: + name: amplify_api + sha256: a8e17883d992f8df035e7be5d44b200c54b1102c5f793f9357b3e916aea6e840 + url: "https://pub.dev" + source: hosted + version: "1.6.2" + amplify_api_dart: dependency: transitive description: - name: amplify_api_ios - url: "https://pub.dartlang.org" + name: amplify_api_dart + sha256: "0479ada6792a7e9631132edd76b551f8ec9b17488c8bae280038d992b9b13738" + url: "https://pub.dev" source: hosted - version: "0.6.10" + version: "0.3.4" amplify_auth_cognito: dependency: "direct main" description: name: amplify_auth_cognito - url: "https://pub.dartlang.org" - source: hosted - version: "0.6.10" - amplify_auth_cognito_android: - dependency: transitive - description: - name: amplify_auth_cognito_android - url: "https://pub.dartlang.org" + sha256: "567662870e4332b8189c7b0dc353c5d9a26cc94a6de0d9649c134c14022c6653" + url: "https://pub.dev" source: hosted - version: "0.6.10" - amplify_auth_cognito_ios: + version: "1.6.1" + amplify_auth_cognito_dart: dependency: transitive description: - name: amplify_auth_cognito_ios - url: "https://pub.dartlang.org" + name: amplify_auth_cognito_dart + sha256: "56dd87c5081e25b1d13a010ad664eb751c7dcdaf28be3b51c396b399a1490723" + url: "https://pub.dev" source: hosted - version: "0.6.10" + version: "0.10.8" amplify_authenticator: dependency: "direct main" description: name: amplify_authenticator - url: "https://pub.dartlang.org" + sha256: "61975cb0c12cf07546ad07231f1834b0e9494565b12dc729f414273efce41072" + url: "https://pub.dev" source: hosted - version: "0.2.4" + version: "1.5.2" amplify_core: dependency: transitive description: name: amplify_core - url: "https://pub.dartlang.org" + sha256: "43cedb5831723a511d462d7bc7c500ac90ee4a9a8fbf76a06b0e45771f2e90f3" + url: "https://pub.dev" source: hosted - version: "0.6.10" + version: "1.6.2" amplify_datastore: dependency: "direct main" description: name: amplify_datastore - url: "https://pub.dartlang.org" + sha256: "91aef3051d6b119382d0de693eb9f4f8b936630336951e7b2235c873921bef33" + url: "https://pub.dev" source: hosted - version: "0.6.10" + version: "1.6.0" amplify_datastore_plugin_interface: dependency: transitive description: name: amplify_datastore_plugin_interface - url: "https://pub.dartlang.org" + sha256: a1ac3d134cf6d694d649b3f27ea4c43cc3bdb8c83929bba95067f4f70ee475d4 + url: "https://pub.dev" source: hosted - version: "0.6.10" + version: "1.6.1" + amplify_db_common: + dependency: transitive + description: + name: amplify_db_common + sha256: "02d5d09fdc8450b82fb00c83953fd5694178bfd882de04b15b9f5357c3bad86e" + url: "https://pub.dev" + source: hosted + version: "0.3.4" + amplify_db_common_dart: + dependency: transitive + description: + name: amplify_db_common_dart + sha256: "4a550791aeaa69315ee337b64781112ed33f2a65dd9f44c7cddd2f6556cca865" + url: "https://pub.dev" + source: hosted + version: "0.3.4" amplify_flutter: dependency: "direct main" description: name: amplify_flutter - url: "https://pub.dartlang.org" + sha256: "7a6e769486efbae39230950ba2fcb9b71848ab3dde479511779ffce3e95b9025" + url: "https://pub.dev" source: hosted - version: "0.6.10" - amplify_flutter_android: + version: "1.6.1" + amplify_secure_storage: dependency: transitive description: - name: amplify_flutter_android - url: "https://pub.dartlang.org" + name: amplify_secure_storage + sha256: "97c516a527f11a4734b58644665ffd1b9e87cdcd26faa46ec4d5894144316f42" + url: "https://pub.dev" source: hosted - version: "0.6.10" - amplify_flutter_ios: + version: "0.4.0+6" + amplify_secure_storage_dart: dependency: transitive description: - name: amplify_flutter_ios - url: "https://pub.dartlang.org" + name: amplify_secure_storage_dart + sha256: "09c67bec3725ecfe7ecf7b971f884485ad7b4dc91f79fdb247549930daebe735" + url: "https://pub.dev" source: hosted - version: "0.6.10" + version: "0.4.2" analyzer: dependency: transitive description: name: analyzer - url: "https://pub.dartlang.org" + sha256: "69f54f967773f6c26c7dcb13e93d7ccee8b17a641689da39e878d5cf13b06893" + url: "https://pub.dev" source: hosted - version: "4.7.0" + version: "6.2.0" archive: dependency: transitive description: name: archive - url: "https://pub.dartlang.org" + sha256: "7b875fd4a20b165a3084bd2d210439b22ebc653f21cea4842729c0c30c82596b" + url: "https://pub.dev" source: hosted - version: "3.3.5" + version: "3.4.9" args: dependency: transitive description: name: args - url: "https://pub.dartlang.org" + sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596 + url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.4.2" async: dependency: transitive description: name: async - url: "https://pub.dartlang.org" + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" source: hosted - version: "2.9.0" + version: "2.11.0" aws_common: dependency: transitive description: name: aws_common - url: "https://pub.dartlang.org" + sha256: "6a952cf6b9109ec38d6193b87772c46909df3789a051ce1e4393fab4b3afd785" + url: "https://pub.dev" + source: hosted + version: "0.6.2" + aws_signature_v4: + dependency: transitive + description: + name: aws_signature_v4 + sha256: "916029d558b8bc9742ea4adc2f5179ef414ee627aa345abd36919e8c9c0907f2" + url: "https://pub.dev" source: hosted - version: "0.1.1" + version: "0.5.0" badges: dependency: "direct main" description: name: badges - url: "https://pub.dartlang.org" + sha256: "727580d938b7a1ff47ea42df730d581415606b4224cfa708671c10287f8d3fe6" + url: "https://pub.dev" source: hosted version: "2.0.3" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.dartlang.org" + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" + built_collection: + dependency: transitive + description: + name: built_collection + sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" + url: "https://pub.dev" + source: hosted + version: "5.1.1" + built_value: + dependency: transitive + description: + name: built_value + sha256: "723b4021e903217dfc445ec4cf5b42e27975aece1fc4ebbc1ca6329c2d9fb54e" + url: "https://pub.dev" + source: hosted + version: "8.7.0" characters: dependency: transitive description: name: characters - url: "https://pub.dartlang.org" + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.3.0" checked_yaml: dependency: transitive description: name: checked_yaml - url: "https://pub.dartlang.org" + sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff + url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "2.0.3" cli_util: dependency: transitive description: name: cli_util - url: "https://pub.dartlang.org" + sha256: "66f86e916d285c1a93d3b79587d94bd71984a66aac4ff74e524cfa7877f1395c" + url: "https://pub.dev" source: hosted version: "0.3.5" clock: dependency: transitive description: name: clock - url: "https://pub.dartlang.org" + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" source: hosted version: "1.1.1" collection: dependency: transitive description: name: collection - url: "https://pub.dartlang.org" + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + url: "https://pub.dev" + source: hosted + version: "1.18.0" + connectivity_plus: + dependency: transitive + description: + name: connectivity_plus + sha256: "224a77051d52a11fbad53dd57827594d3bd24f945af28bd70bab376d68d437f0" + url: "https://pub.dev" source: hosted - version: "1.16.0" + version: "5.0.2" + connectivity_plus_platform_interface: + dependency: transitive + description: + name: connectivity_plus_platform_interface + sha256: cf1d1c28f4416f8c654d7dc3cd638ec586076255d407cef3ddbdaf178272a71a + url: "https://pub.dev" + source: hosted + version: "1.2.4" convert: dependency: transitive description: name: convert - url: "https://pub.dartlang.org" + sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + url: "https://pub.dev" source: hosted version: "3.1.1" coverage: dependency: transitive description: name: coverage - url: "https://pub.dartlang.org" + sha256: "8acabb8306b57a409bf4c83522065672ee13179297a6bb0cb9ead73948df7c76" + url: "https://pub.dev" source: hosted - version: "1.6.1" + version: "1.7.2" + crclib: + dependency: transitive + description: + name: crclib + sha256: "800f2226cd90c900ddcaaccb79449eabe690627ee8c7046737458f1a2509043d" + url: "https://pub.dev" + source: hosted + version: "3.0.0" crypto: dependency: transitive description: name: crypto - url: "https://pub.dartlang.org" + sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "3.0.3" cupertino_icons: dependency: "direct main" description: name: cupertino_icons - url: "https://pub.dartlang.org" + sha256: d57953e10f9f8327ce64a508a355f0b1ec902193f66288e8cb5070e7c47eeb2d + url: "https://pub.dev" + source: hosted + version: "1.0.6" + dbus: + dependency: transitive + description: + name: dbus + sha256: "365c771ac3b0e58845f39ec6deebc76e3276aa9922b0cc60840712094d9047ac" + url: "https://pub.dev" + source: hosted + version: "0.7.10" + device_info_plus: + dependency: transitive + description: + name: device_info_plus + sha256: "0042cb3b2a76413ea5f8a2b40cec2a33e01d0c937e91f0f7c211fde4f7739ba6" + url: "https://pub.dev" + source: hosted + version: "9.1.1" + device_info_plus_platform_interface: + dependency: transitive + description: + name: device_info_plus_platform_interface + sha256: d3b01d5868b50ae571cd1dc6e502fc94d956b665756180f7b16ead09e836fd64 + url: "https://pub.dev" source: hosted - version: "1.0.5" + version: "7.0.0" + drift: + dependency: transitive + description: + name: drift + sha256: c66df5f88616f5b1fb8d83266738d4f3671c692b2aa680fd8fe53e57a4e149be + url: "https://pub.dev" + source: hosted + version: "2.12.1" fake_async: dependency: transitive description: name: fake_async - url: "https://pub.dartlang.org" + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" source: hosted version: "1.3.1" ffi: dependency: transitive description: name: ffi - url: "https://pub.dartlang.org" + sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" + url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "2.1.0" file: dependency: transitive description: name: file - url: "https://pub.dartlang.org" + sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" + url: "https://pub.dev" + source: hosted + version: "7.0.0" + fixnum: + dependency: transitive + description: + name: fixnum + sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + url: "https://pub.dev" source: hosted - version: "6.1.4" + version: "1.1.0" flutter: dependency: "direct main" description: flutter @@ -241,16 +378,18 @@ packages: dependency: "direct dev" description: name: flutter_launcher_icons - url: "https://pub.dartlang.org" + sha256: ce0e501cfc258907842238e4ca605e74b7fd1cdf04b3b43e86c43f3e40a1592c + url: "https://pub.dev" source: hosted version: "0.11.0" flutter_lints: dependency: "direct dev" description: name: flutter_lints - url: "https://pub.dartlang.org" + sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04 + url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "2.0.3" flutter_localizations: dependency: transitive description: flutter @@ -270,455 +409,743 @@ packages: dependency: "direct main" description: name: fluttertoast - url: "https://pub.dartlang.org" + sha256: dfdde255317af381bfc1c486ed968d5a43a2ded9c931e87cbecd88767d6a71c1 + url: "https://pub.dev" source: hosted - version: "8.1.1" + version: "8.2.4" frontend_server_client: dependency: transitive description: name: frontend_server_client - url: "https://pub.dartlang.org" + sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612" + url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "3.2.0" glob: dependency: transitive description: name: glob - url: "https://pub.dartlang.org" + sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" + url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" + graphs: + dependency: transitive + description: + name: graphs + sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19 + url: "https://pub.dev" + source: hosted + version: "2.3.1" http: dependency: transitive description: name: http - url: "https://pub.dartlang.org" + sha256: d4872660c46d929f6b8a9ef4e7a7eff7e49bbf0c4ec3f385ee32df5119175139 + url: "https://pub.dev" + source: hosted + version: "1.1.2" + http2: + dependency: transitive + description: + name: http2 + sha256: "38db0c4aa9f1cd238a5d2e86aa0cc7cc91c77e0c6c94ba64bbe85e4ff732a952" + url: "https://pub.dev" source: hosted - version: "0.13.5" + version: "2.2.0" http_multi_server: dependency: transitive description: name: http_multi_server - url: "https://pub.dartlang.org" + sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" + url: "https://pub.dev" source: hosted version: "3.2.1" http_parser: dependency: transitive description: name: http_parser - url: "https://pub.dartlang.org" + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" source: hosted version: "4.0.2" image: dependency: transitive description: name: image - url: "https://pub.dartlang.org" + sha256: "8e9d133755c3e84c73288363e6343157c383a0c6c56fc51afcc5d4d7180306d6" + url: "https://pub.dev" source: hosted - version: "3.2.2" + version: "3.3.0" intl: dependency: transitive description: name: intl - url: "https://pub.dartlang.org" + sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d" + url: "https://pub.dev" source: hosted - version: "0.17.0" + version: "0.18.1" io: dependency: transitive description: name: io - url: "https://pub.dartlang.org" + sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" + url: "https://pub.dev" source: hosted - version: "1.0.3" + version: "1.0.4" js: dependency: transitive description: name: js - url: "https://pub.dartlang.org" + sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 + url: "https://pub.dev" source: hosted - version: "0.6.4" + version: "0.6.7" json_annotation: dependency: transitive description: name: json_annotation - url: "https://pub.dartlang.org" + sha256: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467 + url: "https://pub.dev" source: hosted - version: "4.7.0" + version: "4.8.1" lints: dependency: transitive description: name: lints - url: "https://pub.dartlang.org" + sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452" + url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "2.1.1" logging: dependency: transitive description: name: logging - url: "https://pub.dartlang.org" + sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" + url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.2.0" matcher: dependency: transitive description: name: matcher - url: "https://pub.dartlang.org" + sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + url: "https://pub.dev" source: hosted - version: "0.12.12" + version: "0.12.16" material_color_utilities: dependency: transitive description: name: material_color_utilities - url: "https://pub.dartlang.org" + sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + url: "https://pub.dev" source: hosted - version: "0.1.5" + version: "0.5.0" meta: dependency: transitive description: name: meta - url: "https://pub.dartlang.org" + sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.10.0" mime: dependency: transitive description: name: mime - url: "https://pub.dartlang.org" + sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e + url: "https://pub.dev" source: hosted - version: "1.0.3" + version: "1.0.4" nested: dependency: transitive description: name: nested - url: "https://pub.dartlang.org" + sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20" + url: "https://pub.dev" source: hosted version: "1.0.0" nfc_manager: dependency: "direct main" description: name: nfc_manager - url: "https://pub.dartlang.org" + sha256: d6a4cc6a8a37119b1e8cc242392c0c87623d319cf1423f6a90cb998a52970baf + url: "https://pub.dev" source: hosted - version: "3.2.0" + version: "3.3.0" + nm: + dependency: transitive + description: + name: nm + sha256: "2c9aae4127bdc8993206464fcc063611e0e36e72018696cd9631023a31b24254" + url: "https://pub.dev" + source: hosted + version: "0.5.0" node_preamble: dependency: transitive description: name: node_preamble - url: "https://pub.dartlang.org" + sha256: "6e7eac89047ab8a8d26cf16127b5ed26de65209847630400f9aefd7cd5c730db" + url: "https://pub.dev" + source: hosted + version: "2.0.2" + oauth2: + dependency: transitive + description: + name: oauth2 + sha256: c4013ef62be37744efdc0861878fd9e9285f34db1f9e331cc34100d7674feb42 + url: "https://pub.dev" + source: hosted + version: "2.0.2" + os_detect: + dependency: transitive + description: + name: os_detect + sha256: faf3bcf39515e64da8ff76b2f2805b20a6ff47ae515393e535f8579ff91d6b7f + url: "https://pub.dev" source: hosted version: "2.0.1" package_config: dependency: transitive description: name: package_config - url: "https://pub.dartlang.org" + sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" + url: "https://pub.dev" source: hosted version: "2.1.0" package_info_plus: dependency: "direct main" description: name: package_info_plus - url: "https://pub.dartlang.org" + sha256: "7e76fad405b3e4016cd39d08f455a4eb5199723cf594cd1b8916d47140d93017" + url: "https://pub.dev" source: hosted - version: "1.4.3+1" - package_info_plus_linux: + version: "4.2.0" + package_info_plus_platform_interface: dependency: transitive description: - name: package_info_plus_linux - url: "https://pub.dartlang.org" + name: package_info_plus_platform_interface + sha256: "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6" + url: "https://pub.dev" source: hosted - version: "1.0.5" - package_info_plus_macos: + version: "2.0.1" + path: dependency: transitive description: - name: package_info_plus_macos - url: "https://pub.dartlang.org" + name: path + sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + url: "https://pub.dev" source: hosted - version: "1.3.0" - package_info_plus_platform_interface: + version: "1.8.3" + path_provider: dependency: transitive description: - name: package_info_plus_platform_interface - url: "https://pub.dartlang.org" + name: path_provider + sha256: a1aa8aaa2542a6bc57e381f132af822420216c80d4781f7aa085ca3229208aaa + url: "https://pub.dev" source: hosted - version: "1.0.2" - package_info_plus_web: + version: "2.1.1" + path_provider_android: dependency: transitive description: - name: package_info_plus_web - url: "https://pub.dartlang.org" + name: path_provider_android + sha256: "477184d672607c0a3bf68fbbf601805f92ef79c82b64b4d6eb318cbca4c48668" + url: "https://pub.dev" source: hosted - version: "1.0.6" - package_info_plus_windows: + version: "2.2.2" + path_provider_foundation: dependency: transitive description: - name: package_info_plus_windows - url: "https://pub.dartlang.org" + name: path_provider_foundation + sha256: "19314d595120f82aca0ba62787d58dde2cc6b5df7d2f0daf72489e38d1b57f2d" + url: "https://pub.dev" source: hosted - version: "2.1.0" - path: + version: "2.3.1" + path_provider_linux: dependency: transitive description: - name: path - url: "https://pub.dartlang.org" + name: path_provider_linux + sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 + url: "https://pub.dev" + source: hosted + version: "2.2.1" + path_provider_platform_interface: + dependency: transitive + description: + name: path_provider_platform_interface + sha256: "94b1e0dd80970c1ce43d5d4e050a9918fce4f4a775e6142424c30a29a363265c" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + path_provider_windows: + dependency: transitive + description: + name: path_provider_windows + sha256: "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170" + url: "https://pub.dev" source: hosted - version: "1.8.2" + version: "2.2.1" permission_handler: dependency: "direct main" description: name: permission_handler - url: "https://pub.dartlang.org" + sha256: bc56bfe9d3f44c3c612d8d393bd9b174eb796d706759f9b495ac254e4294baa5 + url: "https://pub.dev" source: hosted - version: "10.2.0" + version: "10.4.5" permission_handler_android: dependency: transitive description: name: permission_handler_android - url: "https://pub.dartlang.org" + sha256: "59c6322171c29df93a22d150ad95f3aa19ed86542eaec409ab2691b8f35f9a47" + url: "https://pub.dev" source: hosted - version: "10.2.0" + version: "10.3.6" permission_handler_apple: dependency: transitive description: name: permission_handler_apple - url: "https://pub.dartlang.org" + sha256: "99e220bce3f8877c78e4ace901082fb29fa1b4ebde529ad0932d8d664b34f3f5" + url: "https://pub.dev" source: hosted - version: "9.0.7" + version: "9.1.4" permission_handler_platform_interface: dependency: transitive description: name: permission_handler_platform_interface - url: "https://pub.dartlang.org" + sha256: "6760eb5ef34589224771010805bea6054ad28453906936f843a8cc4d3a55c4a4" + url: "https://pub.dev" source: hosted - version: "3.9.0" + version: "3.12.0" permission_handler_windows: dependency: transitive description: name: permission_handler_windows - url: "https://pub.dartlang.org" + sha256: cc074aace208760f1eee6aa4fae766b45d947df85bc831cde77009cdb4720098 + url: "https://pub.dev" source: hosted - version: "0.1.2" + version: "0.1.3" petitparser: dependency: transitive description: name: petitparser - url: "https://pub.dartlang.org" + sha256: cb3798bef7fc021ac45b308f4b51208a152792445cce0448c9a4ba5879dd8750 + url: "https://pub.dev" source: hosted - version: "5.1.0" + version: "5.4.0" + platform: + dependency: transitive + description: + name: platform + sha256: "0a279f0707af40c890e80b1e9df8bb761694c074ba7e1d4ab1bc4b728e200b59" + url: "https://pub.dev" + source: hosted + version: "3.1.3" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - url: "https://pub.dartlang.org" + sha256: f4f88d4a900933e7267e2b353594774fc0d07fb072b47eedcd5b54e1ea3269f8 + url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.1.7" pointycastle: dependency: transitive description: name: pointycastle - url: "https://pub.dartlang.org" + sha256: "7c1e5f0d23c9016c5bbd8b1473d0d3fb3fc851b876046039509e18e0c7485f2c" + url: "https://pub.dev" source: hosted - version: "3.6.2" + version: "3.7.3" pool: dependency: transitive description: name: pool - url: "https://pub.dartlang.org" + sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" + url: "https://pub.dev" source: hosted version: "1.5.1" provider: dependency: "direct main" description: name: provider - url: "https://pub.dartlang.org" + sha256: "9a96a0a19b594dbc5bf0f1f27d2bc67d5f95957359b461cd9feb44ed6ae75096" + url: "https://pub.dev" source: hosted - version: "6.0.4" + version: "6.1.1" pub_semver: dependency: transitive description: name: pub_semver - url: "https://pub.dartlang.org" + sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + qr: + dependency: transitive + description: + name: qr + sha256: "64957a3930367bf97cc211a5af99551d630f2f4625e38af10edd6b19131b64b3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" + qr_flutter: + dependency: transitive + description: + name: qr_flutter + sha256: "5095f0fc6e3f71d08adef8feccc8cea4f12eec18a2e31c2e8d82cb6019f4b097" + url: "https://pub.dev" + source: hosted + version: "4.1.0" + retry: + dependency: transitive + description: + name: retry + sha256: "822e118d5b3aafed083109c72d5f484c6dc66707885e07c0fbcb8b986bba7efc" + url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "3.1.2" shelf: dependency: transitive description: name: shelf - url: "https://pub.dartlang.org" + sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 + url: "https://pub.dev" source: hosted - version: "1.4.0" + version: "1.4.1" shelf_packages_handler: dependency: transitive description: name: shelf_packages_handler - url: "https://pub.dartlang.org" + sha256: "89f967eca29607c933ba9571d838be31d67f53f6e4ee15147d5dc2934fee1b1e" + url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.2" shelf_static: dependency: transitive description: name: shelf_static - url: "https://pub.dartlang.org" + sha256: a41d3f53c4adf0f57480578c1d61d90342cd617de7fc8077b1304643c2d85c1e + url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.1.2" shelf_web_socket: dependency: transitive description: name: shelf_web_socket - url: "https://pub.dartlang.org" + sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" + url: "https://pub.dev" source: hosted - version: "1.0.3" + version: "1.0.4" sky_engine: dependency: transitive description: flutter source: sdk version: "0.0.99" + smithy: + dependency: transitive + description: + name: smithy + sha256: b8a0d4314604a4d1ca48084c691b0ac289d5686c358c839cadf5a0db99f9a095 + url: "https://pub.dev" + source: hosted + version: "0.6.2" + smithy_aws: + dependency: transitive + description: + name: smithy_aws + sha256: "313879bbd5d30d676a7c6da8ba4c36fb03f47a5df458d764160b79a549503ba0" + url: "https://pub.dev" + source: hosted + version: "0.6.1" source_map_stack_trace: dependency: transitive description: name: source_map_stack_trace - url: "https://pub.dartlang.org" + sha256: "84cf769ad83aa6bb61e0aa5a18e53aea683395f196a6f39c4c881fb90ed4f7ae" + url: "https://pub.dev" source: hosted version: "2.1.1" source_maps: dependency: transitive description: name: source_maps - url: "https://pub.dartlang.org" + sha256: "708b3f6b97248e5781f493b765c3337db11c5d2c81c3094f10904bfa8004c703" + url: "https://pub.dev" source: hosted - version: "0.10.11" + version: "0.10.12" source_span: dependency: transitive description: name: source_span - url: "https://pub.dartlang.org" + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" source: hosted - version: "1.9.0" + version: "1.10.0" + sprintf: + dependency: transitive + description: + name: sprintf + sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" + url: "https://pub.dev" + source: hosted + version: "7.0.0" + sqlite3: + dependency: transitive + description: + name: sqlite3 + sha256: c4a4c5a4b2a32e2d0f6837b33d7c91a67903891a5b7dbe706cf4b1f6b0c798c5 + url: "https://pub.dev" + source: hosted + version: "2.3.0" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.dartlang.org" + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.11.1" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.dartlang.org" + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.2" stream_transform: dependency: transitive description: name: stream_transform - url: "https://pub.dartlang.org" + sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" + url: "https://pub.dev" source: hosted version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.dartlang.org" + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.2.0" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.dartlang.org" + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" source: hosted version: "1.2.1" test: dependency: "direct dev" description: name: test - url: "https://pub.dartlang.org" + sha256: a1f7595805820fcc05e5c52e3a231aedd0b72972cb333e8c738a8b1239448b6f + url: "https://pub.dev" source: hosted - version: "1.21.4" + version: "1.24.9" test_api: dependency: transitive description: name: test_api - url: "https://pub.dartlang.org" + sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + url: "https://pub.dev" source: hosted - version: "0.4.12" + version: "0.6.1" test_core: dependency: transitive description: name: test_core - url: "https://pub.dartlang.org" + sha256: a757b14fc47507060a162cc2530d9a4a2f92f5100a952c7443b5cad5ef5b106a + url: "https://pub.dev" source: hosted - version: "0.4.16" + version: "0.5.9" + tuple: + dependency: transitive + description: + name: tuple + sha256: a97ce2013f240b2f3807bcbaf218765b6f301c3eff91092bcfa23a039e7dd151 + url: "https://pub.dev" + source: hosted + version: "2.0.2" typed_data: dependency: transitive description: name: typed_data - url: "https://pub.dartlang.org" + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + url: "https://pub.dev" source: hosted - version: "1.3.1" + version: "1.3.2" + url_launcher: + dependency: transitive + description: + name: url_launcher + sha256: e9aa5ea75c84cf46b3db4eea212523591211c3cf2e13099ee4ec147f54201c86 + url: "https://pub.dev" + source: hosted + version: "6.2.2" + url_launcher_android: + dependency: transitive + description: + name: url_launcher_android + sha256: "31222ffb0063171b526d3e569079cf1f8b294075ba323443fdc690842bfd4def" + url: "https://pub.dev" + source: hosted + version: "6.2.0" + url_launcher_ios: + dependency: transitive + description: + name: url_launcher_ios + sha256: bba3373219b7abb6b5e0d071b0fe66dfbe005d07517a68e38d4fc3638f35c6d3 + url: "https://pub.dev" + source: hosted + version: "6.2.1" + url_launcher_linux: + dependency: transitive + description: + name: url_launcher_linux + sha256: ab360eb661f8879369acac07b6bb3ff09d9471155357da8443fd5d3cf7363811 + url: "https://pub.dev" + source: hosted + version: "3.1.1" + url_launcher_macos: + dependency: transitive + description: + name: url_launcher_macos + sha256: b7244901ea3cf489c5335bdacda07264a6e960b1c1b1a9f91e4bc371d9e68234 + url: "https://pub.dev" + source: hosted + version: "3.1.0" + url_launcher_platform_interface: + dependency: transitive + description: + name: url_launcher_platform_interface + sha256: "980e8d9af422f477be6948bdfb68df8433be71f5743a188968b0c1b887807e50" + url: "https://pub.dev" + source: hosted + version: "2.2.0" + url_launcher_web: + dependency: transitive + description: + name: url_launcher_web + sha256: "7286aec002c8feecc338cc33269e96b73955ab227456e9fb2a91f7fab8a358e9" + url: "https://pub.dev" + source: hosted + version: "2.2.2" + url_launcher_windows: + dependency: transitive + description: + name: url_launcher_windows + sha256: ecf9725510600aa2bb6d7ddabe16357691b6d2805f66216a97d1b881e21beff7 + url: "https://pub.dev" + source: hosted + version: "3.1.1" uuid: dependency: transitive description: name: uuid - url: "https://pub.dartlang.org" + sha256: "22c94e5ad1e75f9934b766b53c742572ee2677c56bc871d850a57dad0f82127f" + url: "https://pub.dev" source: hosted - version: "3.0.6" + version: "4.2.2" vector_math: dependency: transitive description: name: vector_math - url: "https://pub.dartlang.org" + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.4" vm_service: dependency: transitive description: name: vm_service - url: "https://pub.dartlang.org" + sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + url: "https://pub.dev" source: hosted - version: "9.4.0" + version: "13.0.0" watcher: dependency: transitive description: name: watcher - url: "https://pub.dartlang.org" + sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" + url: "https://pub.dev" source: hosted - version: "1.0.2" + version: "1.1.0" + web: + dependency: transitive + description: + name: web + sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 + url: "https://pub.dev" + source: hosted + version: "0.3.0" web_socket_channel: dependency: transitive description: name: web_socket_channel - url: "https://pub.dartlang.org" + sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b + url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.4.0" webkit_inspection_protocol: dependency: transitive description: name: webkit_inspection_protocol - url: "https://pub.dartlang.org" + sha256: "87d3f2333bb240704cd3f1c6b5b7acd8a10e7f0bc28c28dcf14e782014f4a572" + url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.1" win32: dependency: transitive description: name: win32 - url: "https://pub.dartlang.org" + sha256: b0f37db61ba2f2e9b7a78a1caece0052564d1bc70668156cf3a29d676fe4e574 + url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "5.1.1" + win32_registry: + dependency: transitive + description: + name: win32_registry + sha256: "41fd8a189940d8696b1b810efb9abcf60827b6cbfab90b0c43e8439e3a39d85a" + url: "https://pub.dev" + source: hosted + version: "1.1.2" + worker_bee: + dependency: transitive + description: + name: worker_bee + sha256: "77336028ef2c9bfa17a47c575b3ca6d6cb2ccbd7af7913ed3c93a02fc214023c" + url: "https://pub.dev" + source: hosted + version: "0.2.2" + xdg_directories: + dependency: transitive + description: + name: xdg_directories + sha256: "589ada45ba9e39405c198fe34eb0f607cddb2108527e658136120892beac46d2" + url: "https://pub.dev" + source: hosted + version: "1.0.3" xml: dependency: transitive description: name: xml - url: "https://pub.dartlang.org" + sha256: "5bc72e1e45e941d825fd7468b9b4cc3b9327942649aeb6fc5cdbf135f0a86e84" + url: "https://pub.dev" source: hosted - version: "6.1.0" + version: "6.3.0" yaml: dependency: transitive description: name: yaml - url: "https://pub.dartlang.org" + sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" + url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "3.1.2" sdks: - dart: ">=2.18.5 <3.0.0" - flutter: ">=2.10.0" + dart: ">=3.2.0 <4.0.0" + flutter: ">=3.16.0" diff --git a/pubspec.yaml b/pubspec.yaml index 00bd4c3..4684a46 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -34,17 +34,17 @@ dependencies: cupertino_icons: ^1.0.2 - amplify_flutter: ^0.6.0 - amplify_datastore: ^0.6.0 - amplify_auth_cognito: ^0.6.0 - amplify_authenticator: ^0.2.0 - amplify_api: ^0.6.10 + amplify_flutter: ^1.6.1 + amplify_datastore: ^1.6.0 + amplify_auth_cognito: ^1.6.1 + amplify_authenticator: ^1.5.2 + amplify_api: ^1.6.2 permission_handler: ^10.2.0 nfc_manager: ^3.2.0 provider: any badges: ^2.0.3 - package_info_plus: ^1.0.6 + package_info_plus: ^4.2.0 fluttertoast: ^8.1.1 dev_dependencies: diff --git a/windows/flutter/CMakeLists.txt b/windows/flutter/CMakeLists.txt index 930d207..903f489 100644 --- a/windows/flutter/CMakeLists.txt +++ b/windows/flutter/CMakeLists.txt @@ -10,6 +10,11 @@ include(${EPHEMERAL_DIR}/generated_config.cmake) # https://github.com/flutter/flutter/issues/57146. set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper") +# Set fallback configurations for older versions of the flutter tool. +if (NOT DEFINED FLUTTER_TARGET_PLATFORM) + set(FLUTTER_TARGET_PLATFORM "windows-x64") +endif() + # === Flutter Library === set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll") @@ -92,7 +97,7 @@ add_custom_command( COMMAND ${CMAKE_COMMAND} -E env ${FLUTTER_TOOL_ENVIRONMENT} "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" - windows-x64 $ + ${FLUTTER_TARGET_PLATFORM} $ VERBATIM ) add_custom_target(flutter_assemble DEPENDS diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc index 48de52b..8f6c095 100644 --- a/windows/flutter/generated_plugin_registrant.cc +++ b/windows/flutter/generated_plugin_registrant.cc @@ -6,9 +6,18 @@ #include "generated_plugin_registrant.h" +#include +#include #include +#include void RegisterPlugins(flutter::PluginRegistry* registry) { + AmplifyDbCommonPluginRegisterWithRegistrar( + registry->GetRegistrarForPlugin("AmplifyDbCommonPlugin")); + ConnectivityPlusWindowsPluginRegisterWithRegistrar( + registry->GetRegistrarForPlugin("ConnectivityPlusWindowsPlugin")); PermissionHandlerWindowsPluginRegisterWithRegistrar( registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin")); + UrlLauncherWindowsRegisterWithRegistrar( + registry->GetRegistrarForPlugin("UrlLauncherWindows")); } diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake index 0e69e40..f067294 100644 --- a/windows/flutter/generated_plugins.cmake +++ b/windows/flutter/generated_plugins.cmake @@ -3,7 +3,10 @@ # list(APPEND FLUTTER_PLUGIN_LIST + amplify_db_common + connectivity_plus permission_handler_windows + url_launcher_windows ) list(APPEND FLUTTER_FFI_PLUGIN_LIST From 46802d9c9671d6574848e95c862519b5882a3cfc Mon Sep 17 00:00:00 2001 From: John Ramberger Date: Sun, 31 Dec 2023 22:47:04 -0500 Subject: [PATCH 2/6] Update pubspec.yaml --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index 4684a46..f36bd35 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -20,7 +20,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 1.1.3 environment: - sdk: '>=2.18.5 <3.0.0' + sdk: '>=3.0.0 <4.0.0' # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions From b54d1e7178a7b7514c7f0214f6c53386076348c5 Mon Sep 17 00:00:00 2001 From: John Ramberger Date: Mon, 1 Jan 2024 00:47:05 -0500 Subject: [PATCH 3/6] Update pubspec.yaml --- pubspec.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pubspec.yaml b/pubspec.yaml index f36bd35..38cbf14 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -17,10 +17,10 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 1.1.3 +version: 1.2.0 environment: - sdk: '>=3.0.0 <4.0.0' + sdk: '>=2.18.5 <4.0.0' # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions From bfa4b3a98a43a87a29a7ac482756f9e7f2f81d52 Mon Sep 17 00:00:00 2001 From: John Ramberger Date: Mon, 1 Jan 2024 01:24:23 -0500 Subject: [PATCH 4/6] fix versions --- pubspec.lock | 52 ++++++++++++++++++++++++++++++---------------------- pubspec.yaml | 12 ++++++------ 2 files changed, 36 insertions(+), 28 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index 6bb9f8e..9f9e58e 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -181,10 +181,10 @@ packages: dependency: "direct main" description: name: badges - sha256: "727580d938b7a1ff47ea42df730d581415606b4224cfa708671c10287f8d3fe6" + sha256: a7b6bbd60dce418df0db3058b53f9d083c22cdb5132a052145dc267494df0b84 url: "https://pub.dev" source: hosted - version: "2.0.3" + version: "3.1.2" boolean_selector: dependency: transitive description: @@ -229,10 +229,10 @@ packages: dependency: transitive description: name: cli_util - sha256: "66f86e916d285c1a93d3b79587d94bd71984a66aac4ff74e524cfa7877f1395c" + sha256: c05b7406fdabc7a49a3929d4af76bcaccbbffcbcdcf185b082e1ae07da323d19 url: "https://pub.dev" source: hosted - version: "0.3.5" + version: "0.4.1" clock: dependency: transitive description: @@ -378,18 +378,18 @@ packages: dependency: "direct dev" description: name: flutter_launcher_icons - sha256: ce0e501cfc258907842238e4ca605e74b7fd1cdf04b3b43e86c43f3e40a1592c + sha256: "526faf84284b86a4cb36d20a5e45147747b7563d921373d4ee0559c54fcdbcea" url: "https://pub.dev" source: hosted - version: "0.11.0" + version: "0.13.1" flutter_lints: dependency: "direct dev" description: name: flutter_lints - sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04 + sha256: e2a421b7e59244faef694ba7b30562e489c2b489866e505074eb005cd7060db7 url: "https://pub.dev" source: hosted - version: "2.0.3" + version: "3.0.1" flutter_localizations: dependency: transitive description: flutter @@ -473,10 +473,10 @@ packages: dependency: transitive description: name: image - sha256: "8e9d133755c3e84c73288363e6343157c383a0c6c56fc51afcc5d4d7180306d6" + sha256: "028f61960d56f26414eb616b48b04eb37d700cbe477b7fb09bf1d7ce57fd9271" url: "https://pub.dev" source: hosted - version: "3.3.0" + version: "4.1.3" intl: dependency: transitive description: @@ -513,10 +513,10 @@ packages: dependency: transitive description: name: lints - sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452" + sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290 url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "3.0.0" logging: dependency: transitive description: @@ -689,42 +689,50 @@ packages: dependency: "direct main" description: name: permission_handler - sha256: bc56bfe9d3f44c3c612d8d393bd9b174eb796d706759f9b495ac254e4294baa5 + sha256: "860c6b871c94c78e202dc69546d4d8fd84bd59faeb36f8fb9888668a53ff4f78" url: "https://pub.dev" source: hosted - version: "10.4.5" + version: "11.1.0" permission_handler_android: dependency: transitive description: name: permission_handler_android - sha256: "59c6322171c29df93a22d150ad95f3aa19ed86542eaec409ab2691b8f35f9a47" + sha256: "2f1bec180ee2f5665c22faada971a8f024761f632e93ddc23310487df52dcfa6" url: "https://pub.dev" source: hosted - version: "10.3.6" + version: "12.0.1" permission_handler_apple: dependency: transitive description: name: permission_handler_apple - sha256: "99e220bce3f8877c78e4ace901082fb29fa1b4ebde529ad0932d8d664b34f3f5" + sha256: "1a816084338ada8d574b1cb48390e6e8b19305d5120fe3a37c98825bacc78306" + url: "https://pub.dev" + source: hosted + version: "9.2.0" + permission_handler_html: + dependency: transitive + description: + name: permission_handler_html + sha256: "11b762a8c123dced6461933a88ea1edbbe036078c3f9f41b08886e678e7864df" url: "https://pub.dev" source: hosted - version: "9.1.4" + version: "0.1.0+2" permission_handler_platform_interface: dependency: transitive description: name: permission_handler_platform_interface - sha256: "6760eb5ef34589224771010805bea6054ad28453906936f843a8cc4d3a55c4a4" + sha256: d87349312f7eaf6ce0adaf668daf700ac5b06af84338bd8b8574dfbd93ffe1a1 url: "https://pub.dev" source: hosted - version: "3.12.0" + version: "4.0.2" permission_handler_windows: dependency: transitive description: name: permission_handler_windows - sha256: cc074aace208760f1eee6aa4fae766b45d947df85bc831cde77009cdb4720098 + sha256: "1e8640c1e39121128da6b816d236e714d2cf17fac5a105dd6acdd3403a628004" url: "https://pub.dev" source: hosted - version: "0.1.3" + version: "0.2.0" petitparser: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 38cbf14..948e1d9 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -20,7 +20,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 1.2.0 environment: - sdk: '>=2.18.5 <4.0.0' + sdk: '>=3.0.0 <4.0.0' # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions @@ -40,26 +40,26 @@ dependencies: amplify_authenticator: ^1.5.2 amplify_api: ^1.6.2 - permission_handler: ^10.2.0 + permission_handler: ^11.1.0 nfc_manager: ^3.2.0 provider: any - badges: ^2.0.3 + badges: ^3.1.2 package_info_plus: ^4.2.0 fluttertoast: ^8.1.1 dev_dependencies: flutter_test: sdk: flutter - test: ^1.10.0 + test: ^1.24.9 - flutter_launcher_icons: "^0.11.0" + flutter_launcher_icons: ^0.13.1 # The "flutter_lints" package below contains a set of recommended lints to # encourage good coding practices. The lint set provided by the package is # activated in the `analysis_options.yaml` file located at the root of your # package. See that file for information about deactivating specific lint # rules and activating additional ones. - flutter_lints: ^2.0.0 + flutter_lints: ^3.0.1 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec From 01d0b094ee06a172579ebbc59364a0e20b349d21 Mon Sep 17 00:00:00 2001 From: John Ramberger Date: Mon, 1 Jan 2024 01:29:53 -0500 Subject: [PATCH 5/6] Update flutter.yaml --- .github/workflows/flutter.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/flutter.yaml b/.github/workflows/flutter.yaml index 092f9e6..0438c17 100644 --- a/.github/workflows/flutter.yaml +++ b/.github/workflows/flutter.yaml @@ -46,7 +46,7 @@ jobs: - name: do flutter stuff uses: subosito/flutter-action@v2 with: - flutter-version: "3.3.9" + flutter-version: "3.16.5 - run: flutter pub get - run: flutter test - run: flutter build apk From 0563b0bfc9a7689d7b83961e933d512325b2ed99 Mon Sep 17 00:00:00 2001 From: John Ramberger Date: Mon, 1 Jan 2024 01:30:23 -0500 Subject: [PATCH 6/6] Update flutter.yaml --- .github/workflows/flutter.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/flutter.yaml b/.github/workflows/flutter.yaml index 0438c17..6049865 100644 --- a/.github/workflows/flutter.yaml +++ b/.github/workflows/flutter.yaml @@ -46,7 +46,7 @@ jobs: - name: do flutter stuff uses: subosito/flutter-action@v2 with: - flutter-version: "3.16.5 + flutter-version: "3.16.5" - run: flutter pub get - run: flutter test - run: flutter build apk