From 3b77899d3e0515b0a005ab4174d223e7a36c4af2 Mon Sep 17 00:00:00 2001 From: Ruslan Bakiev Date: Mon, 22 Jun 2026 13:28:09 +0700 Subject: [PATCH] Unify startup loader and thin places query --- .../graphql/__generated__/places.ast.gql.dart | 221 +++------ .../__generated__/places.data.gql.dart | 71 +-- .../__generated__/places.data.gql.g.dart | 460 +----------------- .../graphql/__generated__/places.req.gql.dart | 35 +- .../graphql/__generated__/places.var.gql.dart | 12 +- .../__generated__/serializers.gql.dart | 3 +- .../__generated__/serializers.gql.g.dart | 27 +- .../mapflow/data/graphql/places.graphql | 11 - .../mapflow/data/mapflow_data_mappers.dart | 12 +- .../mapflow/presentation/mapflow_shell.dart | 43 +- 10 files changed, 177 insertions(+), 718 deletions(-) diff --git a/lib/features/mapflow/data/graphql/__generated__/places.ast.gql.dart b/lib/features/mapflow/data/graphql/__generated__/places.ast.gql.dart index f8d00fe..b42ae32 100644 --- a/lib/features/mapflow/data/graphql/__generated__/places.ast.gql.dart +++ b/lib/features/mapflow/data/graphql/__generated__/places.ast.gql.dart @@ -9,155 +9,78 @@ const Places = _i1.OperationDefinitionNode( name: _i1.NameNode(value: 'Places'), variableDefinitions: [], directives: [], - selectionSet: _i1.SelectionSetNode( - selections: [ - _i1.FieldNode( - name: _i1.NameNode(value: 'places'), - alias: null, - arguments: [], - directives: [], - selectionSet: _i1.SelectionSetNode( - selections: [ - _i1.FieldNode( - name: _i1.NameNode(value: 'id'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - _i1.FieldNode( - name: _i1.NameNode(value: 'googlePlaceId'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - _i1.FieldNode( - name: _i1.NameNode(value: 'name'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - _i1.FieldNode( - name: _i1.NameNode(value: 'latitude'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - _i1.FieldNode( - name: _i1.NameNode(value: 'longitude'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - _i1.FieldNode( - name: _i1.NameNode(value: 'googlePrimaryType'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - _i1.FieldNode( - name: _i1.NameNode(value: 'googleTypes'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - _i1.FieldNode( - name: _i1.NameNode(value: 'googleBusinessStatus'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - _i1.FieldNode( - name: _i1.NameNode(value: 'googleRating'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - _i1.FieldNode( - name: _i1.NameNode(value: 'googleUserRatingCount'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - _i1.FieldNode( - name: _i1.NameNode(value: 'googleRegularOpeningHours'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - _i1.FieldNode( - name: _i1.NameNode(value: 'googleCurrentOpeningHours'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - _i1.FieldNode( - name: _i1.NameNode(value: 'photoUrls'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - _i1.FieldNode( - name: _i1.NameNode(value: 'traits'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - _i1.FieldNode( - name: _i1.NameNode(value: 'isFavorite'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - _i1.FieldNode( - name: _i1.NameNode(value: 'experiences'), - alias: null, - arguments: [], - directives: [], - selectionSet: _i1.SelectionSetNode( - selections: [ - _i1.FieldNode( - name: _i1.NameNode(value: 'id'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - _i1.FieldNode( - name: _i1.NameNode(value: 'status'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - _i1.FieldNode( - name: _i1.NameNode(value: 'createdAt'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), - ], - ), - ), - ], + selectionSet: _i1.SelectionSetNode(selections: [ + _i1.FieldNode( + name: _i1.NameNode(value: 'places'), + alias: null, + arguments: [], + directives: [], + selectionSet: _i1.SelectionSetNode(selections: [ + _i1.FieldNode( + name: _i1.NameNode(value: 'id'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, ), - ), - ], - ), + _i1.FieldNode( + name: _i1.NameNode(value: 'googlePlaceId'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'name'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'latitude'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'longitude'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'googlePrimaryType'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'googleTypes'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'traits'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'isFavorite'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ) + ]), ); const document = _i1.DocumentNode(definitions: [Places]); diff --git a/lib/features/mapflow/data/graphql/__generated__/places.data.gql.dart b/lib/features/mapflow/data/graphql/__generated__/places.data.gql.dart index f79e86c..9e3d46a 100644 --- a/lib/features/mapflow/data/graphql/__generated__/places.data.gql.dart +++ b/lib/features/mapflow/data/graphql/__generated__/places.data.gql.dart @@ -4,10 +4,7 @@ // ignore_for_file: no_leading_underscores_for_library_prefixes import 'package:built_collection/built_collection.dart'; import 'package:built_value/built_value.dart'; -import 'package:built_value/json_object.dart' as _i2; import 'package:built_value/serializer.dart'; -import 'package:mapflow/features/mapflow/data/graphql/__generated__/schema.schema.gql.dart' - as _i3; import 'package:mapflow/features/mapflow/data/graphql/__generated__/serializers.gql.dart' as _i1; @@ -27,21 +24,25 @@ abstract class GPlacesData implements Built { BuiltList get places; static Serializer get serializer => _$gPlacesDataSerializer; - Map toJson() => - (_i1.serializers.serializeWith(GPlacesData.serializer, this) - as Map); + Map toJson() => (_i1.serializers.serializeWith( + GPlacesData.serializer, + this, + ) as Map); static GPlacesData? fromJson(Map json) => - _i1.serializers.deserializeWith(GPlacesData.serializer, json); + _i1.serializers.deserializeWith( + GPlacesData.serializer, + json, + ); } abstract class GPlacesData_places implements Built { GPlacesData_places._(); - factory GPlacesData_places([ - void Function(GPlacesData_placesBuilder b) updates, - ]) = _$GPlacesData_places; + factory GPlacesData_places( + [void Function(GPlacesData_placesBuilder b) updates]) = + _$GPlacesData_places; static void _initializeBuilder(GPlacesData_placesBuilder b) => b..G__typename = 'Place'; @@ -55,59 +56,19 @@ abstract class GPlacesData_places double get longitude; String? get googlePrimaryType; BuiltList get googleTypes; - String? get googleBusinessStatus; - double? get googleRating; - int? get googleUserRatingCount; - _i2.JsonObject? get googleRegularOpeningHours; - _i2.JsonObject? get googleCurrentOpeningHours; - BuiltList get photoUrls; BuiltList get traits; bool get isFavorite; - BuiltList get experiences; static Serializer get serializer => _$gPlacesDataPlacesSerializer; - Map toJson() => - (_i1.serializers.serializeWith(GPlacesData_places.serializer, this) - as Map); + Map toJson() => (_i1.serializers.serializeWith( + GPlacesData_places.serializer, + this, + ) as Map); static GPlacesData_places? fromJson(Map json) => - _i1.serializers.deserializeWith(GPlacesData_places.serializer, json); -} - -abstract class GPlacesData_places_experiences - implements - Built< - GPlacesData_places_experiences, - GPlacesData_places_experiencesBuilder - > { - GPlacesData_places_experiences._(); - - factory GPlacesData_places_experiences([ - void Function(GPlacesData_places_experiencesBuilder b) updates, - ]) = _$GPlacesData_places_experiences; - - static void _initializeBuilder(GPlacesData_places_experiencesBuilder b) => - b..G__typename = 'VoiceExperience'; - - @BuiltValueField(wireName: '__typename') - String get G__typename; - String get id; - _i3.GVoiceExperienceStatus get status; - String get createdAt; - static Serializer get serializer => - _$gPlacesDataPlacesExperiencesSerializer; - - Map toJson() => - (_i1.serializers.serializeWith( - GPlacesData_places_experiences.serializer, - this, - ) - as Map); - - static GPlacesData_places_experiences? fromJson(Map json) => _i1.serializers.deserializeWith( - GPlacesData_places_experiences.serializer, + GPlacesData_places.serializer, json, ); } diff --git a/lib/features/mapflow/data/graphql/__generated__/places.data.gql.g.dart b/lib/features/mapflow/data/graphql/__generated__/places.data.gql.g.dart index 4f46c57..715bbb4 100644 --- a/lib/features/mapflow/data/graphql/__generated__/places.data.gql.g.dart +++ b/lib/features/mapflow/data/graphql/__generated__/places.data.gql.g.dart @@ -9,9 +9,6 @@ part of 'places.data.gql.dart'; Serializer _$gPlacesDataSerializer = _$GPlacesDataSerializer(); Serializer _$gPlacesDataPlacesSerializer = _$GPlacesData_placesSerializer(); -Serializer -_$gPlacesDataPlacesExperiencesSerializer = - _$GPlacesData_places_experiencesSerializer(); class _$GPlacesDataSerializer implements StructuredSerializer { @override @@ -128,13 +125,6 @@ class _$GPlacesData_placesSerializer const FullType(String), ]), ), - 'photoUrls', - serializers.serialize( - object.photoUrls, - specifiedType: const FullType(BuiltList, const [ - const FullType(String), - ]), - ), 'traits', serializers.serialize( object.traits, @@ -147,13 +137,6 @@ class _$GPlacesData_placesSerializer object.isFavorite, specifiedType: const FullType(bool), ), - 'experiences', - serializers.serialize( - object.experiences, - specifiedType: const FullType(BuiltList, const [ - const FullType(GPlacesData_places_experiences), - ]), - ), ]; Object? value; value = object.googlePrimaryType; @@ -164,50 +147,6 @@ class _$GPlacesData_placesSerializer serializers.serialize(value, specifiedType: const FullType(String)), ); } - value = object.googleBusinessStatus; - if (value != null) { - result - ..add('googleBusinessStatus') - ..add( - serializers.serialize(value, specifiedType: const FullType(String)), - ); - } - value = object.googleRating; - if (value != null) { - result - ..add('googleRating') - ..add( - serializers.serialize(value, specifiedType: const FullType(double)), - ); - } - value = object.googleUserRatingCount; - if (value != null) { - result - ..add('googleUserRatingCount') - ..add(serializers.serialize(value, specifiedType: const FullType(int))); - } - value = object.googleRegularOpeningHours; - if (value != null) { - result - ..add('googleRegularOpeningHours') - ..add( - serializers.serialize( - value, - specifiedType: const FullType(_i2.JsonObject), - ), - ); - } - value = object.googleCurrentOpeningHours; - if (value != null) { - result - ..add('googleCurrentOpeningHours') - ..add( - serializers.serialize( - value, - specifiedType: const FullType(_i2.JsonObject), - ), - ); - } return result; } @@ -292,54 +231,6 @@ class _$GPlacesData_placesSerializer as BuiltList, ); break; - case 'googleBusinessStatus': - result.googleBusinessStatus = - serializers.deserialize( - value, - specifiedType: const FullType(String), - ) - as String?; - break; - case 'googleRating': - result.googleRating = - serializers.deserialize( - value, - specifiedType: const FullType(double), - ) - as double?; - break; - case 'googleUserRatingCount': - result.googleUserRatingCount = - serializers.deserialize(value, specifiedType: const FullType(int)) - as int?; - break; - case 'googleRegularOpeningHours': - result.googleRegularOpeningHours = - serializers.deserialize( - value, - specifiedType: const FullType(_i2.JsonObject), - ) - as _i2.JsonObject?; - break; - case 'googleCurrentOpeningHours': - result.googleCurrentOpeningHours = - serializers.deserialize( - value, - specifiedType: const FullType(_i2.JsonObject), - ) - as _i2.JsonObject?; - break; - case 'photoUrls': - result.photoUrls.replace( - serializers.deserialize( - value, - specifiedType: const FullType(BuiltList, const [ - const FullType(String), - ]), - )! - as BuiltList, - ); - break; case 'traits': result.traits.replace( serializers.deserialize( @@ -359,109 +250,6 @@ class _$GPlacesData_placesSerializer )! as bool; break; - case 'experiences': - result.experiences.replace( - serializers.deserialize( - value, - specifiedType: const FullType(BuiltList, const [ - const FullType(GPlacesData_places_experiences), - ]), - )! - as BuiltList, - ); - break; - } - } - - return result.build(); - } -} - -class _$GPlacesData_places_experiencesSerializer - implements StructuredSerializer { - @override - final Iterable types = const [ - GPlacesData_places_experiences, - _$GPlacesData_places_experiences, - ]; - @override - final String wireName = 'GPlacesData_places_experiences'; - - @override - Iterable serialize( - Serializers serializers, - GPlacesData_places_experiences object, { - FullType specifiedType = FullType.unspecified, - }) { - final result = [ - '__typename', - serializers.serialize( - object.G__typename, - specifiedType: const FullType(String), - ), - 'id', - serializers.serialize(object.id, specifiedType: const FullType(String)), - 'status', - serializers.serialize( - object.status, - specifiedType: const FullType(_i3.GVoiceExperienceStatus), - ), - 'createdAt', - serializers.serialize( - object.createdAt, - specifiedType: const FullType(String), - ), - ]; - - return result; - } - - @override - GPlacesData_places_experiences deserialize( - Serializers serializers, - Iterable serialized, { - FullType specifiedType = FullType.unspecified, - }) { - final result = GPlacesData_places_experiencesBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current! as String; - iterator.moveNext(); - final Object? value = iterator.current; - switch (key) { - case '__typename': - result.G__typename = - serializers.deserialize( - value, - specifiedType: const FullType(String), - )! - as String; - break; - case 'id': - result.id = - serializers.deserialize( - value, - specifiedType: const FullType(String), - )! - as String; - break; - case 'status': - result.status = - serializers.deserialize( - value, - specifiedType: const FullType(_i3.GVoiceExperienceStatus), - )! - as _i3.GVoiceExperienceStatus; - break; - case 'createdAt': - result.createdAt = - serializers.deserialize( - value, - specifiedType: const FullType(String), - )! - as String; - break; } } @@ -603,23 +391,9 @@ class _$GPlacesData_places extends GPlacesData_places { @override final BuiltList googleTypes; @override - final String? googleBusinessStatus; - @override - final double? googleRating; - @override - final int? googleUserRatingCount; - @override - final _i2.JsonObject? googleRegularOpeningHours; - @override - final _i2.JsonObject? googleCurrentOpeningHours; - @override - final BuiltList photoUrls; - @override final BuiltList traits; @override final bool isFavorite; - @override - final BuiltList experiences; factory _$GPlacesData_places([ void Function(GPlacesData_placesBuilder)? updates, @@ -634,15 +408,8 @@ class _$GPlacesData_places extends GPlacesData_places { required this.longitude, this.googlePrimaryType, required this.googleTypes, - this.googleBusinessStatus, - this.googleRating, - this.googleUserRatingCount, - this.googleRegularOpeningHours, - this.googleCurrentOpeningHours, - required this.photoUrls, required this.traits, required this.isFavorite, - required this.experiences, }) : super._(); @override GPlacesData_places rebuild( @@ -665,15 +432,8 @@ class _$GPlacesData_places extends GPlacesData_places { longitude == other.longitude && googlePrimaryType == other.googlePrimaryType && googleTypes == other.googleTypes && - googleBusinessStatus == other.googleBusinessStatus && - googleRating == other.googleRating && - googleUserRatingCount == other.googleUserRatingCount && - googleRegularOpeningHours == other.googleRegularOpeningHours && - googleCurrentOpeningHours == other.googleCurrentOpeningHours && - photoUrls == other.photoUrls && traits == other.traits && - isFavorite == other.isFavorite && - experiences == other.experiences; + isFavorite == other.isFavorite; } @override @@ -687,15 +447,8 @@ class _$GPlacesData_places extends GPlacesData_places { _$hash = $jc(_$hash, longitude.hashCode); _$hash = $jc(_$hash, googlePrimaryType.hashCode); _$hash = $jc(_$hash, googleTypes.hashCode); - _$hash = $jc(_$hash, googleBusinessStatus.hashCode); - _$hash = $jc(_$hash, googleRating.hashCode); - _$hash = $jc(_$hash, googleUserRatingCount.hashCode); - _$hash = $jc(_$hash, googleRegularOpeningHours.hashCode); - _$hash = $jc(_$hash, googleCurrentOpeningHours.hashCode); - _$hash = $jc(_$hash, photoUrls.hashCode); _$hash = $jc(_$hash, traits.hashCode); _$hash = $jc(_$hash, isFavorite.hashCode); - _$hash = $jc(_$hash, experiences.hashCode); _$hash = $jf(_$hash); return _$hash; } @@ -711,15 +464,8 @@ class _$GPlacesData_places extends GPlacesData_places { ..add('longitude', longitude) ..add('googlePrimaryType', googlePrimaryType) ..add('googleTypes', googleTypes) - ..add('googleBusinessStatus', googleBusinessStatus) - ..add('googleRating', googleRating) - ..add('googleUserRatingCount', googleUserRatingCount) - ..add('googleRegularOpeningHours', googleRegularOpeningHours) - ..add('googleCurrentOpeningHours', googleCurrentOpeningHours) - ..add('photoUrls', photoUrls) ..add('traits', traits) - ..add('isFavorite', isFavorite) - ..add('experiences', experiences)) + ..add('isFavorite', isFavorite)) .toString(); } } @@ -764,38 +510,6 @@ class GPlacesData_placesBuilder set googleTypes(ListBuilder? googleTypes) => _$this._googleTypes = googleTypes; - String? _googleBusinessStatus; - String? get googleBusinessStatus => _$this._googleBusinessStatus; - set googleBusinessStatus(String? googleBusinessStatus) => - _$this._googleBusinessStatus = googleBusinessStatus; - - double? _googleRating; - double? get googleRating => _$this._googleRating; - set googleRating(double? googleRating) => _$this._googleRating = googleRating; - - int? _googleUserRatingCount; - int? get googleUserRatingCount => _$this._googleUserRatingCount; - set googleUserRatingCount(int? googleUserRatingCount) => - _$this._googleUserRatingCount = googleUserRatingCount; - - _i2.JsonObject? _googleRegularOpeningHours; - _i2.JsonObject? get googleRegularOpeningHours => - _$this._googleRegularOpeningHours; - set googleRegularOpeningHours(_i2.JsonObject? googleRegularOpeningHours) => - _$this._googleRegularOpeningHours = googleRegularOpeningHours; - - _i2.JsonObject? _googleCurrentOpeningHours; - _i2.JsonObject? get googleCurrentOpeningHours => - _$this._googleCurrentOpeningHours; - set googleCurrentOpeningHours(_i2.JsonObject? googleCurrentOpeningHours) => - _$this._googleCurrentOpeningHours = googleCurrentOpeningHours; - - ListBuilder? _photoUrls; - ListBuilder get photoUrls => - _$this._photoUrls ??= ListBuilder(); - set photoUrls(ListBuilder? photoUrls) => - _$this._photoUrls = photoUrls; - ListBuilder? _traits; ListBuilder get traits => _$this._traits ??= ListBuilder(); set traits(ListBuilder? traits) => _$this._traits = traits; @@ -804,12 +518,6 @@ class GPlacesData_placesBuilder bool? get isFavorite => _$this._isFavorite; set isFavorite(bool? isFavorite) => _$this._isFavorite = isFavorite; - ListBuilder? _experiences; - ListBuilder get experiences => - _$this._experiences ??= ListBuilder(); - set experiences(ListBuilder? experiences) => - _$this._experiences = experiences; - GPlacesData_placesBuilder() { GPlacesData_places._initializeBuilder(this); } @@ -825,15 +533,8 @@ class GPlacesData_placesBuilder _longitude = $v.longitude; _googlePrimaryType = $v.googlePrimaryType; _googleTypes = $v.googleTypes.toBuilder(); - _googleBusinessStatus = $v.googleBusinessStatus; - _googleRating = $v.googleRating; - _googleUserRatingCount = $v.googleUserRatingCount; - _googleRegularOpeningHours = $v.googleRegularOpeningHours; - _googleCurrentOpeningHours = $v.googleCurrentOpeningHours; - _photoUrls = $v.photoUrls.toBuilder(); _traits = $v.traits.toBuilder(); _isFavorite = $v.isFavorite; - _experiences = $v.experiences.toBuilder(); _$v = null; } return this; @@ -890,33 +591,20 @@ class GPlacesData_placesBuilder ), googlePrimaryType: googlePrimaryType, googleTypes: googleTypes.build(), - googleBusinessStatus: googleBusinessStatus, - googleRating: googleRating, - googleUserRatingCount: googleUserRatingCount, - googleRegularOpeningHours: googleRegularOpeningHours, - googleCurrentOpeningHours: googleCurrentOpeningHours, - photoUrls: photoUrls.build(), traits: traits.build(), isFavorite: BuiltValueNullFieldError.checkNotNull( isFavorite, r'GPlacesData_places', 'isFavorite', ), - experiences: experiences.build(), ); } catch (_) { late String _$failedField; try { _$failedField = 'googleTypes'; googleTypes.build(); - - _$failedField = 'photoUrls'; - photoUrls.build(); _$failedField = 'traits'; traits.build(); - - _$failedField = 'experiences'; - experiences.build(); } catch (e) { throw BuiltValueNestedFieldError( r'GPlacesData_places', @@ -931,148 +619,4 @@ class GPlacesData_placesBuilder } } -class _$GPlacesData_places_experiences extends GPlacesData_places_experiences { - @override - final String G__typename; - @override - final String id; - @override - final _i3.GVoiceExperienceStatus status; - @override - final String createdAt; - - factory _$GPlacesData_places_experiences([ - void Function(GPlacesData_places_experiencesBuilder)? updates, - ]) => (GPlacesData_places_experiencesBuilder()..update(updates))._build(); - - _$GPlacesData_places_experiences._({ - required this.G__typename, - required this.id, - required this.status, - required this.createdAt, - }) : super._(); - @override - GPlacesData_places_experiences rebuild( - void Function(GPlacesData_places_experiencesBuilder) updates, - ) => (toBuilder()..update(updates)).build(); - - @override - GPlacesData_places_experiencesBuilder toBuilder() => - GPlacesData_places_experiencesBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is GPlacesData_places_experiences && - G__typename == other.G__typename && - id == other.id && - status == other.status && - createdAt == other.createdAt; - } - - @override - int get hashCode { - var _$hash = 0; - _$hash = $jc(_$hash, G__typename.hashCode); - _$hash = $jc(_$hash, id.hashCode); - _$hash = $jc(_$hash, status.hashCode); - _$hash = $jc(_$hash, createdAt.hashCode); - _$hash = $jf(_$hash); - return _$hash; - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'GPlacesData_places_experiences') - ..add('G__typename', G__typename) - ..add('id', id) - ..add('status', status) - ..add('createdAt', createdAt)) - .toString(); - } -} - -class GPlacesData_places_experiencesBuilder - implements - Builder< - GPlacesData_places_experiences, - GPlacesData_places_experiencesBuilder - > { - _$GPlacesData_places_experiences? _$v; - - String? _G__typename; - String? get G__typename => _$this._G__typename; - set G__typename(String? G__typename) => _$this._G__typename = G__typename; - - String? _id; - String? get id => _$this._id; - set id(String? id) => _$this._id = id; - - _i3.GVoiceExperienceStatus? _status; - _i3.GVoiceExperienceStatus? get status => _$this._status; - set status(_i3.GVoiceExperienceStatus? status) => _$this._status = status; - - String? _createdAt; - String? get createdAt => _$this._createdAt; - set createdAt(String? createdAt) => _$this._createdAt = createdAt; - - GPlacesData_places_experiencesBuilder() { - GPlacesData_places_experiences._initializeBuilder(this); - } - - GPlacesData_places_experiencesBuilder get _$this { - final $v = _$v; - if ($v != null) { - _G__typename = $v.G__typename; - _id = $v.id; - _status = $v.status; - _createdAt = $v.createdAt; - _$v = null; - } - return this; - } - - @override - void replace(GPlacesData_places_experiences other) { - _$v = other as _$GPlacesData_places_experiences; - } - - @override - void update(void Function(GPlacesData_places_experiencesBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - GPlacesData_places_experiences build() => _build(); - - _$GPlacesData_places_experiences _build() { - final _$result = - _$v ?? - _$GPlacesData_places_experiences._( - G__typename: BuiltValueNullFieldError.checkNotNull( - G__typename, - r'GPlacesData_places_experiences', - 'G__typename', - ), - id: BuiltValueNullFieldError.checkNotNull( - id, - r'GPlacesData_places_experiences', - 'id', - ), - status: BuiltValueNullFieldError.checkNotNull( - status, - r'GPlacesData_places_experiences', - 'status', - ), - createdAt: BuiltValueNullFieldError.checkNotNull( - createdAt, - r'GPlacesData_places_experiences', - 'createdAt', - ), - ); - replace(_$result); - return _$result; - } -} - // ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/lib/features/mapflow/data/graphql/__generated__/places.req.gql.dart b/lib/features/mapflow/data/graphql/__generated__/places.req.gql.dart index 38fd43b..9dcd7f2 100644 --- a/lib/features/mapflow/data/graphql/__generated__/places.req.gql.dart +++ b/lib/features/mapflow/data/graphql/__generated__/places.req.gql.dart @@ -27,7 +27,10 @@ abstract class GPlacesReq _$GPlacesReq; static void _initializeBuilder(GPlacesReqBuilder b) => b - ..operation = _i4.Operation(document: _i5.document, operationName: 'Places') + ..operation = _i4.Operation( + document: _i5.document, + operationName: 'Places', + ) ..executeOnListen = true; @override @@ -36,17 +39,19 @@ abstract class GPlacesReq _i4.Operation get operation; @override _i4.Request get execRequest => _i4.Request( - operation: operation, - variables: vars.toJson(), - context: context ?? const _i4.Context(), - ); + operation: operation, + variables: vars.toJson(), + context: context ?? const _i4.Context(), + ); @override String? get requestId; @override @BuiltValueField(serialize: false) - _i2.GPlacesData? Function(_i2.GPlacesData?, _i2.GPlacesData?)? - get updateResult; + _i2.GPlacesData? Function( + _i2.GPlacesData?, + _i2.GPlacesData?, + )? get updateResult; @override _i2.GPlacesData? get optimisticResponse; @override @@ -72,15 +77,19 @@ abstract class GPlacesReq @override _i1.OperationRequest<_i2.GPlacesData, _i3.GPlacesVars> transformOperation( - _i4.Operation Function(_i4.Operation) transform, - ) => this.rebuild((b) => b..operation = transform(operation)); + _i4.Operation Function(_i4.Operation) transform) => + this.rebuild((b) => b..operation = transform(operation)); static Serializer get serializer => _$gPlacesReqSerializer; - Map toJson() => - (_i6.serializers.serializeWith(GPlacesReq.serializer, this) - as Map); + Map toJson() => (_i6.serializers.serializeWith( + GPlacesReq.serializer, + this, + ) as Map); static GPlacesReq? fromJson(Map json) => - _i6.serializers.deserializeWith(GPlacesReq.serializer, json); + _i6.serializers.deserializeWith( + GPlacesReq.serializer, + json, + ); } diff --git a/lib/features/mapflow/data/graphql/__generated__/places.var.gql.dart b/lib/features/mapflow/data/graphql/__generated__/places.var.gql.dart index 5c0870e..b462c2e 100644 --- a/lib/features/mapflow/data/graphql/__generated__/places.var.gql.dart +++ b/lib/features/mapflow/data/graphql/__generated__/places.var.gql.dart @@ -17,10 +17,14 @@ abstract class GPlacesVars implements Built { static Serializer get serializer => _$gPlacesVarsSerializer; - Map toJson() => - (_i1.serializers.serializeWith(GPlacesVars.serializer, this) - as Map); + Map toJson() => (_i1.serializers.serializeWith( + GPlacesVars.serializer, + this, + ) as Map); static GPlacesVars? fromJson(Map json) => - _i1.serializers.deserializeWith(GPlacesVars.serializer, json); + _i1.serializers.deserializeWith( + GPlacesVars.serializer, + json, + ); } diff --git a/lib/features/mapflow/data/graphql/__generated__/serializers.gql.dart b/lib/features/mapflow/data/graphql/__generated__/serializers.gql.dart index e3cf493..5b9c89c 100644 --- a/lib/features/mapflow/data/graphql/__generated__/serializers.gql.dart +++ b/lib/features/mapflow/data/graphql/__generated__/serializers.gql.dart @@ -77,7 +77,7 @@ import 'package:mapflow/features/mapflow/data/graphql/__generated__/nearby_place import 'package:mapflow/features/mapflow/data/graphql/__generated__/nearby_places.var.gql.dart' show GNearbyPlacesVars; import 'package:mapflow/features/mapflow/data/graphql/__generated__/places.data.gql.dart' - show GPlacesData, GPlacesData_places, GPlacesData_places_experiences; + show GPlacesData, GPlacesData_places; import 'package:mapflow/features/mapflow/data/graphql/__generated__/places.req.gql.dart' show GPlacesReq; import 'package:mapflow/features/mapflow/data/graphql/__generated__/places.var.gql.dart' @@ -178,7 +178,6 @@ final SerializersBuilder _serializersBuilder = _$serializers.toBuilder() GNearbyPlacesVars, GPlacesData, GPlacesData_places, - GPlacesData_places_experiences, GPlacesReq, GPlacesVars, GRecommendPlacesByVoiceData, diff --git a/lib/features/mapflow/data/graphql/__generated__/serializers.gql.g.dart b/lib/features/mapflow/data/graphql/__generated__/serializers.gql.g.dart index 8d725cd..6b8ddc4 100644 --- a/lib/features/mapflow/data/graphql/__generated__/serializers.gql.g.dart +++ b/lib/features/mapflow/data/graphql/__generated__/serializers.gql.g.dart @@ -63,7 +63,6 @@ Serializers _$serializers = ..add(GNearbyPlacesVars.serializer) ..add(GPlacesData.serializer) ..add(GPlacesData_places.serializer) - ..add(GPlacesData_places_experiences.serializer) ..add(GPlacesReq.serializer) ..add(GPlacesVars.serializer) ..add(GRecommendPlacesByVoiceData.serializer) @@ -160,6 +159,14 @@ Serializers _$serializers = const FullType(BuiltList, const [const FullType(String)]), () => ListBuilder(), ) + ..addBuilderFactory( + const FullType(BuiltList, const [const FullType(String)]), + () => ListBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltList, const [const FullType(String)]), + () => ListBuilder(), + ) ..addBuilderFactory( const FullType(BuiltList, const [ const FullType( @@ -219,24 +226,6 @@ Serializers _$serializers = const FullType(BuiltList, const [const FullType(String)]), () => ListBuilder(), ) - ..addBuilderFactory( - const FullType(BuiltList, const [ - const FullType(GPlacesData_places_experiences), - ]), - () => ListBuilder(), - ) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(String)]), - () => ListBuilder(), - ) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(String)]), - () => ListBuilder(), - ) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(String)]), - () => ListBuilder(), - ) ..addBuilderFactory( const FullType(BuiltList, const [ const FullType( diff --git a/lib/features/mapflow/data/graphql/places.graphql b/lib/features/mapflow/data/graphql/places.graphql index 6e27f61..c31174f 100644 --- a/lib/features/mapflow/data/graphql/places.graphql +++ b/lib/features/mapflow/data/graphql/places.graphql @@ -7,18 +7,7 @@ query Places { longitude googlePrimaryType googleTypes - googleBusinessStatus - googleRating - googleUserRatingCount - googleRegularOpeningHours - googleCurrentOpeningHours - photoUrls traits isFavorite - experiences { - id - status - createdAt - } } } diff --git a/lib/features/mapflow/data/mapflow_data_mappers.dart b/lib/features/mapflow/data/mapflow_data_mappers.dart index 870f055..8ce7269 100644 --- a/lib/features/mapflow/data/mapflow_data_mappers.dart +++ b/lib/features/mapflow/data/mapflow_data_mappers.dart @@ -100,16 +100,16 @@ PlaceRecommendation placeRecommendationFromPlace(GPlacesData_places place) { googlePlaceId: place.googlePlaceId, name: place.name, area: '', - photoUrls: place.photoUrls.toList().cast(), + photoUrls: const [], coordinate: LatLng(place.latitude, place.longitude), traits: _traitsFromTags(place.traits), googlePrimaryType: place.googlePrimaryType, googleTypes: place.googleTypes.toList().cast(), - googleBusinessStatus: place.googleBusinessStatus, - googleRating: place.googleRating, - googleUserRatingCount: place.googleUserRatingCount, - googleRegularOpeningHours: _jsonMap(place.googleRegularOpeningHours), - googleCurrentOpeningHours: _jsonMap(place.googleCurrentOpeningHours), + googleBusinessStatus: null, + googleRating: null, + googleUserRatingCount: null, + googleRegularOpeningHours: null, + googleCurrentOpeningHours: null, isFavorite: place.isFavorite, ); } diff --git a/lib/features/mapflow/presentation/mapflow_shell.dart b/lib/features/mapflow/presentation/mapflow_shell.dart index 64a8e47..1a309ea 100644 --- a/lib/features/mapflow/presentation/mapflow_shell.dart +++ b/lib/features/mapflow/presentation/mapflow_shell.dart @@ -845,7 +845,48 @@ class _MapLoading extends StatelessWidget { @override Widget build(BuildContext context) { - return const Scaffold(body: Center(child: CircularProgressIndicator())); + final tokens = context.mapflowTokens; + return Scaffold( + backgroundColor: tokens.darkSurface, + body: Center( + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + ClipRRect( + borderRadius: BorderRadius.circular(tokens.panelRadius), + child: Image.network( + 'icons/Icon-192.png', + width: 64, + height: 64, + errorBuilder: (_, _, _) => Icon( + Icons.map_outlined, + color: tokens.voiceAccent, + size: 56, + ), + ), + ), + const SizedBox(height: 18), + Text( + 'MapFlow', + style: Theme.of(context).textTheme.titleLarge?.copyWith( + color: tokens.onDark, + fontWeight: FontWeight.w900, + letterSpacing: 0, + ), + ), + const SizedBox(height: 18), + SizedBox( + width: 96, + child: LinearProgressIndicator( + minHeight: 3, + color: tokens.voiceAccent, + backgroundColor: tokens.onDark.withValues(alpha: 0.12), + ), + ), + ], + ), + ), + ); } }