Add favorites search and enriched places UI
Build and deploy Flutter Web / build (push) Successful in 2m41s

This commit is contained in:
Ruslan Bakiev
2026-06-12 21:09:15 +07:00
parent 8aa2a43cc7
commit 318126d83a
58 changed files with 11222 additions and 238 deletions
@@ -20,6 +20,8 @@ class PlaceState {
required this.hasTelegramAuth,
required this.userCoordinate,
required this.reviewDraft,
required this.searchQuery,
required this.searchMessage,
});
static final _distance = Distance();
@@ -31,6 +33,8 @@ class PlaceState {
final bool hasTelegramAuth;
final LatLng? userCoordinate;
final VoiceReviewDraft reviewDraft;
final String searchQuery;
final String searchMessage;
List<PlaceRecommendation> get recommendations {
final selected = selectedTrait;
@@ -70,6 +74,8 @@ class PlaceState {
bool? hasTelegramAuth,
Object? userCoordinate = _unset,
VoiceReviewDraft? reviewDraft,
String? searchQuery,
String? searchMessage,
}) {
return PlaceState(
selectedTrait: identical(selectedTrait, _unset)
@@ -87,6 +93,8 @@ class PlaceState {
? this.userCoordinate
: userCoordinate as LatLng?,
reviewDraft: reviewDraft ?? this.reviewDraft,
searchQuery: searchQuery ?? this.searchQuery,
searchMessage: searchMessage ?? this.searchMessage,
);
}
}
@@ -156,6 +164,8 @@ class PlaceCubit extends Cubit<PlaceViewState> {
hasTelegramAuth: _authRepository.hasTelegramAuth,
userCoordinate: userCoordinate,
reviewDraft: _emptyDraft,
searchQuery: '',
searchMessage: '',
),
),
);
@@ -192,6 +202,54 @@ class PlaceCubit extends Cubit<PlaceViewState> {
emit(PlaceViewState.ready(value.copyWith(selectedPlaceId: placeId)));
}
Future<void> searchPlaces(String query) async {
final value = _requireReady();
final normalizedQuery = query.trim();
if (normalizedQuery.isEmpty) {
await clearSearch();
return;
}
final result = await _placesRepository.searchPlaces(normalizedQuery);
emit(
PlaceViewState.ready(
value.copyWith(
places: result.places,
selectedPlaceId: result.places.isEmpty
? null
: result.places.first.id,
selectedTrait: null,
searchQuery: normalizedQuery,
searchMessage: result.message,
),
),
);
}
Future<void> clearSearch() async {
final value = _requireReady();
final places = await _placesRepository.fetchPlaces();
emit(
PlaceViewState.ready(
value.copyWith(
places: places,
selectedPlaceId: places.isEmpty ? null : places.first.id,
selectedTrait: null,
searchQuery: '',
searchMessage: '',
),
),
);
}
Future<void> toggleFavorite(PlaceRecommendation place) async {
final value = _requireReady();
final updated = place.isFavorite
? await _placesRepository.removeFavoritePlace(place.id)
: await _placesRepository.addFavoritePlace(place.id);
emit(PlaceViewState.ready(value.copyWith(places: _replacePlace(updated))));
}
void setReviewPlace(String placeName) {
final value = _requireReady();
emit(
@@ -219,6 +277,9 @@ class PlaceCubit extends Cubit<PlaceViewState> {
required String audioObjectKey,
required String audioContentBase64,
required String audioMimeType,
required bool addToFavorites,
required Map<String, dynamic> recordingPayload,
required List<String> promptHintsShown,
}) async {
final value = _requireReady();
if (!value.hasTelegramAuth) {
@@ -230,10 +291,15 @@ class PlaceCubit extends Cubit<PlaceViewState> {
googlePlaceId: place.googlePlaceId,
googleName: place.name,
coordinate: place.coordinate,
googlePrimaryType: place.googlePrimaryType,
googleTypes: place.googleTypes,
durationSeconds: draft.duration.inSeconds,
audioObjectKey: audioObjectKey,
audioContentBase64: audioContentBase64,
audioMimeType: audioMimeType,
addToFavorites: addToFavorites,
recordingPayload: recordingPayload,
promptHintsShown: promptHintsShown,
);
final places = await _placesRepository.fetchPlaces();
@@ -244,11 +310,21 @@ class PlaceCubit extends Cubit<PlaceViewState> {
places: places,
selectedPlaceId: selectedPlace,
reviewDraft: _emptyDraft,
searchQuery: '',
searchMessage: '',
),
),
);
}
List<PlaceRecommendation> _replacePlace(PlaceRecommendation updated) {
final value = _requireReady();
return [
for (final place in value.places)
if (place.id == updated.id) updated else place,
];
}
PlaceState _requireReady() {
final value = state.placeState;
if (value == null) {
@@ -266,6 +342,8 @@ class PlaceCubit extends Cubit<PlaceViewState> {
hasTelegramAuth: hasTelegramAuth,
userCoordinate: null,
reviewDraft: _emptyDraft,
searchQuery: '',
searchMessage: '',
);
}
}
@@ -0,0 +1,175 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'package:gql/ast.dart' as _i1;
const AddFavoritePlace = _i1.OperationDefinitionNode(
type: _i1.OperationType.mutation,
name: _i1.NameNode(value: 'AddFavoritePlace'),
variableDefinitions: [
_i1.VariableDefinitionNode(
variable: _i1.VariableNode(name: _i1.NameNode(value: 'placeId')),
type: _i1.NamedTypeNode(name: _i1.NameNode(value: 'ID'), isNonNull: true),
defaultValue: _i1.DefaultValueNode(value: null),
directives: [],
),
],
directives: [],
selectionSet: _i1.SelectionSetNode(
selections: [
_i1.FieldNode(
name: _i1.NameNode(value: 'addFavoritePlace'),
alias: null,
arguments: [
_i1.ArgumentNode(
name: _i1.NameNode(value: 'placeId'),
value: _i1.VariableNode(name: _i1.NameNode(value: 'placeId')),
),
],
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,
),
],
),
),
],
),
),
],
),
);
const document = _i1.DocumentNode(definitions: [AddFavoritePlace]);
@@ -0,0 +1,132 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// 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;
part 'add_favorite_place.data.gql.g.dart';
abstract class GAddFavoritePlaceData
implements Built<GAddFavoritePlaceData, GAddFavoritePlaceDataBuilder> {
GAddFavoritePlaceData._();
factory GAddFavoritePlaceData([
void Function(GAddFavoritePlaceDataBuilder b) updates,
]) = _$GAddFavoritePlaceData;
static void _initializeBuilder(GAddFavoritePlaceDataBuilder b) =>
b..G__typename = 'Mutation';
@BuiltValueField(wireName: '__typename')
String get G__typename;
GAddFavoritePlaceData_addFavoritePlace get addFavoritePlace;
static Serializer<GAddFavoritePlaceData> get serializer =>
_$gAddFavoritePlaceDataSerializer;
Map<String, dynamic> toJson() =>
(_i1.serializers.serializeWith(GAddFavoritePlaceData.serializer, this)
as Map<String, dynamic>);
static GAddFavoritePlaceData? fromJson(Map<String, dynamic> json) =>
_i1.serializers.deserializeWith(GAddFavoritePlaceData.serializer, json);
}
abstract class GAddFavoritePlaceData_addFavoritePlace
implements
Built<
GAddFavoritePlaceData_addFavoritePlace,
GAddFavoritePlaceData_addFavoritePlaceBuilder
> {
GAddFavoritePlaceData_addFavoritePlace._();
factory GAddFavoritePlaceData_addFavoritePlace([
void Function(GAddFavoritePlaceData_addFavoritePlaceBuilder b) updates,
]) = _$GAddFavoritePlaceData_addFavoritePlace;
static void _initializeBuilder(
GAddFavoritePlaceData_addFavoritePlaceBuilder b,
) => b..G__typename = 'Place';
@BuiltValueField(wireName: '__typename')
String get G__typename;
String get id;
String get googlePlaceId;
String get name;
double get latitude;
double get longitude;
String? get googlePrimaryType;
BuiltList<String> get googleTypes;
String? get googleBusinessStatus;
double? get googleRating;
int? get googleUserRatingCount;
_i2.JsonObject? get googleRegularOpeningHours;
_i2.JsonObject? get googleCurrentOpeningHours;
BuiltList<String> get photoUrls;
BuiltList<String> get traits;
bool get isFavorite;
BuiltList<GAddFavoritePlaceData_addFavoritePlace_experiences> get experiences;
static Serializer<GAddFavoritePlaceData_addFavoritePlace> get serializer =>
_$gAddFavoritePlaceDataAddFavoritePlaceSerializer;
Map<String, dynamic> toJson() =>
(_i1.serializers.serializeWith(
GAddFavoritePlaceData_addFavoritePlace.serializer,
this,
)
as Map<String, dynamic>);
static GAddFavoritePlaceData_addFavoritePlace? fromJson(
Map<String, dynamic> json,
) => _i1.serializers.deserializeWith(
GAddFavoritePlaceData_addFavoritePlace.serializer,
json,
);
}
abstract class GAddFavoritePlaceData_addFavoritePlace_experiences
implements
Built<
GAddFavoritePlaceData_addFavoritePlace_experiences,
GAddFavoritePlaceData_addFavoritePlace_experiencesBuilder
> {
GAddFavoritePlaceData_addFavoritePlace_experiences._();
factory GAddFavoritePlaceData_addFavoritePlace_experiences([
void Function(GAddFavoritePlaceData_addFavoritePlace_experiencesBuilder b)
updates,
]) = _$GAddFavoritePlaceData_addFavoritePlace_experiences;
static void _initializeBuilder(
GAddFavoritePlaceData_addFavoritePlace_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<GAddFavoritePlaceData_addFavoritePlace_experiences>
get serializer =>
_$gAddFavoritePlaceDataAddFavoritePlaceExperiencesSerializer;
Map<String, dynamic> toJson() =>
(_i1.serializers.serializeWith(
GAddFavoritePlaceData_addFavoritePlace_experiences.serializer,
this,
)
as Map<String, dynamic>);
static GAddFavoritePlaceData_addFavoritePlace_experiences? fromJson(
Map<String, dynamic> json,
) => _i1.serializers.deserializeWith(
GAddFavoritePlaceData_addFavoritePlace_experiences.serializer,
json,
);
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,98 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
import 'package:ferry_exec/ferry_exec.dart' as _i1;
import 'package:gql_exec/gql_exec.dart' as _i4;
import 'package:mapflow/features/mapflow/data/graphql/__generated__/add_favorite_place.ast.gql.dart'
as _i5;
import 'package:mapflow/features/mapflow/data/graphql/__generated__/add_favorite_place.data.gql.dart'
as _i2;
import 'package:mapflow/features/mapflow/data/graphql/__generated__/add_favorite_place.var.gql.dart'
as _i3;
import 'package:mapflow/features/mapflow/data/graphql/__generated__/serializers.gql.dart'
as _i6;
part 'add_favorite_place.req.gql.g.dart';
abstract class GAddFavoritePlaceReq
implements
Built<GAddFavoritePlaceReq, GAddFavoritePlaceReqBuilder>,
_i1.OperationRequest<
_i2.GAddFavoritePlaceData,
_i3.GAddFavoritePlaceVars
> {
GAddFavoritePlaceReq._();
factory GAddFavoritePlaceReq([
void Function(GAddFavoritePlaceReqBuilder b) updates,
]) = _$GAddFavoritePlaceReq;
static void _initializeBuilder(GAddFavoritePlaceReqBuilder b) => b
..operation = _i4.Operation(
document: _i5.document,
operationName: 'AddFavoritePlace',
)
..executeOnListen = true;
@override
_i3.GAddFavoritePlaceVars get vars;
@override
_i4.Operation get operation;
@override
_i4.Request get execRequest => _i4.Request(
operation: operation,
variables: vars.toJson(),
context: context ?? const _i4.Context(),
);
@override
String? get requestId;
@override
@BuiltValueField(serialize: false)
_i2.GAddFavoritePlaceData? Function(
_i2.GAddFavoritePlaceData?,
_i2.GAddFavoritePlaceData?,
)?
get updateResult;
@override
_i2.GAddFavoritePlaceData? get optimisticResponse;
@override
String? get updateCacheHandlerKey;
@override
Map<String, dynamic>? get updateCacheHandlerContext;
@override
_i1.FetchPolicy? get fetchPolicy;
@override
bool get executeOnListen;
@override
@BuiltValueField(serialize: false)
_i4.Context? get context;
@override
_i2.GAddFavoritePlaceData? parseData(Map<String, dynamic> json) =>
_i2.GAddFavoritePlaceData.fromJson(json);
@override
Map<String, dynamic> varsToJson() => vars.toJson();
@override
Map<String, dynamic> dataToJson(_i2.GAddFavoritePlaceData data) =>
data.toJson();
@override
_i1.OperationRequest<_i2.GAddFavoritePlaceData, _i3.GAddFavoritePlaceVars>
transformOperation(_i4.Operation Function(_i4.Operation) transform) =>
this.rebuild((b) => b..operation = transform(operation));
static Serializer<GAddFavoritePlaceReq> get serializer =>
_$gAddFavoritePlaceReqSerializer;
Map<String, dynamic> toJson() =>
(_i6.serializers.serializeWith(GAddFavoritePlaceReq.serializer, this)
as Map<String, dynamic>);
static GAddFavoritePlaceReq? fromJson(Map<String, dynamic> json) =>
_i6.serializers.deserializeWith(GAddFavoritePlaceReq.serializer, json);
}
@@ -0,0 +1,442 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'add_favorite_place.req.gql.dart';
// **************************************************************************
// BuiltValueGenerator
// **************************************************************************
Serializer<GAddFavoritePlaceReq> _$gAddFavoritePlaceReqSerializer =
_$GAddFavoritePlaceReqSerializer();
class _$GAddFavoritePlaceReqSerializer
implements StructuredSerializer<GAddFavoritePlaceReq> {
@override
final Iterable<Type> types = const [
GAddFavoritePlaceReq,
_$GAddFavoritePlaceReq,
];
@override
final String wireName = 'GAddFavoritePlaceReq';
@override
Iterable<Object?> serialize(
Serializers serializers,
GAddFavoritePlaceReq object, {
FullType specifiedType = FullType.unspecified,
}) {
final result = <Object?>[
'vars',
serializers.serialize(
object.vars,
specifiedType: const FullType(_i3.GAddFavoritePlaceVars),
),
'operation',
serializers.serialize(
object.operation,
specifiedType: const FullType(_i4.Operation),
),
'executeOnListen',
serializers.serialize(
object.executeOnListen,
specifiedType: const FullType(bool),
),
];
Object? value;
value = object.requestId;
if (value != null) {
result
..add('requestId')
..add(
serializers.serialize(value, specifiedType: const FullType(String)),
);
}
value = object.optimisticResponse;
if (value != null) {
result
..add('optimisticResponse')
..add(
serializers.serialize(
value,
specifiedType: const FullType(_i2.GAddFavoritePlaceData),
),
);
}
value = object.updateCacheHandlerKey;
if (value != null) {
result
..add('updateCacheHandlerKey')
..add(
serializers.serialize(value, specifiedType: const FullType(String)),
);
}
value = object.updateCacheHandlerContext;
if (value != null) {
result
..add('updateCacheHandlerContext')
..add(
serializers.serialize(
value,
specifiedType: const FullType(Map, const [
const FullType(String),
const FullType(dynamic),
]),
),
);
}
value = object.fetchPolicy;
if (value != null) {
result
..add('fetchPolicy')
..add(
serializers.serialize(
value,
specifiedType: const FullType(_i1.FetchPolicy),
),
);
}
return result;
}
@override
GAddFavoritePlaceReq deserialize(
Serializers serializers,
Iterable<Object?> serialized, {
FullType specifiedType = FullType.unspecified,
}) {
final result = GAddFavoritePlaceReqBuilder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current! as String;
iterator.moveNext();
final Object? value = iterator.current;
switch (key) {
case 'vars':
result.vars.replace(
serializers.deserialize(
value,
specifiedType: const FullType(_i3.GAddFavoritePlaceVars),
)!
as _i3.GAddFavoritePlaceVars,
);
break;
case 'operation':
result.operation =
serializers.deserialize(
value,
specifiedType: const FullType(_i4.Operation),
)!
as _i4.Operation;
break;
case 'requestId':
result.requestId =
serializers.deserialize(
value,
specifiedType: const FullType(String),
)
as String?;
break;
case 'optimisticResponse':
result.optimisticResponse.replace(
serializers.deserialize(
value,
specifiedType: const FullType(_i2.GAddFavoritePlaceData),
)!
as _i2.GAddFavoritePlaceData,
);
break;
case 'updateCacheHandlerKey':
result.updateCacheHandlerKey =
serializers.deserialize(
value,
specifiedType: const FullType(String),
)
as String?;
break;
case 'updateCacheHandlerContext':
result.updateCacheHandlerContext =
serializers.deserialize(
value,
specifiedType: const FullType(Map, const [
const FullType(String),
const FullType(dynamic),
]),
)
as Map<String, dynamic>?;
break;
case 'fetchPolicy':
result.fetchPolicy =
serializers.deserialize(
value,
specifiedType: const FullType(_i1.FetchPolicy),
)
as _i1.FetchPolicy?;
break;
case 'executeOnListen':
result.executeOnListen =
serializers.deserialize(
value,
specifiedType: const FullType(bool),
)!
as bool;
break;
}
}
return result.build();
}
}
class _$GAddFavoritePlaceReq extends GAddFavoritePlaceReq {
@override
final _i3.GAddFavoritePlaceVars vars;
@override
final _i4.Operation operation;
@override
final String? requestId;
@override
final _i2.GAddFavoritePlaceData? Function(
_i2.GAddFavoritePlaceData?,
_i2.GAddFavoritePlaceData?,
)?
updateResult;
@override
final _i2.GAddFavoritePlaceData? optimisticResponse;
@override
final String? updateCacheHandlerKey;
@override
final Map<String, dynamic>? updateCacheHandlerContext;
@override
final _i1.FetchPolicy? fetchPolicy;
@override
final bool executeOnListen;
@override
final _i4.Context? context;
factory _$GAddFavoritePlaceReq([
void Function(GAddFavoritePlaceReqBuilder)? updates,
]) => (GAddFavoritePlaceReqBuilder()..update(updates))._build();
_$GAddFavoritePlaceReq._({
required this.vars,
required this.operation,
this.requestId,
this.updateResult,
this.optimisticResponse,
this.updateCacheHandlerKey,
this.updateCacheHandlerContext,
this.fetchPolicy,
required this.executeOnListen,
this.context,
}) : super._();
@override
GAddFavoritePlaceReq rebuild(
void Function(GAddFavoritePlaceReqBuilder) updates,
) => (toBuilder()..update(updates)).build();
@override
GAddFavoritePlaceReqBuilder toBuilder() =>
GAddFavoritePlaceReqBuilder()..replace(this);
@override
bool operator ==(Object other) {
if (identical(other, this)) return true;
return other is GAddFavoritePlaceReq &&
vars == other.vars &&
operation == other.operation &&
requestId == other.requestId &&
updateResult == other.updateResult &&
optimisticResponse == other.optimisticResponse &&
updateCacheHandlerKey == other.updateCacheHandlerKey &&
updateCacheHandlerContext == other.updateCacheHandlerContext &&
fetchPolicy == other.fetchPolicy &&
executeOnListen == other.executeOnListen &&
context == other.context;
}
@override
int get hashCode {
var _$hash = 0;
_$hash = $jc(_$hash, vars.hashCode);
_$hash = $jc(_$hash, operation.hashCode);
_$hash = $jc(_$hash, requestId.hashCode);
_$hash = $jc(_$hash, updateResult.hashCode);
_$hash = $jc(_$hash, optimisticResponse.hashCode);
_$hash = $jc(_$hash, updateCacheHandlerKey.hashCode);
_$hash = $jc(_$hash, updateCacheHandlerContext.hashCode);
_$hash = $jc(_$hash, fetchPolicy.hashCode);
_$hash = $jc(_$hash, executeOnListen.hashCode);
_$hash = $jc(_$hash, context.hashCode);
_$hash = $jf(_$hash);
return _$hash;
}
@override
String toString() {
return (newBuiltValueToStringHelper(r'GAddFavoritePlaceReq')
..add('vars', vars)
..add('operation', operation)
..add('requestId', requestId)
..add('updateResult', updateResult)
..add('optimisticResponse', optimisticResponse)
..add('updateCacheHandlerKey', updateCacheHandlerKey)
..add('updateCacheHandlerContext', updateCacheHandlerContext)
..add('fetchPolicy', fetchPolicy)
..add('executeOnListen', executeOnListen)
..add('context', context))
.toString();
}
}
class GAddFavoritePlaceReqBuilder
implements Builder<GAddFavoritePlaceReq, GAddFavoritePlaceReqBuilder> {
_$GAddFavoritePlaceReq? _$v;
_i3.GAddFavoritePlaceVarsBuilder? _vars;
_i3.GAddFavoritePlaceVarsBuilder get vars =>
_$this._vars ??= _i3.GAddFavoritePlaceVarsBuilder();
set vars(_i3.GAddFavoritePlaceVarsBuilder? vars) => _$this._vars = vars;
_i4.Operation? _operation;
_i4.Operation? get operation => _$this._operation;
set operation(_i4.Operation? operation) => _$this._operation = operation;
String? _requestId;
String? get requestId => _$this._requestId;
set requestId(String? requestId) => _$this._requestId = requestId;
_i2.GAddFavoritePlaceData? Function(
_i2.GAddFavoritePlaceData?,
_i2.GAddFavoritePlaceData?,
)?
_updateResult;
_i2.GAddFavoritePlaceData? Function(
_i2.GAddFavoritePlaceData?,
_i2.GAddFavoritePlaceData?,
)?
get updateResult => _$this._updateResult;
set updateResult(
_i2.GAddFavoritePlaceData? Function(
_i2.GAddFavoritePlaceData?,
_i2.GAddFavoritePlaceData?,
)?
updateResult,
) => _$this._updateResult = updateResult;
_i2.GAddFavoritePlaceDataBuilder? _optimisticResponse;
_i2.GAddFavoritePlaceDataBuilder get optimisticResponse =>
_$this._optimisticResponse ??= _i2.GAddFavoritePlaceDataBuilder();
set optimisticResponse(
_i2.GAddFavoritePlaceDataBuilder? optimisticResponse,
) => _$this._optimisticResponse = optimisticResponse;
String? _updateCacheHandlerKey;
String? get updateCacheHandlerKey => _$this._updateCacheHandlerKey;
set updateCacheHandlerKey(String? updateCacheHandlerKey) =>
_$this._updateCacheHandlerKey = updateCacheHandlerKey;
Map<String, dynamic>? _updateCacheHandlerContext;
Map<String, dynamic>? get updateCacheHandlerContext =>
_$this._updateCacheHandlerContext;
set updateCacheHandlerContext(
Map<String, dynamic>? updateCacheHandlerContext,
) => _$this._updateCacheHandlerContext = updateCacheHandlerContext;
_i1.FetchPolicy? _fetchPolicy;
_i1.FetchPolicy? get fetchPolicy => _$this._fetchPolicy;
set fetchPolicy(_i1.FetchPolicy? fetchPolicy) =>
_$this._fetchPolicy = fetchPolicy;
bool? _executeOnListen;
bool? get executeOnListen => _$this._executeOnListen;
set executeOnListen(bool? executeOnListen) =>
_$this._executeOnListen = executeOnListen;
_i4.Context? _context;
_i4.Context? get context => _$this._context;
set context(_i4.Context? context) => _$this._context = context;
GAddFavoritePlaceReqBuilder() {
GAddFavoritePlaceReq._initializeBuilder(this);
}
GAddFavoritePlaceReqBuilder get _$this {
final $v = _$v;
if ($v != null) {
_vars = $v.vars.toBuilder();
_operation = $v.operation;
_requestId = $v.requestId;
_updateResult = $v.updateResult;
_optimisticResponse = $v.optimisticResponse?.toBuilder();
_updateCacheHandlerKey = $v.updateCacheHandlerKey;
_updateCacheHandlerContext = $v.updateCacheHandlerContext;
_fetchPolicy = $v.fetchPolicy;
_executeOnListen = $v.executeOnListen;
_context = $v.context;
_$v = null;
}
return this;
}
@override
void replace(GAddFavoritePlaceReq other) {
_$v = other as _$GAddFavoritePlaceReq;
}
@override
void update(void Function(GAddFavoritePlaceReqBuilder)? updates) {
if (updates != null) updates(this);
}
@override
GAddFavoritePlaceReq build() => _build();
_$GAddFavoritePlaceReq _build() {
_$GAddFavoritePlaceReq _$result;
try {
_$result =
_$v ??
_$GAddFavoritePlaceReq._(
vars: vars.build(),
operation: BuiltValueNullFieldError.checkNotNull(
operation,
r'GAddFavoritePlaceReq',
'operation',
),
requestId: requestId,
updateResult: updateResult,
optimisticResponse: _optimisticResponse?.build(),
updateCacheHandlerKey: updateCacheHandlerKey,
updateCacheHandlerContext: updateCacheHandlerContext,
fetchPolicy: fetchPolicy,
executeOnListen: BuiltValueNullFieldError.checkNotNull(
executeOnListen,
r'GAddFavoritePlaceReq',
'executeOnListen',
),
context: context,
);
} catch (_) {
late String _$failedField;
try {
_$failedField = 'vars';
vars.build();
_$failedField = 'optimisticResponse';
_optimisticResponse?.build();
} catch (e) {
throw BuiltValueNestedFieldError(
r'GAddFavoritePlaceReq',
_$failedField,
e.toString(),
);
}
rethrow;
}
replace(_$result);
return _$result;
}
}
// ignore_for_file: deprecated_member_use_from_same_package,type=lint
@@ -0,0 +1,30 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
import 'package:mapflow/features/mapflow/data/graphql/__generated__/serializers.gql.dart'
as _i1;
part 'add_favorite_place.var.gql.g.dart';
abstract class GAddFavoritePlaceVars
implements Built<GAddFavoritePlaceVars, GAddFavoritePlaceVarsBuilder> {
GAddFavoritePlaceVars._();
factory GAddFavoritePlaceVars([
void Function(GAddFavoritePlaceVarsBuilder b) updates,
]) = _$GAddFavoritePlaceVars;
String get placeId;
static Serializer<GAddFavoritePlaceVars> get serializer =>
_$gAddFavoritePlaceVarsSerializer;
Map<String, dynamic> toJson() =>
(_i1.serializers.serializeWith(GAddFavoritePlaceVars.serializer, this)
as Map<String, dynamic>);
static GAddFavoritePlaceVars? fromJson(Map<String, dynamic> json) =>
_i1.serializers.deserializeWith(GAddFavoritePlaceVars.serializer, json);
}
@@ -0,0 +1,155 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'add_favorite_place.var.gql.dart';
// **************************************************************************
// BuiltValueGenerator
// **************************************************************************
Serializer<GAddFavoritePlaceVars> _$gAddFavoritePlaceVarsSerializer =
_$GAddFavoritePlaceVarsSerializer();
class _$GAddFavoritePlaceVarsSerializer
implements StructuredSerializer<GAddFavoritePlaceVars> {
@override
final Iterable<Type> types = const [
GAddFavoritePlaceVars,
_$GAddFavoritePlaceVars,
];
@override
final String wireName = 'GAddFavoritePlaceVars';
@override
Iterable<Object?> serialize(
Serializers serializers,
GAddFavoritePlaceVars object, {
FullType specifiedType = FullType.unspecified,
}) {
final result = <Object?>[
'placeId',
serializers.serialize(
object.placeId,
specifiedType: const FullType(String),
),
];
return result;
}
@override
GAddFavoritePlaceVars deserialize(
Serializers serializers,
Iterable<Object?> serialized, {
FullType specifiedType = FullType.unspecified,
}) {
final result = GAddFavoritePlaceVarsBuilder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current! as String;
iterator.moveNext();
final Object? value = iterator.current;
switch (key) {
case 'placeId':
result.placeId =
serializers.deserialize(
value,
specifiedType: const FullType(String),
)!
as String;
break;
}
}
return result.build();
}
}
class _$GAddFavoritePlaceVars extends GAddFavoritePlaceVars {
@override
final String placeId;
factory _$GAddFavoritePlaceVars([
void Function(GAddFavoritePlaceVarsBuilder)? updates,
]) => (GAddFavoritePlaceVarsBuilder()..update(updates))._build();
_$GAddFavoritePlaceVars._({required this.placeId}) : super._();
@override
GAddFavoritePlaceVars rebuild(
void Function(GAddFavoritePlaceVarsBuilder) updates,
) => (toBuilder()..update(updates)).build();
@override
GAddFavoritePlaceVarsBuilder toBuilder() =>
GAddFavoritePlaceVarsBuilder()..replace(this);
@override
bool operator ==(Object other) {
if (identical(other, this)) return true;
return other is GAddFavoritePlaceVars && placeId == other.placeId;
}
@override
int get hashCode {
var _$hash = 0;
_$hash = $jc(_$hash, placeId.hashCode);
_$hash = $jf(_$hash);
return _$hash;
}
@override
String toString() {
return (newBuiltValueToStringHelper(
r'GAddFavoritePlaceVars',
)..add('placeId', placeId)).toString();
}
}
class GAddFavoritePlaceVarsBuilder
implements Builder<GAddFavoritePlaceVars, GAddFavoritePlaceVarsBuilder> {
_$GAddFavoritePlaceVars? _$v;
String? _placeId;
String? get placeId => _$this._placeId;
set placeId(String? placeId) => _$this._placeId = placeId;
GAddFavoritePlaceVarsBuilder();
GAddFavoritePlaceVarsBuilder get _$this {
final $v = _$v;
if ($v != null) {
_placeId = $v.placeId;
_$v = null;
}
return this;
}
@override
void replace(GAddFavoritePlaceVars other) {
_$v = other as _$GAddFavoritePlaceVars;
}
@override
void update(void Function(GAddFavoritePlaceVarsBuilder)? updates) {
if (updates != null) updates(this);
}
@override
GAddFavoritePlaceVars build() => _build();
_$GAddFavoritePlaceVars _build() {
final _$result =
_$v ??
_$GAddFavoritePlaceVars._(
placeId: BuiltValueNullFieldError.checkNotNull(
placeId,
r'GAddFavoritePlaceVars',
'placeId',
),
);
replace(_$result);
return _$result;
}
}
// ignore_for_file: deprecated_member_use_from_same_package,type=lint
@@ -0,0 +1,163 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'package:gql/ast.dart' as _i1;
const FavoritePlaces = _i1.OperationDefinitionNode(
type: _i1.OperationType.query,
name: _i1.NameNode(value: 'FavoritePlaces'),
variableDefinitions: [],
directives: [],
selectionSet: _i1.SelectionSetNode(
selections: [
_i1.FieldNode(
name: _i1.NameNode(value: 'favoritePlaces'),
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,
),
],
),
),
],
),
),
],
),
);
const document = _i1.DocumentNode(definitions: [FavoritePlaces]);
@@ -0,0 +1,130 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// 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;
part 'favorite_places.data.gql.g.dart';
abstract class GFavoritePlacesData
implements Built<GFavoritePlacesData, GFavoritePlacesDataBuilder> {
GFavoritePlacesData._();
factory GFavoritePlacesData([
void Function(GFavoritePlacesDataBuilder b) updates,
]) = _$GFavoritePlacesData;
static void _initializeBuilder(GFavoritePlacesDataBuilder b) =>
b..G__typename = 'Query';
@BuiltValueField(wireName: '__typename')
String get G__typename;
BuiltList<GFavoritePlacesData_favoritePlaces> get favoritePlaces;
static Serializer<GFavoritePlacesData> get serializer =>
_$gFavoritePlacesDataSerializer;
Map<String, dynamic> toJson() =>
(_i1.serializers.serializeWith(GFavoritePlacesData.serializer, this)
as Map<String, dynamic>);
static GFavoritePlacesData? fromJson(Map<String, dynamic> json) =>
_i1.serializers.deserializeWith(GFavoritePlacesData.serializer, json);
}
abstract class GFavoritePlacesData_favoritePlaces
implements
Built<
GFavoritePlacesData_favoritePlaces,
GFavoritePlacesData_favoritePlacesBuilder
> {
GFavoritePlacesData_favoritePlaces._();
factory GFavoritePlacesData_favoritePlaces([
void Function(GFavoritePlacesData_favoritePlacesBuilder b) updates,
]) = _$GFavoritePlacesData_favoritePlaces;
static void _initializeBuilder(GFavoritePlacesData_favoritePlacesBuilder b) =>
b..G__typename = 'Place';
@BuiltValueField(wireName: '__typename')
String get G__typename;
String get id;
String get googlePlaceId;
String get name;
double get latitude;
double get longitude;
String? get googlePrimaryType;
BuiltList<String> get googleTypes;
String? get googleBusinessStatus;
double? get googleRating;
int? get googleUserRatingCount;
_i2.JsonObject? get googleRegularOpeningHours;
_i2.JsonObject? get googleCurrentOpeningHours;
BuiltList<String> get photoUrls;
BuiltList<String> get traits;
bool get isFavorite;
BuiltList<GFavoritePlacesData_favoritePlaces_experiences> get experiences;
static Serializer<GFavoritePlacesData_favoritePlaces> get serializer =>
_$gFavoritePlacesDataFavoritePlacesSerializer;
Map<String, dynamic> toJson() =>
(_i1.serializers.serializeWith(
GFavoritePlacesData_favoritePlaces.serializer,
this,
)
as Map<String, dynamic>);
static GFavoritePlacesData_favoritePlaces? fromJson(
Map<String, dynamic> json,
) => _i1.serializers.deserializeWith(
GFavoritePlacesData_favoritePlaces.serializer,
json,
);
}
abstract class GFavoritePlacesData_favoritePlaces_experiences
implements
Built<
GFavoritePlacesData_favoritePlaces_experiences,
GFavoritePlacesData_favoritePlaces_experiencesBuilder
> {
GFavoritePlacesData_favoritePlaces_experiences._();
factory GFavoritePlacesData_favoritePlaces_experiences([
void Function(GFavoritePlacesData_favoritePlaces_experiencesBuilder b)
updates,
]) = _$GFavoritePlacesData_favoritePlaces_experiences;
static void _initializeBuilder(
GFavoritePlacesData_favoritePlaces_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<GFavoritePlacesData_favoritePlaces_experiences>
get serializer => _$gFavoritePlacesDataFavoritePlacesExperiencesSerializer;
Map<String, dynamic> toJson() =>
(_i1.serializers.serializeWith(
GFavoritePlacesData_favoritePlaces_experiences.serializer,
this,
)
as Map<String, dynamic>);
static GFavoritePlacesData_favoritePlaces_experiences? fromJson(
Map<String, dynamic> json,
) => _i1.serializers.deserializeWith(
GFavoritePlacesData_favoritePlaces_experiences.serializer,
json,
);
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,95 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
import 'package:ferry_exec/ferry_exec.dart' as _i1;
import 'package:gql_exec/gql_exec.dart' as _i4;
import 'package:mapflow/features/mapflow/data/graphql/__generated__/favorite_places.ast.gql.dart'
as _i5;
import 'package:mapflow/features/mapflow/data/graphql/__generated__/favorite_places.data.gql.dart'
as _i2;
import 'package:mapflow/features/mapflow/data/graphql/__generated__/favorite_places.var.gql.dart'
as _i3;
import 'package:mapflow/features/mapflow/data/graphql/__generated__/serializers.gql.dart'
as _i6;
part 'favorite_places.req.gql.g.dart';
abstract class GFavoritePlacesReq
implements
Built<GFavoritePlacesReq, GFavoritePlacesReqBuilder>,
_i1.OperationRequest<_i2.GFavoritePlacesData, _i3.GFavoritePlacesVars> {
GFavoritePlacesReq._();
factory GFavoritePlacesReq([
void Function(GFavoritePlacesReqBuilder b) updates,
]) = _$GFavoritePlacesReq;
static void _initializeBuilder(GFavoritePlacesReqBuilder b) => b
..operation = _i4.Operation(
document: _i5.document,
operationName: 'FavoritePlaces',
)
..executeOnListen = true;
@override
_i3.GFavoritePlacesVars get vars;
@override
_i4.Operation get operation;
@override
_i4.Request get execRequest => _i4.Request(
operation: operation,
variables: vars.toJson(),
context: context ?? const _i4.Context(),
);
@override
String? get requestId;
@override
@BuiltValueField(serialize: false)
_i2.GFavoritePlacesData? Function(
_i2.GFavoritePlacesData?,
_i2.GFavoritePlacesData?,
)?
get updateResult;
@override
_i2.GFavoritePlacesData? get optimisticResponse;
@override
String? get updateCacheHandlerKey;
@override
Map<String, dynamic>? get updateCacheHandlerContext;
@override
_i1.FetchPolicy? get fetchPolicy;
@override
bool get executeOnListen;
@override
@BuiltValueField(serialize: false)
_i4.Context? get context;
@override
_i2.GFavoritePlacesData? parseData(Map<String, dynamic> json) =>
_i2.GFavoritePlacesData.fromJson(json);
@override
Map<String, dynamic> varsToJson() => vars.toJson();
@override
Map<String, dynamic> dataToJson(_i2.GFavoritePlacesData data) =>
data.toJson();
@override
_i1.OperationRequest<_i2.GFavoritePlacesData, _i3.GFavoritePlacesVars>
transformOperation(_i4.Operation Function(_i4.Operation) transform) =>
this.rebuild((b) => b..operation = transform(operation));
static Serializer<GFavoritePlacesReq> get serializer =>
_$gFavoritePlacesReqSerializer;
Map<String, dynamic> toJson() =>
(_i6.serializers.serializeWith(GFavoritePlacesReq.serializer, this)
as Map<String, dynamic>);
static GFavoritePlacesReq? fromJson(Map<String, dynamic> json) =>
_i6.serializers.deserializeWith(GFavoritePlacesReq.serializer, json);
}
@@ -0,0 +1,438 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'favorite_places.req.gql.dart';
// **************************************************************************
// BuiltValueGenerator
// **************************************************************************
Serializer<GFavoritePlacesReq> _$gFavoritePlacesReqSerializer =
_$GFavoritePlacesReqSerializer();
class _$GFavoritePlacesReqSerializer
implements StructuredSerializer<GFavoritePlacesReq> {
@override
final Iterable<Type> types = const [GFavoritePlacesReq, _$GFavoritePlacesReq];
@override
final String wireName = 'GFavoritePlacesReq';
@override
Iterable<Object?> serialize(
Serializers serializers,
GFavoritePlacesReq object, {
FullType specifiedType = FullType.unspecified,
}) {
final result = <Object?>[
'vars',
serializers.serialize(
object.vars,
specifiedType: const FullType(_i3.GFavoritePlacesVars),
),
'operation',
serializers.serialize(
object.operation,
specifiedType: const FullType(_i4.Operation),
),
'executeOnListen',
serializers.serialize(
object.executeOnListen,
specifiedType: const FullType(bool),
),
];
Object? value;
value = object.requestId;
if (value != null) {
result
..add('requestId')
..add(
serializers.serialize(value, specifiedType: const FullType(String)),
);
}
value = object.optimisticResponse;
if (value != null) {
result
..add('optimisticResponse')
..add(
serializers.serialize(
value,
specifiedType: const FullType(_i2.GFavoritePlacesData),
),
);
}
value = object.updateCacheHandlerKey;
if (value != null) {
result
..add('updateCacheHandlerKey')
..add(
serializers.serialize(value, specifiedType: const FullType(String)),
);
}
value = object.updateCacheHandlerContext;
if (value != null) {
result
..add('updateCacheHandlerContext')
..add(
serializers.serialize(
value,
specifiedType: const FullType(Map, const [
const FullType(String),
const FullType(dynamic),
]),
),
);
}
value = object.fetchPolicy;
if (value != null) {
result
..add('fetchPolicy')
..add(
serializers.serialize(
value,
specifiedType: const FullType(_i1.FetchPolicy),
),
);
}
return result;
}
@override
GFavoritePlacesReq deserialize(
Serializers serializers,
Iterable<Object?> serialized, {
FullType specifiedType = FullType.unspecified,
}) {
final result = GFavoritePlacesReqBuilder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current! as String;
iterator.moveNext();
final Object? value = iterator.current;
switch (key) {
case 'vars':
result.vars.replace(
serializers.deserialize(
value,
specifiedType: const FullType(_i3.GFavoritePlacesVars),
)!
as _i3.GFavoritePlacesVars,
);
break;
case 'operation':
result.operation =
serializers.deserialize(
value,
specifiedType: const FullType(_i4.Operation),
)!
as _i4.Operation;
break;
case 'requestId':
result.requestId =
serializers.deserialize(
value,
specifiedType: const FullType(String),
)
as String?;
break;
case 'optimisticResponse':
result.optimisticResponse.replace(
serializers.deserialize(
value,
specifiedType: const FullType(_i2.GFavoritePlacesData),
)!
as _i2.GFavoritePlacesData,
);
break;
case 'updateCacheHandlerKey':
result.updateCacheHandlerKey =
serializers.deserialize(
value,
specifiedType: const FullType(String),
)
as String?;
break;
case 'updateCacheHandlerContext':
result.updateCacheHandlerContext =
serializers.deserialize(
value,
specifiedType: const FullType(Map, const [
const FullType(String),
const FullType(dynamic),
]),
)
as Map<String, dynamic>?;
break;
case 'fetchPolicy':
result.fetchPolicy =
serializers.deserialize(
value,
specifiedType: const FullType(_i1.FetchPolicy),
)
as _i1.FetchPolicy?;
break;
case 'executeOnListen':
result.executeOnListen =
serializers.deserialize(
value,
specifiedType: const FullType(bool),
)!
as bool;
break;
}
}
return result.build();
}
}
class _$GFavoritePlacesReq extends GFavoritePlacesReq {
@override
final _i3.GFavoritePlacesVars vars;
@override
final _i4.Operation operation;
@override
final String? requestId;
@override
final _i2.GFavoritePlacesData? Function(
_i2.GFavoritePlacesData?,
_i2.GFavoritePlacesData?,
)?
updateResult;
@override
final _i2.GFavoritePlacesData? optimisticResponse;
@override
final String? updateCacheHandlerKey;
@override
final Map<String, dynamic>? updateCacheHandlerContext;
@override
final _i1.FetchPolicy? fetchPolicy;
@override
final bool executeOnListen;
@override
final _i4.Context? context;
factory _$GFavoritePlacesReq([
void Function(GFavoritePlacesReqBuilder)? updates,
]) => (GFavoritePlacesReqBuilder()..update(updates))._build();
_$GFavoritePlacesReq._({
required this.vars,
required this.operation,
this.requestId,
this.updateResult,
this.optimisticResponse,
this.updateCacheHandlerKey,
this.updateCacheHandlerContext,
this.fetchPolicy,
required this.executeOnListen,
this.context,
}) : super._();
@override
GFavoritePlacesReq rebuild(
void Function(GFavoritePlacesReqBuilder) updates,
) => (toBuilder()..update(updates)).build();
@override
GFavoritePlacesReqBuilder toBuilder() =>
GFavoritePlacesReqBuilder()..replace(this);
@override
bool operator ==(Object other) {
if (identical(other, this)) return true;
return other is GFavoritePlacesReq &&
vars == other.vars &&
operation == other.operation &&
requestId == other.requestId &&
updateResult == other.updateResult &&
optimisticResponse == other.optimisticResponse &&
updateCacheHandlerKey == other.updateCacheHandlerKey &&
updateCacheHandlerContext == other.updateCacheHandlerContext &&
fetchPolicy == other.fetchPolicy &&
executeOnListen == other.executeOnListen &&
context == other.context;
}
@override
int get hashCode {
var _$hash = 0;
_$hash = $jc(_$hash, vars.hashCode);
_$hash = $jc(_$hash, operation.hashCode);
_$hash = $jc(_$hash, requestId.hashCode);
_$hash = $jc(_$hash, updateResult.hashCode);
_$hash = $jc(_$hash, optimisticResponse.hashCode);
_$hash = $jc(_$hash, updateCacheHandlerKey.hashCode);
_$hash = $jc(_$hash, updateCacheHandlerContext.hashCode);
_$hash = $jc(_$hash, fetchPolicy.hashCode);
_$hash = $jc(_$hash, executeOnListen.hashCode);
_$hash = $jc(_$hash, context.hashCode);
_$hash = $jf(_$hash);
return _$hash;
}
@override
String toString() {
return (newBuiltValueToStringHelper(r'GFavoritePlacesReq')
..add('vars', vars)
..add('operation', operation)
..add('requestId', requestId)
..add('updateResult', updateResult)
..add('optimisticResponse', optimisticResponse)
..add('updateCacheHandlerKey', updateCacheHandlerKey)
..add('updateCacheHandlerContext', updateCacheHandlerContext)
..add('fetchPolicy', fetchPolicy)
..add('executeOnListen', executeOnListen)
..add('context', context))
.toString();
}
}
class GFavoritePlacesReqBuilder
implements Builder<GFavoritePlacesReq, GFavoritePlacesReqBuilder> {
_$GFavoritePlacesReq? _$v;
_i3.GFavoritePlacesVarsBuilder? _vars;
_i3.GFavoritePlacesVarsBuilder get vars =>
_$this._vars ??= _i3.GFavoritePlacesVarsBuilder();
set vars(_i3.GFavoritePlacesVarsBuilder? vars) => _$this._vars = vars;
_i4.Operation? _operation;
_i4.Operation? get operation => _$this._operation;
set operation(_i4.Operation? operation) => _$this._operation = operation;
String? _requestId;
String? get requestId => _$this._requestId;
set requestId(String? requestId) => _$this._requestId = requestId;
_i2.GFavoritePlacesData? Function(
_i2.GFavoritePlacesData?,
_i2.GFavoritePlacesData?,
)?
_updateResult;
_i2.GFavoritePlacesData? Function(
_i2.GFavoritePlacesData?,
_i2.GFavoritePlacesData?,
)?
get updateResult => _$this._updateResult;
set updateResult(
_i2.GFavoritePlacesData? Function(
_i2.GFavoritePlacesData?,
_i2.GFavoritePlacesData?,
)?
updateResult,
) => _$this._updateResult = updateResult;
_i2.GFavoritePlacesDataBuilder? _optimisticResponse;
_i2.GFavoritePlacesDataBuilder get optimisticResponse =>
_$this._optimisticResponse ??= _i2.GFavoritePlacesDataBuilder();
set optimisticResponse(_i2.GFavoritePlacesDataBuilder? optimisticResponse) =>
_$this._optimisticResponse = optimisticResponse;
String? _updateCacheHandlerKey;
String? get updateCacheHandlerKey => _$this._updateCacheHandlerKey;
set updateCacheHandlerKey(String? updateCacheHandlerKey) =>
_$this._updateCacheHandlerKey = updateCacheHandlerKey;
Map<String, dynamic>? _updateCacheHandlerContext;
Map<String, dynamic>? get updateCacheHandlerContext =>
_$this._updateCacheHandlerContext;
set updateCacheHandlerContext(
Map<String, dynamic>? updateCacheHandlerContext,
) => _$this._updateCacheHandlerContext = updateCacheHandlerContext;
_i1.FetchPolicy? _fetchPolicy;
_i1.FetchPolicy? get fetchPolicy => _$this._fetchPolicy;
set fetchPolicy(_i1.FetchPolicy? fetchPolicy) =>
_$this._fetchPolicy = fetchPolicy;
bool? _executeOnListen;
bool? get executeOnListen => _$this._executeOnListen;
set executeOnListen(bool? executeOnListen) =>
_$this._executeOnListen = executeOnListen;
_i4.Context? _context;
_i4.Context? get context => _$this._context;
set context(_i4.Context? context) => _$this._context = context;
GFavoritePlacesReqBuilder() {
GFavoritePlacesReq._initializeBuilder(this);
}
GFavoritePlacesReqBuilder get _$this {
final $v = _$v;
if ($v != null) {
_vars = $v.vars.toBuilder();
_operation = $v.operation;
_requestId = $v.requestId;
_updateResult = $v.updateResult;
_optimisticResponse = $v.optimisticResponse?.toBuilder();
_updateCacheHandlerKey = $v.updateCacheHandlerKey;
_updateCacheHandlerContext = $v.updateCacheHandlerContext;
_fetchPolicy = $v.fetchPolicy;
_executeOnListen = $v.executeOnListen;
_context = $v.context;
_$v = null;
}
return this;
}
@override
void replace(GFavoritePlacesReq other) {
_$v = other as _$GFavoritePlacesReq;
}
@override
void update(void Function(GFavoritePlacesReqBuilder)? updates) {
if (updates != null) updates(this);
}
@override
GFavoritePlacesReq build() => _build();
_$GFavoritePlacesReq _build() {
_$GFavoritePlacesReq _$result;
try {
_$result =
_$v ??
_$GFavoritePlacesReq._(
vars: vars.build(),
operation: BuiltValueNullFieldError.checkNotNull(
operation,
r'GFavoritePlacesReq',
'operation',
),
requestId: requestId,
updateResult: updateResult,
optimisticResponse: _optimisticResponse?.build(),
updateCacheHandlerKey: updateCacheHandlerKey,
updateCacheHandlerContext: updateCacheHandlerContext,
fetchPolicy: fetchPolicy,
executeOnListen: BuiltValueNullFieldError.checkNotNull(
executeOnListen,
r'GFavoritePlacesReq',
'executeOnListen',
),
context: context,
);
} catch (_) {
late String _$failedField;
try {
_$failedField = 'vars';
vars.build();
_$failedField = 'optimisticResponse';
_optimisticResponse?.build();
} catch (e) {
throw BuiltValueNestedFieldError(
r'GFavoritePlacesReq',
_$failedField,
e.toString(),
);
}
rethrow;
}
replace(_$result);
return _$result;
}
}
// ignore_for_file: deprecated_member_use_from_same_package,type=lint
@@ -0,0 +1,29 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
import 'package:mapflow/features/mapflow/data/graphql/__generated__/serializers.gql.dart'
as _i1;
part 'favorite_places.var.gql.g.dart';
abstract class GFavoritePlacesVars
implements Built<GFavoritePlacesVars, GFavoritePlacesVarsBuilder> {
GFavoritePlacesVars._();
factory GFavoritePlacesVars([
void Function(GFavoritePlacesVarsBuilder b) updates,
]) = _$GFavoritePlacesVars;
static Serializer<GFavoritePlacesVars> get serializer =>
_$gFavoritePlacesVarsSerializer;
Map<String, dynamic> toJson() =>
(_i1.serializers.serializeWith(GFavoritePlacesVars.serializer, this)
as Map<String, dynamic>);
static GFavoritePlacesVars? fromJson(Map<String, dynamic> json) =>
_i1.serializers.deserializeWith(GFavoritePlacesVars.serializer, json);
}
@@ -0,0 +1,99 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'favorite_places.var.gql.dart';
// **************************************************************************
// BuiltValueGenerator
// **************************************************************************
Serializer<GFavoritePlacesVars> _$gFavoritePlacesVarsSerializer =
_$GFavoritePlacesVarsSerializer();
class _$GFavoritePlacesVarsSerializer
implements StructuredSerializer<GFavoritePlacesVars> {
@override
final Iterable<Type> types = const [
GFavoritePlacesVars,
_$GFavoritePlacesVars,
];
@override
final String wireName = 'GFavoritePlacesVars';
@override
Iterable<Object?> serialize(
Serializers serializers,
GFavoritePlacesVars object, {
FullType specifiedType = FullType.unspecified,
}) {
return <Object?>[];
}
@override
GFavoritePlacesVars deserialize(
Serializers serializers,
Iterable<Object?> serialized, {
FullType specifiedType = FullType.unspecified,
}) {
return GFavoritePlacesVarsBuilder().build();
}
}
class _$GFavoritePlacesVars extends GFavoritePlacesVars {
factory _$GFavoritePlacesVars([
void Function(GFavoritePlacesVarsBuilder)? updates,
]) => (GFavoritePlacesVarsBuilder()..update(updates))._build();
_$GFavoritePlacesVars._() : super._();
@override
GFavoritePlacesVars rebuild(
void Function(GFavoritePlacesVarsBuilder) updates,
) => (toBuilder()..update(updates)).build();
@override
GFavoritePlacesVarsBuilder toBuilder() =>
GFavoritePlacesVarsBuilder()..replace(this);
@override
bool operator ==(Object other) {
if (identical(other, this)) return true;
return other is GFavoritePlacesVars;
}
@override
int get hashCode {
return 586165499;
}
@override
String toString() {
return newBuiltValueToStringHelper(r'GFavoritePlacesVars').toString();
}
}
class GFavoritePlacesVarsBuilder
implements Builder<GFavoritePlacesVars, GFavoritePlacesVarsBuilder> {
_$GFavoritePlacesVars? _$v;
GFavoritePlacesVarsBuilder();
@override
void replace(GFavoritePlacesVars other) {
_$v = other as _$GFavoritePlacesVars;
}
@override
void update(void Function(GFavoritePlacesVarsBuilder)? updates) {
if (updates != null) updates(this);
}
@override
GFavoritePlacesVars build() => _build();
_$GFavoritePlacesVars _build() {
final _$result = _$v ?? _$GFavoritePlacesVars._();
replace(_$result);
return _$result;
}
}
// ignore_for_file: deprecated_member_use_from_same_package,type=lint
@@ -82,6 +82,62 @@ const NearbyPlaces = _i1.OperationDefinitionNode(
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,
@@ -103,13 +159,6 @@ const NearbyPlaces = _i1.OperationDefinitionNode(
directives: [],
selectionSet: null,
),
_i1.FieldNode(
name: _i1.NameNode(value: 'analysis'),
alias: null,
arguments: [],
directives: [],
selectionSet: null,
),
_i1.FieldNode(
name: _i1.NameNode(value: 'createdAt'),
alias: null,
@@ -4,10 +4,10 @@
// 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 _i3;
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 _i2;
as _i3;
import 'package:mapflow/features/mapflow/data/graphql/__generated__/serializers.gql.dart'
as _i1;
@@ -62,6 +62,14 @@ abstract class GNearbyPlacesData_nearbyPlaces
double get longitude;
String? get googlePrimaryType;
BuiltList<String> get googleTypes;
String? get googleBusinessStatus;
double? get googleRating;
int? get googleUserRatingCount;
_i2.JsonObject? get googleRegularOpeningHours;
_i2.JsonObject? get googleCurrentOpeningHours;
BuiltList<String> get photoUrls;
BuiltList<String> get traits;
bool get isFavorite;
BuiltList<GNearbyPlacesData_nearbyPlaces_experiences> get experiences;
static Serializer<GNearbyPlacesData_nearbyPlaces> get serializer =>
_$gNearbyPlacesDataNearbyPlacesSerializer;
@@ -99,8 +107,7 @@ abstract class GNearbyPlacesData_nearbyPlaces_experiences
@BuiltValueField(wireName: '__typename')
String get G__typename;
String get id;
_i2.GVoiceExperienceStatus get status;
_i3.JsonObject? get analysis;
_i3.GVoiceExperienceStatus get status;
String get createdAt;
static Serializer<GNearbyPlacesData_nearbyPlaces_experiences>
get serializer => _$gNearbyPlacesDataNearbyPlacesExperiencesSerializer;
@@ -134,6 +134,25 @@ class _$GNearbyPlacesData_nearbyPlacesSerializer
const FullType(String),
]),
),
'photoUrls',
serializers.serialize(
object.photoUrls,
specifiedType: const FullType(BuiltList, const [
const FullType(String),
]),
),
'traits',
serializers.serialize(
object.traits,
specifiedType: const FullType(BuiltList, const [
const FullType(String),
]),
),
'isFavorite',
serializers.serialize(
object.isFavorite,
specifiedType: const FullType(bool),
),
'experiences',
serializers.serialize(
object.experiences,
@@ -151,6 +170,50 @@ class _$GNearbyPlacesData_nearbyPlacesSerializer
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;
}
@@ -235,6 +298,73 @@ class _$GNearbyPlacesData_nearbyPlacesSerializer
as BuiltList<Object?>,
);
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<Object?>,
);
break;
case 'traits':
result.traits.replace(
serializers.deserialize(
value,
specifiedType: const FullType(BuiltList, const [
const FullType(String),
]),
)!
as BuiltList<Object?>,
);
break;
case 'isFavorite':
result.isFavorite =
serializers.deserialize(
value,
specifiedType: const FullType(bool),
)!
as bool;
break;
case 'experiences':
result.experiences.replace(
serializers.deserialize(
@@ -281,7 +411,7 @@ class _$GNearbyPlacesData_nearbyPlaces_experiencesSerializer
'status',
serializers.serialize(
object.status,
specifiedType: const FullType(_i2.GVoiceExperienceStatus),
specifiedType: const FullType(_i3.GVoiceExperienceStatus),
),
'createdAt',
serializers.serialize(
@@ -289,18 +419,7 @@ class _$GNearbyPlacesData_nearbyPlaces_experiencesSerializer
specifiedType: const FullType(String),
),
];
Object? value;
value = object.analysis;
if (value != null) {
result
..add('analysis')
..add(
serializers.serialize(
value,
specifiedType: const FullType(_i3.JsonObject),
),
);
}
return result;
}
@@ -338,17 +457,9 @@ class _$GNearbyPlacesData_nearbyPlaces_experiencesSerializer
result.status =
serializers.deserialize(
value,
specifiedType: const FullType(_i2.GVoiceExperienceStatus),
specifiedType: const FullType(_i3.GVoiceExperienceStatus),
)!
as _i2.GVoiceExperienceStatus;
break;
case 'analysis':
result.analysis =
serializers.deserialize(
value,
specifiedType: const FullType(_i3.JsonObject),
)
as _i3.JsonObject?;
as _i3.GVoiceExperienceStatus;
break;
case 'createdAt':
result.createdAt =
@@ -502,6 +613,22 @@ class _$GNearbyPlacesData_nearbyPlaces extends GNearbyPlacesData_nearbyPlaces {
@override
final BuiltList<String> 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<String> photoUrls;
@override
final BuiltList<String> traits;
@override
final bool isFavorite;
@override
final BuiltList<GNearbyPlacesData_nearbyPlaces_experiences> experiences;
factory _$GNearbyPlacesData_nearbyPlaces([
@@ -517,6 +644,14 @@ class _$GNearbyPlacesData_nearbyPlaces extends GNearbyPlacesData_nearbyPlaces {
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
@@ -540,6 +675,14 @@ class _$GNearbyPlacesData_nearbyPlaces extends GNearbyPlacesData_nearbyPlaces {
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;
}
@@ -554,6 +697,14 @@ class _$GNearbyPlacesData_nearbyPlaces extends GNearbyPlacesData_nearbyPlaces {
_$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;
@@ -570,6 +721,14 @@ class _$GNearbyPlacesData_nearbyPlaces extends GNearbyPlacesData_nearbyPlaces {
..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))
.toString();
}
@@ -619,6 +778,46 @@ class GNearbyPlacesData_nearbyPlacesBuilder
set googleTypes(ListBuilder<String>? 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<String>? _photoUrls;
ListBuilder<String> get photoUrls =>
_$this._photoUrls ??= ListBuilder<String>();
set photoUrls(ListBuilder<String>? photoUrls) =>
_$this._photoUrls = photoUrls;
ListBuilder<String>? _traits;
ListBuilder<String> get traits => _$this._traits ??= ListBuilder<String>();
set traits(ListBuilder<String>? traits) => _$this._traits = traits;
bool? _isFavorite;
bool? get isFavorite => _$this._isFavorite;
set isFavorite(bool? isFavorite) => _$this._isFavorite = isFavorite;
ListBuilder<GNearbyPlacesData_nearbyPlaces_experiences>? _experiences;
ListBuilder<GNearbyPlacesData_nearbyPlaces_experiences> get experiences =>
_$this._experiences ??=
@@ -642,6 +841,14 @@ class GNearbyPlacesData_nearbyPlacesBuilder
_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;
}
@@ -699,6 +906,18 @@ class GNearbyPlacesData_nearbyPlacesBuilder
),
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'GNearbyPlacesData_nearbyPlaces',
'isFavorite',
),
experiences: experiences.build(),
);
} catch (_) {
@@ -706,6 +925,12 @@ class GNearbyPlacesData_nearbyPlacesBuilder
try {
_$failedField = 'googleTypes';
googleTypes.build();
_$failedField = 'photoUrls';
photoUrls.build();
_$failedField = 'traits';
traits.build();
_$failedField = 'experiences';
experiences.build();
} catch (e) {
@@ -729,9 +954,7 @@ class _$GNearbyPlacesData_nearbyPlaces_experiences
@override
final String id;
@override
final _i2.GVoiceExperienceStatus status;
@override
final _i3.JsonObject? analysis;
final _i3.GVoiceExperienceStatus status;
@override
final String createdAt;
@@ -744,7 +967,6 @@ class _$GNearbyPlacesData_nearbyPlaces_experiences
required this.G__typename,
required this.id,
required this.status,
this.analysis,
required this.createdAt,
}) : super._();
@override
@@ -763,7 +985,6 @@ class _$GNearbyPlacesData_nearbyPlaces_experiences
G__typename == other.G__typename &&
id == other.id &&
status == other.status &&
analysis == other.analysis &&
createdAt == other.createdAt;
}
@@ -773,7 +994,6 @@ class _$GNearbyPlacesData_nearbyPlaces_experiences
_$hash = $jc(_$hash, G__typename.hashCode);
_$hash = $jc(_$hash, id.hashCode);
_$hash = $jc(_$hash, status.hashCode);
_$hash = $jc(_$hash, analysis.hashCode);
_$hash = $jc(_$hash, createdAt.hashCode);
_$hash = $jf(_$hash);
return _$hash;
@@ -787,7 +1007,6 @@ class _$GNearbyPlacesData_nearbyPlaces_experiences
..add('G__typename', G__typename)
..add('id', id)
..add('status', status)
..add('analysis', analysis)
..add('createdAt', createdAt))
.toString();
}
@@ -809,13 +1028,9 @@ class GNearbyPlacesData_nearbyPlaces_experiencesBuilder
String? get id => _$this._id;
set id(String? id) => _$this._id = id;
_i2.GVoiceExperienceStatus? _status;
_i2.GVoiceExperienceStatus? get status => _$this._status;
set status(_i2.GVoiceExperienceStatus? status) => _$this._status = status;
_i3.JsonObject? _analysis;
_i3.JsonObject? get analysis => _$this._analysis;
set analysis(_i3.JsonObject? analysis) => _$this._analysis = analysis;
_i3.GVoiceExperienceStatus? _status;
_i3.GVoiceExperienceStatus? get status => _$this._status;
set status(_i3.GVoiceExperienceStatus? status) => _$this._status = status;
String? _createdAt;
String? get createdAt => _$this._createdAt;
@@ -831,7 +1046,6 @@ class GNearbyPlacesData_nearbyPlaces_experiencesBuilder
_G__typename = $v.G__typename;
_id = $v.id;
_status = $v.status;
_analysis = $v.analysis;
_createdAt = $v.createdAt;
_$v = null;
}
@@ -872,7 +1086,6 @@ class GNearbyPlacesData_nearbyPlaces_experiencesBuilder
r'GNearbyPlacesData_nearbyPlaces_experiences',
'status',
),
analysis: analysis,
createdAt: BuiltValueNullFieldError.checkNotNull(
createdAt,
r'GNearbyPlacesData_nearbyPlaces_experiences',
@@ -67,6 +67,62 @@ const Places = _i1.OperationDefinitionNode(
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,
@@ -88,13 +144,6 @@ const Places = _i1.OperationDefinitionNode(
directives: [],
selectionSet: null,
),
_i1.FieldNode(
name: _i1.NameNode(value: 'analysis'),
alias: null,
arguments: [],
directives: [],
selectionSet: null,
),
_i1.FieldNode(
name: _i1.NameNode(value: 'createdAt'),
alias: null,
@@ -4,10 +4,10 @@
// 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 _i3;
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 _i2;
as _i3;
import 'package:mapflow/features/mapflow/data/graphql/__generated__/serializers.gql.dart'
as _i1;
@@ -55,6 +55,14 @@ abstract class GPlacesData_places
double get longitude;
String? get googlePrimaryType;
BuiltList<String> get googleTypes;
String? get googleBusinessStatus;
double? get googleRating;
int? get googleUserRatingCount;
_i2.JsonObject? get googleRegularOpeningHours;
_i2.JsonObject? get googleCurrentOpeningHours;
BuiltList<String> get photoUrls;
BuiltList<String> get traits;
bool get isFavorite;
BuiltList<GPlacesData_places_experiences> get experiences;
static Serializer<GPlacesData_places> get serializer =>
_$gPlacesDataPlacesSerializer;
@@ -85,8 +93,7 @@ abstract class GPlacesData_places_experiences
@BuiltValueField(wireName: '__typename')
String get G__typename;
String get id;
_i2.GVoiceExperienceStatus get status;
_i3.JsonObject? get analysis;
_i3.GVoiceExperienceStatus get status;
String get createdAt;
static Serializer<GPlacesData_places_experiences> get serializer =>
_$gPlacesDataPlacesExperiencesSerializer;
@@ -128,6 +128,25 @@ class _$GPlacesData_placesSerializer
const FullType(String),
]),
),
'photoUrls',
serializers.serialize(
object.photoUrls,
specifiedType: const FullType(BuiltList, const [
const FullType(String),
]),
),
'traits',
serializers.serialize(
object.traits,
specifiedType: const FullType(BuiltList, const [
const FullType(String),
]),
),
'isFavorite',
serializers.serialize(
object.isFavorite,
specifiedType: const FullType(bool),
),
'experiences',
serializers.serialize(
object.experiences,
@@ -145,6 +164,50 @@ 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;
}
@@ -229,6 +292,73 @@ class _$GPlacesData_placesSerializer
as BuiltList<Object?>,
);
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<Object?>,
);
break;
case 'traits':
result.traits.replace(
serializers.deserialize(
value,
specifiedType: const FullType(BuiltList, const [
const FullType(String),
]),
)!
as BuiltList<Object?>,
);
break;
case 'isFavorite':
result.isFavorite =
serializers.deserialize(
value,
specifiedType: const FullType(bool),
)!
as bool;
break;
case 'experiences':
result.experiences.replace(
serializers.deserialize(
@@ -274,7 +404,7 @@ class _$GPlacesData_places_experiencesSerializer
'status',
serializers.serialize(
object.status,
specifiedType: const FullType(_i2.GVoiceExperienceStatus),
specifiedType: const FullType(_i3.GVoiceExperienceStatus),
),
'createdAt',
serializers.serialize(
@@ -282,18 +412,7 @@ class _$GPlacesData_places_experiencesSerializer
specifiedType: const FullType(String),
),
];
Object? value;
value = object.analysis;
if (value != null) {
result
..add('analysis')
..add(
serializers.serialize(
value,
specifiedType: const FullType(_i3.JsonObject),
),
);
}
return result;
}
@@ -331,17 +450,9 @@ class _$GPlacesData_places_experiencesSerializer
result.status =
serializers.deserialize(
value,
specifiedType: const FullType(_i2.GVoiceExperienceStatus),
specifiedType: const FullType(_i3.GVoiceExperienceStatus),
)!
as _i2.GVoiceExperienceStatus;
break;
case 'analysis':
result.analysis =
serializers.deserialize(
value,
specifiedType: const FullType(_i3.JsonObject),
)
as _i3.JsonObject?;
as _i3.GVoiceExperienceStatus;
break;
case 'createdAt':
result.createdAt =
@@ -492,6 +603,22 @@ class _$GPlacesData_places extends GPlacesData_places {
@override
final BuiltList<String> 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<String> photoUrls;
@override
final BuiltList<String> traits;
@override
final bool isFavorite;
@override
final BuiltList<GPlacesData_places_experiences> experiences;
factory _$GPlacesData_places([
@@ -507,6 +634,14 @@ 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
@@ -530,6 +665,14 @@ 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;
}
@@ -544,6 +687,14 @@ 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;
@@ -560,6 +711,14 @@ 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))
.toString();
}
@@ -605,6 +764,46 @@ class GPlacesData_placesBuilder
set googleTypes(ListBuilder<String>? 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<String>? _photoUrls;
ListBuilder<String> get photoUrls =>
_$this._photoUrls ??= ListBuilder<String>();
set photoUrls(ListBuilder<String>? photoUrls) =>
_$this._photoUrls = photoUrls;
ListBuilder<String>? _traits;
ListBuilder<String> get traits => _$this._traits ??= ListBuilder<String>();
set traits(ListBuilder<String>? traits) => _$this._traits = traits;
bool? _isFavorite;
bool? get isFavorite => _$this._isFavorite;
set isFavorite(bool? isFavorite) => _$this._isFavorite = isFavorite;
ListBuilder<GPlacesData_places_experiences>? _experiences;
ListBuilder<GPlacesData_places_experiences> get experiences =>
_$this._experiences ??= ListBuilder<GPlacesData_places_experiences>();
@@ -626,6 +825,14 @@ 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;
}
@@ -683,6 +890,18 @@ 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 (_) {
@@ -690,6 +909,12 @@ class GPlacesData_placesBuilder
try {
_$failedField = 'googleTypes';
googleTypes.build();
_$failedField = 'photoUrls';
photoUrls.build();
_$failedField = 'traits';
traits.build();
_$failedField = 'experiences';
experiences.build();
} catch (e) {
@@ -712,9 +937,7 @@ class _$GPlacesData_places_experiences extends GPlacesData_places_experiences {
@override
final String id;
@override
final _i2.GVoiceExperienceStatus status;
@override
final _i3.JsonObject? analysis;
final _i3.GVoiceExperienceStatus status;
@override
final String createdAt;
@@ -726,7 +949,6 @@ class _$GPlacesData_places_experiences extends GPlacesData_places_experiences {
required this.G__typename,
required this.id,
required this.status,
this.analysis,
required this.createdAt,
}) : super._();
@override
@@ -745,7 +967,6 @@ class _$GPlacesData_places_experiences extends GPlacesData_places_experiences {
G__typename == other.G__typename &&
id == other.id &&
status == other.status &&
analysis == other.analysis &&
createdAt == other.createdAt;
}
@@ -755,7 +976,6 @@ class _$GPlacesData_places_experiences extends GPlacesData_places_experiences {
_$hash = $jc(_$hash, G__typename.hashCode);
_$hash = $jc(_$hash, id.hashCode);
_$hash = $jc(_$hash, status.hashCode);
_$hash = $jc(_$hash, analysis.hashCode);
_$hash = $jc(_$hash, createdAt.hashCode);
_$hash = $jf(_$hash);
return _$hash;
@@ -767,7 +987,6 @@ class _$GPlacesData_places_experiences extends GPlacesData_places_experiences {
..add('G__typename', G__typename)
..add('id', id)
..add('status', status)
..add('analysis', analysis)
..add('createdAt', createdAt))
.toString();
}
@@ -789,13 +1008,9 @@ class GPlacesData_places_experiencesBuilder
String? get id => _$this._id;
set id(String? id) => _$this._id = id;
_i2.GVoiceExperienceStatus? _status;
_i2.GVoiceExperienceStatus? get status => _$this._status;
set status(_i2.GVoiceExperienceStatus? status) => _$this._status = status;
_i3.JsonObject? _analysis;
_i3.JsonObject? get analysis => _$this._analysis;
set analysis(_i3.JsonObject? analysis) => _$this._analysis = analysis;
_i3.GVoiceExperienceStatus? _status;
_i3.GVoiceExperienceStatus? get status => _$this._status;
set status(_i3.GVoiceExperienceStatus? status) => _$this._status = status;
String? _createdAt;
String? get createdAt => _$this._createdAt;
@@ -811,7 +1026,6 @@ class GPlacesData_places_experiencesBuilder
_G__typename = $v.G__typename;
_id = $v.id;
_status = $v.status;
_analysis = $v.analysis;
_createdAt = $v.createdAt;
_$v = null;
}
@@ -850,7 +1064,6 @@ class GPlacesData_places_experiencesBuilder
r'GPlacesData_places_experiences',
'status',
),
analysis: analysis,
createdAt: BuiltValueNullFieldError.checkNotNull(
createdAt,
r'GPlacesData_places_experiences',
@@ -0,0 +1,175 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'package:gql/ast.dart' as _i1;
const RemoveFavoritePlace = _i1.OperationDefinitionNode(
type: _i1.OperationType.mutation,
name: _i1.NameNode(value: 'RemoveFavoritePlace'),
variableDefinitions: [
_i1.VariableDefinitionNode(
variable: _i1.VariableNode(name: _i1.NameNode(value: 'placeId')),
type: _i1.NamedTypeNode(name: _i1.NameNode(value: 'ID'), isNonNull: true),
defaultValue: _i1.DefaultValueNode(value: null),
directives: [],
),
],
directives: [],
selectionSet: _i1.SelectionSetNode(
selections: [
_i1.FieldNode(
name: _i1.NameNode(value: 'removeFavoritePlace'),
alias: null,
arguments: [
_i1.ArgumentNode(
name: _i1.NameNode(value: 'placeId'),
value: _i1.VariableNode(name: _i1.NameNode(value: 'placeId')),
),
],
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,
),
],
),
),
],
),
),
],
),
);
const document = _i1.DocumentNode(definitions: [RemoveFavoritePlace]);
@@ -0,0 +1,138 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// 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;
part 'remove_favorite_place.data.gql.g.dart';
abstract class GRemoveFavoritePlaceData
implements
Built<GRemoveFavoritePlaceData, GRemoveFavoritePlaceDataBuilder> {
GRemoveFavoritePlaceData._();
factory GRemoveFavoritePlaceData([
void Function(GRemoveFavoritePlaceDataBuilder b) updates,
]) = _$GRemoveFavoritePlaceData;
static void _initializeBuilder(GRemoveFavoritePlaceDataBuilder b) =>
b..G__typename = 'Mutation';
@BuiltValueField(wireName: '__typename')
String get G__typename;
GRemoveFavoritePlaceData_removeFavoritePlace get removeFavoritePlace;
static Serializer<GRemoveFavoritePlaceData> get serializer =>
_$gRemoveFavoritePlaceDataSerializer;
Map<String, dynamic> toJson() =>
(_i1.serializers.serializeWith(GRemoveFavoritePlaceData.serializer, this)
as Map<String, dynamic>);
static GRemoveFavoritePlaceData? fromJson(Map<String, dynamic> json) => _i1
.serializers
.deserializeWith(GRemoveFavoritePlaceData.serializer, json);
}
abstract class GRemoveFavoritePlaceData_removeFavoritePlace
implements
Built<
GRemoveFavoritePlaceData_removeFavoritePlace,
GRemoveFavoritePlaceData_removeFavoritePlaceBuilder
> {
GRemoveFavoritePlaceData_removeFavoritePlace._();
factory GRemoveFavoritePlaceData_removeFavoritePlace([
void Function(GRemoveFavoritePlaceData_removeFavoritePlaceBuilder b)
updates,
]) = _$GRemoveFavoritePlaceData_removeFavoritePlace;
static void _initializeBuilder(
GRemoveFavoritePlaceData_removeFavoritePlaceBuilder b,
) => b..G__typename = 'Place';
@BuiltValueField(wireName: '__typename')
String get G__typename;
String get id;
String get googlePlaceId;
String get name;
double get latitude;
double get longitude;
String? get googlePrimaryType;
BuiltList<String> get googleTypes;
String? get googleBusinessStatus;
double? get googleRating;
int? get googleUserRatingCount;
_i2.JsonObject? get googleRegularOpeningHours;
_i2.JsonObject? get googleCurrentOpeningHours;
BuiltList<String> get photoUrls;
BuiltList<String> get traits;
bool get isFavorite;
BuiltList<GRemoveFavoritePlaceData_removeFavoritePlace_experiences>
get experiences;
static Serializer<GRemoveFavoritePlaceData_removeFavoritePlace>
get serializer => _$gRemoveFavoritePlaceDataRemoveFavoritePlaceSerializer;
Map<String, dynamic> toJson() =>
(_i1.serializers.serializeWith(
GRemoveFavoritePlaceData_removeFavoritePlace.serializer,
this,
)
as Map<String, dynamic>);
static GRemoveFavoritePlaceData_removeFavoritePlace? fromJson(
Map<String, dynamic> json,
) => _i1.serializers.deserializeWith(
GRemoveFavoritePlaceData_removeFavoritePlace.serializer,
json,
);
}
abstract class GRemoveFavoritePlaceData_removeFavoritePlace_experiences
implements
Built<
GRemoveFavoritePlaceData_removeFavoritePlace_experiences,
GRemoveFavoritePlaceData_removeFavoritePlace_experiencesBuilder
> {
GRemoveFavoritePlaceData_removeFavoritePlace_experiences._();
factory GRemoveFavoritePlaceData_removeFavoritePlace_experiences([
void Function(
GRemoveFavoritePlaceData_removeFavoritePlace_experiencesBuilder b,
)
updates,
]) = _$GRemoveFavoritePlaceData_removeFavoritePlace_experiences;
static void _initializeBuilder(
GRemoveFavoritePlaceData_removeFavoritePlace_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<GRemoveFavoritePlaceData_removeFavoritePlace_experiences>
get serializer =>
_$gRemoveFavoritePlaceDataRemoveFavoritePlaceExperiencesSerializer;
Map<String, dynamic> toJson() =>
(_i1.serializers.serializeWith(
GRemoveFavoritePlaceData_removeFavoritePlace_experiences.serializer,
this,
)
as Map<String, dynamic>);
static GRemoveFavoritePlaceData_removeFavoritePlace_experiences? fromJson(
Map<String, dynamic> json,
) => _i1.serializers.deserializeWith(
GRemoveFavoritePlaceData_removeFavoritePlace_experiences.serializer,
json,
);
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,101 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
import 'package:ferry_exec/ferry_exec.dart' as _i1;
import 'package:gql_exec/gql_exec.dart' as _i4;
import 'package:mapflow/features/mapflow/data/graphql/__generated__/remove_favorite_place.ast.gql.dart'
as _i5;
import 'package:mapflow/features/mapflow/data/graphql/__generated__/remove_favorite_place.data.gql.dart'
as _i2;
import 'package:mapflow/features/mapflow/data/graphql/__generated__/remove_favorite_place.var.gql.dart'
as _i3;
import 'package:mapflow/features/mapflow/data/graphql/__generated__/serializers.gql.dart'
as _i6;
part 'remove_favorite_place.req.gql.g.dart';
abstract class GRemoveFavoritePlaceReq
implements
Built<GRemoveFavoritePlaceReq, GRemoveFavoritePlaceReqBuilder>,
_i1.OperationRequest<
_i2.GRemoveFavoritePlaceData,
_i3.GRemoveFavoritePlaceVars
> {
GRemoveFavoritePlaceReq._();
factory GRemoveFavoritePlaceReq([
void Function(GRemoveFavoritePlaceReqBuilder b) updates,
]) = _$GRemoveFavoritePlaceReq;
static void _initializeBuilder(GRemoveFavoritePlaceReqBuilder b) => b
..operation = _i4.Operation(
document: _i5.document,
operationName: 'RemoveFavoritePlace',
)
..executeOnListen = true;
@override
_i3.GRemoveFavoritePlaceVars get vars;
@override
_i4.Operation get operation;
@override
_i4.Request get execRequest => _i4.Request(
operation: operation,
variables: vars.toJson(),
context: context ?? const _i4.Context(),
);
@override
String? get requestId;
@override
@BuiltValueField(serialize: false)
_i2.GRemoveFavoritePlaceData? Function(
_i2.GRemoveFavoritePlaceData?,
_i2.GRemoveFavoritePlaceData?,
)?
get updateResult;
@override
_i2.GRemoveFavoritePlaceData? get optimisticResponse;
@override
String? get updateCacheHandlerKey;
@override
Map<String, dynamic>? get updateCacheHandlerContext;
@override
_i1.FetchPolicy? get fetchPolicy;
@override
bool get executeOnListen;
@override
@BuiltValueField(serialize: false)
_i4.Context? get context;
@override
_i2.GRemoveFavoritePlaceData? parseData(Map<String, dynamic> json) =>
_i2.GRemoveFavoritePlaceData.fromJson(json);
@override
Map<String, dynamic> varsToJson() => vars.toJson();
@override
Map<String, dynamic> dataToJson(_i2.GRemoveFavoritePlaceData data) =>
data.toJson();
@override
_i1.OperationRequest<
_i2.GRemoveFavoritePlaceData,
_i3.GRemoveFavoritePlaceVars
>
transformOperation(_i4.Operation Function(_i4.Operation) transform) =>
this.rebuild((b) => b..operation = transform(operation));
static Serializer<GRemoveFavoritePlaceReq> get serializer =>
_$gRemoveFavoritePlaceReqSerializer;
Map<String, dynamic> toJson() =>
(_i6.serializers.serializeWith(GRemoveFavoritePlaceReq.serializer, this)
as Map<String, dynamic>);
static GRemoveFavoritePlaceReq? fromJson(Map<String, dynamic> json) =>
_i6.serializers.deserializeWith(GRemoveFavoritePlaceReq.serializer, json);
}
@@ -0,0 +1,443 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'remove_favorite_place.req.gql.dart';
// **************************************************************************
// BuiltValueGenerator
// **************************************************************************
Serializer<GRemoveFavoritePlaceReq> _$gRemoveFavoritePlaceReqSerializer =
_$GRemoveFavoritePlaceReqSerializer();
class _$GRemoveFavoritePlaceReqSerializer
implements StructuredSerializer<GRemoveFavoritePlaceReq> {
@override
final Iterable<Type> types = const [
GRemoveFavoritePlaceReq,
_$GRemoveFavoritePlaceReq,
];
@override
final String wireName = 'GRemoveFavoritePlaceReq';
@override
Iterable<Object?> serialize(
Serializers serializers,
GRemoveFavoritePlaceReq object, {
FullType specifiedType = FullType.unspecified,
}) {
final result = <Object?>[
'vars',
serializers.serialize(
object.vars,
specifiedType: const FullType(_i3.GRemoveFavoritePlaceVars),
),
'operation',
serializers.serialize(
object.operation,
specifiedType: const FullType(_i4.Operation),
),
'executeOnListen',
serializers.serialize(
object.executeOnListen,
specifiedType: const FullType(bool),
),
];
Object? value;
value = object.requestId;
if (value != null) {
result
..add('requestId')
..add(
serializers.serialize(value, specifiedType: const FullType(String)),
);
}
value = object.optimisticResponse;
if (value != null) {
result
..add('optimisticResponse')
..add(
serializers.serialize(
value,
specifiedType: const FullType(_i2.GRemoveFavoritePlaceData),
),
);
}
value = object.updateCacheHandlerKey;
if (value != null) {
result
..add('updateCacheHandlerKey')
..add(
serializers.serialize(value, specifiedType: const FullType(String)),
);
}
value = object.updateCacheHandlerContext;
if (value != null) {
result
..add('updateCacheHandlerContext')
..add(
serializers.serialize(
value,
specifiedType: const FullType(Map, const [
const FullType(String),
const FullType(dynamic),
]),
),
);
}
value = object.fetchPolicy;
if (value != null) {
result
..add('fetchPolicy')
..add(
serializers.serialize(
value,
specifiedType: const FullType(_i1.FetchPolicy),
),
);
}
return result;
}
@override
GRemoveFavoritePlaceReq deserialize(
Serializers serializers,
Iterable<Object?> serialized, {
FullType specifiedType = FullType.unspecified,
}) {
final result = GRemoveFavoritePlaceReqBuilder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current! as String;
iterator.moveNext();
final Object? value = iterator.current;
switch (key) {
case 'vars':
result.vars.replace(
serializers.deserialize(
value,
specifiedType: const FullType(_i3.GRemoveFavoritePlaceVars),
)!
as _i3.GRemoveFavoritePlaceVars,
);
break;
case 'operation':
result.operation =
serializers.deserialize(
value,
specifiedType: const FullType(_i4.Operation),
)!
as _i4.Operation;
break;
case 'requestId':
result.requestId =
serializers.deserialize(
value,
specifiedType: const FullType(String),
)
as String?;
break;
case 'optimisticResponse':
result.optimisticResponse.replace(
serializers.deserialize(
value,
specifiedType: const FullType(_i2.GRemoveFavoritePlaceData),
)!
as _i2.GRemoveFavoritePlaceData,
);
break;
case 'updateCacheHandlerKey':
result.updateCacheHandlerKey =
serializers.deserialize(
value,
specifiedType: const FullType(String),
)
as String?;
break;
case 'updateCacheHandlerContext':
result.updateCacheHandlerContext =
serializers.deserialize(
value,
specifiedType: const FullType(Map, const [
const FullType(String),
const FullType(dynamic),
]),
)
as Map<String, dynamic>?;
break;
case 'fetchPolicy':
result.fetchPolicy =
serializers.deserialize(
value,
specifiedType: const FullType(_i1.FetchPolicy),
)
as _i1.FetchPolicy?;
break;
case 'executeOnListen':
result.executeOnListen =
serializers.deserialize(
value,
specifiedType: const FullType(bool),
)!
as bool;
break;
}
}
return result.build();
}
}
class _$GRemoveFavoritePlaceReq extends GRemoveFavoritePlaceReq {
@override
final _i3.GRemoveFavoritePlaceVars vars;
@override
final _i4.Operation operation;
@override
final String? requestId;
@override
final _i2.GRemoveFavoritePlaceData? Function(
_i2.GRemoveFavoritePlaceData?,
_i2.GRemoveFavoritePlaceData?,
)?
updateResult;
@override
final _i2.GRemoveFavoritePlaceData? optimisticResponse;
@override
final String? updateCacheHandlerKey;
@override
final Map<String, dynamic>? updateCacheHandlerContext;
@override
final _i1.FetchPolicy? fetchPolicy;
@override
final bool executeOnListen;
@override
final _i4.Context? context;
factory _$GRemoveFavoritePlaceReq([
void Function(GRemoveFavoritePlaceReqBuilder)? updates,
]) => (GRemoveFavoritePlaceReqBuilder()..update(updates))._build();
_$GRemoveFavoritePlaceReq._({
required this.vars,
required this.operation,
this.requestId,
this.updateResult,
this.optimisticResponse,
this.updateCacheHandlerKey,
this.updateCacheHandlerContext,
this.fetchPolicy,
required this.executeOnListen,
this.context,
}) : super._();
@override
GRemoveFavoritePlaceReq rebuild(
void Function(GRemoveFavoritePlaceReqBuilder) updates,
) => (toBuilder()..update(updates)).build();
@override
GRemoveFavoritePlaceReqBuilder toBuilder() =>
GRemoveFavoritePlaceReqBuilder()..replace(this);
@override
bool operator ==(Object other) {
if (identical(other, this)) return true;
return other is GRemoveFavoritePlaceReq &&
vars == other.vars &&
operation == other.operation &&
requestId == other.requestId &&
updateResult == other.updateResult &&
optimisticResponse == other.optimisticResponse &&
updateCacheHandlerKey == other.updateCacheHandlerKey &&
updateCacheHandlerContext == other.updateCacheHandlerContext &&
fetchPolicy == other.fetchPolicy &&
executeOnListen == other.executeOnListen &&
context == other.context;
}
@override
int get hashCode {
var _$hash = 0;
_$hash = $jc(_$hash, vars.hashCode);
_$hash = $jc(_$hash, operation.hashCode);
_$hash = $jc(_$hash, requestId.hashCode);
_$hash = $jc(_$hash, updateResult.hashCode);
_$hash = $jc(_$hash, optimisticResponse.hashCode);
_$hash = $jc(_$hash, updateCacheHandlerKey.hashCode);
_$hash = $jc(_$hash, updateCacheHandlerContext.hashCode);
_$hash = $jc(_$hash, fetchPolicy.hashCode);
_$hash = $jc(_$hash, executeOnListen.hashCode);
_$hash = $jc(_$hash, context.hashCode);
_$hash = $jf(_$hash);
return _$hash;
}
@override
String toString() {
return (newBuiltValueToStringHelper(r'GRemoveFavoritePlaceReq')
..add('vars', vars)
..add('operation', operation)
..add('requestId', requestId)
..add('updateResult', updateResult)
..add('optimisticResponse', optimisticResponse)
..add('updateCacheHandlerKey', updateCacheHandlerKey)
..add('updateCacheHandlerContext', updateCacheHandlerContext)
..add('fetchPolicy', fetchPolicy)
..add('executeOnListen', executeOnListen)
..add('context', context))
.toString();
}
}
class GRemoveFavoritePlaceReqBuilder
implements
Builder<GRemoveFavoritePlaceReq, GRemoveFavoritePlaceReqBuilder> {
_$GRemoveFavoritePlaceReq? _$v;
_i3.GRemoveFavoritePlaceVarsBuilder? _vars;
_i3.GRemoveFavoritePlaceVarsBuilder get vars =>
_$this._vars ??= _i3.GRemoveFavoritePlaceVarsBuilder();
set vars(_i3.GRemoveFavoritePlaceVarsBuilder? vars) => _$this._vars = vars;
_i4.Operation? _operation;
_i4.Operation? get operation => _$this._operation;
set operation(_i4.Operation? operation) => _$this._operation = operation;
String? _requestId;
String? get requestId => _$this._requestId;
set requestId(String? requestId) => _$this._requestId = requestId;
_i2.GRemoveFavoritePlaceData? Function(
_i2.GRemoveFavoritePlaceData?,
_i2.GRemoveFavoritePlaceData?,
)?
_updateResult;
_i2.GRemoveFavoritePlaceData? Function(
_i2.GRemoveFavoritePlaceData?,
_i2.GRemoveFavoritePlaceData?,
)?
get updateResult => _$this._updateResult;
set updateResult(
_i2.GRemoveFavoritePlaceData? Function(
_i2.GRemoveFavoritePlaceData?,
_i2.GRemoveFavoritePlaceData?,
)?
updateResult,
) => _$this._updateResult = updateResult;
_i2.GRemoveFavoritePlaceDataBuilder? _optimisticResponse;
_i2.GRemoveFavoritePlaceDataBuilder get optimisticResponse =>
_$this._optimisticResponse ??= _i2.GRemoveFavoritePlaceDataBuilder();
set optimisticResponse(
_i2.GRemoveFavoritePlaceDataBuilder? optimisticResponse,
) => _$this._optimisticResponse = optimisticResponse;
String? _updateCacheHandlerKey;
String? get updateCacheHandlerKey => _$this._updateCacheHandlerKey;
set updateCacheHandlerKey(String? updateCacheHandlerKey) =>
_$this._updateCacheHandlerKey = updateCacheHandlerKey;
Map<String, dynamic>? _updateCacheHandlerContext;
Map<String, dynamic>? get updateCacheHandlerContext =>
_$this._updateCacheHandlerContext;
set updateCacheHandlerContext(
Map<String, dynamic>? updateCacheHandlerContext,
) => _$this._updateCacheHandlerContext = updateCacheHandlerContext;
_i1.FetchPolicy? _fetchPolicy;
_i1.FetchPolicy? get fetchPolicy => _$this._fetchPolicy;
set fetchPolicy(_i1.FetchPolicy? fetchPolicy) =>
_$this._fetchPolicy = fetchPolicy;
bool? _executeOnListen;
bool? get executeOnListen => _$this._executeOnListen;
set executeOnListen(bool? executeOnListen) =>
_$this._executeOnListen = executeOnListen;
_i4.Context? _context;
_i4.Context? get context => _$this._context;
set context(_i4.Context? context) => _$this._context = context;
GRemoveFavoritePlaceReqBuilder() {
GRemoveFavoritePlaceReq._initializeBuilder(this);
}
GRemoveFavoritePlaceReqBuilder get _$this {
final $v = _$v;
if ($v != null) {
_vars = $v.vars.toBuilder();
_operation = $v.operation;
_requestId = $v.requestId;
_updateResult = $v.updateResult;
_optimisticResponse = $v.optimisticResponse?.toBuilder();
_updateCacheHandlerKey = $v.updateCacheHandlerKey;
_updateCacheHandlerContext = $v.updateCacheHandlerContext;
_fetchPolicy = $v.fetchPolicy;
_executeOnListen = $v.executeOnListen;
_context = $v.context;
_$v = null;
}
return this;
}
@override
void replace(GRemoveFavoritePlaceReq other) {
_$v = other as _$GRemoveFavoritePlaceReq;
}
@override
void update(void Function(GRemoveFavoritePlaceReqBuilder)? updates) {
if (updates != null) updates(this);
}
@override
GRemoveFavoritePlaceReq build() => _build();
_$GRemoveFavoritePlaceReq _build() {
_$GRemoveFavoritePlaceReq _$result;
try {
_$result =
_$v ??
_$GRemoveFavoritePlaceReq._(
vars: vars.build(),
operation: BuiltValueNullFieldError.checkNotNull(
operation,
r'GRemoveFavoritePlaceReq',
'operation',
),
requestId: requestId,
updateResult: updateResult,
optimisticResponse: _optimisticResponse?.build(),
updateCacheHandlerKey: updateCacheHandlerKey,
updateCacheHandlerContext: updateCacheHandlerContext,
fetchPolicy: fetchPolicy,
executeOnListen: BuiltValueNullFieldError.checkNotNull(
executeOnListen,
r'GRemoveFavoritePlaceReq',
'executeOnListen',
),
context: context,
);
} catch (_) {
late String _$failedField;
try {
_$failedField = 'vars';
vars.build();
_$failedField = 'optimisticResponse';
_optimisticResponse?.build();
} catch (e) {
throw BuiltValueNestedFieldError(
r'GRemoveFavoritePlaceReq',
_$failedField,
e.toString(),
);
}
rethrow;
}
replace(_$result);
return _$result;
}
}
// ignore_for_file: deprecated_member_use_from_same_package,type=lint
@@ -0,0 +1,32 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
import 'package:mapflow/features/mapflow/data/graphql/__generated__/serializers.gql.dart'
as _i1;
part 'remove_favorite_place.var.gql.g.dart';
abstract class GRemoveFavoritePlaceVars
implements
Built<GRemoveFavoritePlaceVars, GRemoveFavoritePlaceVarsBuilder> {
GRemoveFavoritePlaceVars._();
factory GRemoveFavoritePlaceVars([
void Function(GRemoveFavoritePlaceVarsBuilder b) updates,
]) = _$GRemoveFavoritePlaceVars;
String get placeId;
static Serializer<GRemoveFavoritePlaceVars> get serializer =>
_$gRemoveFavoritePlaceVarsSerializer;
Map<String, dynamic> toJson() =>
(_i1.serializers.serializeWith(GRemoveFavoritePlaceVars.serializer, this)
as Map<String, dynamic>);
static GRemoveFavoritePlaceVars? fromJson(Map<String, dynamic> json) => _i1
.serializers
.deserializeWith(GRemoveFavoritePlaceVars.serializer, json);
}
@@ -0,0 +1,156 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'remove_favorite_place.var.gql.dart';
// **************************************************************************
// BuiltValueGenerator
// **************************************************************************
Serializer<GRemoveFavoritePlaceVars> _$gRemoveFavoritePlaceVarsSerializer =
_$GRemoveFavoritePlaceVarsSerializer();
class _$GRemoveFavoritePlaceVarsSerializer
implements StructuredSerializer<GRemoveFavoritePlaceVars> {
@override
final Iterable<Type> types = const [
GRemoveFavoritePlaceVars,
_$GRemoveFavoritePlaceVars,
];
@override
final String wireName = 'GRemoveFavoritePlaceVars';
@override
Iterable<Object?> serialize(
Serializers serializers,
GRemoveFavoritePlaceVars object, {
FullType specifiedType = FullType.unspecified,
}) {
final result = <Object?>[
'placeId',
serializers.serialize(
object.placeId,
specifiedType: const FullType(String),
),
];
return result;
}
@override
GRemoveFavoritePlaceVars deserialize(
Serializers serializers,
Iterable<Object?> serialized, {
FullType specifiedType = FullType.unspecified,
}) {
final result = GRemoveFavoritePlaceVarsBuilder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current! as String;
iterator.moveNext();
final Object? value = iterator.current;
switch (key) {
case 'placeId':
result.placeId =
serializers.deserialize(
value,
specifiedType: const FullType(String),
)!
as String;
break;
}
}
return result.build();
}
}
class _$GRemoveFavoritePlaceVars extends GRemoveFavoritePlaceVars {
@override
final String placeId;
factory _$GRemoveFavoritePlaceVars([
void Function(GRemoveFavoritePlaceVarsBuilder)? updates,
]) => (GRemoveFavoritePlaceVarsBuilder()..update(updates))._build();
_$GRemoveFavoritePlaceVars._({required this.placeId}) : super._();
@override
GRemoveFavoritePlaceVars rebuild(
void Function(GRemoveFavoritePlaceVarsBuilder) updates,
) => (toBuilder()..update(updates)).build();
@override
GRemoveFavoritePlaceVarsBuilder toBuilder() =>
GRemoveFavoritePlaceVarsBuilder()..replace(this);
@override
bool operator ==(Object other) {
if (identical(other, this)) return true;
return other is GRemoveFavoritePlaceVars && placeId == other.placeId;
}
@override
int get hashCode {
var _$hash = 0;
_$hash = $jc(_$hash, placeId.hashCode);
_$hash = $jf(_$hash);
return _$hash;
}
@override
String toString() {
return (newBuiltValueToStringHelper(
r'GRemoveFavoritePlaceVars',
)..add('placeId', placeId)).toString();
}
}
class GRemoveFavoritePlaceVarsBuilder
implements
Builder<GRemoveFavoritePlaceVars, GRemoveFavoritePlaceVarsBuilder> {
_$GRemoveFavoritePlaceVars? _$v;
String? _placeId;
String? get placeId => _$this._placeId;
set placeId(String? placeId) => _$this._placeId = placeId;
GRemoveFavoritePlaceVarsBuilder();
GRemoveFavoritePlaceVarsBuilder get _$this {
final $v = _$v;
if ($v != null) {
_placeId = $v.placeId;
_$v = null;
}
return this;
}
@override
void replace(GRemoveFavoritePlaceVars other) {
_$v = other as _$GRemoveFavoritePlaceVars;
}
@override
void update(void Function(GRemoveFavoritePlaceVarsBuilder)? updates) {
if (updates != null) updates(this);
}
@override
GRemoveFavoritePlaceVars build() => _build();
_$GRemoveFavoritePlaceVars _build() {
final _$result =
_$v ??
_$GRemoveFavoritePlaceVars._(
placeId: BuiltValueNullFieldError.checkNotNull(
placeId,
r'GRemoveFavoritePlaceVars',
'placeId',
),
);
replace(_$result);
return _$result;
}
}
// ignore_for_file: deprecated_member_use_from_same_package,type=lint
@@ -106,6 +106,111 @@ const Place = _i1.ObjectTypeDefinitionNode(
isNonNull: true,
),
),
_i1.FieldDefinitionNode(
name: _i1.NameNode(value: 'googleBusinessStatus'),
directives: [],
args: [],
type: _i1.NamedTypeNode(
name: _i1.NameNode(value: 'String'),
isNonNull: false,
),
),
_i1.FieldDefinitionNode(
name: _i1.NameNode(value: 'googleRating'),
directives: [],
args: [],
type: _i1.NamedTypeNode(
name: _i1.NameNode(value: 'Float'),
isNonNull: false,
),
),
_i1.FieldDefinitionNode(
name: _i1.NameNode(value: 'googleUserRatingCount'),
directives: [],
args: [],
type: _i1.NamedTypeNode(
name: _i1.NameNode(value: 'Int'),
isNonNull: false,
),
),
_i1.FieldDefinitionNode(
name: _i1.NameNode(value: 'googleRegularOpeningHours'),
directives: [],
args: [],
type: _i1.NamedTypeNode(
name: _i1.NameNode(value: 'JSON'),
isNonNull: false,
),
),
_i1.FieldDefinitionNode(
name: _i1.NameNode(value: 'googleCurrentOpeningHours'),
directives: [],
args: [],
type: _i1.NamedTypeNode(
name: _i1.NameNode(value: 'JSON'),
isNonNull: false,
),
),
_i1.FieldDefinitionNode(
name: _i1.NameNode(value: 'googlePayload'),
directives: [],
args: [],
type: _i1.NamedTypeNode(
name: _i1.NameNode(value: 'JSON'),
isNonNull: false,
),
),
_i1.FieldDefinitionNode(
name: _i1.NameNode(value: 'googlePhotos'),
directives: [],
args: [],
type: _i1.NamedTypeNode(
name: _i1.NameNode(value: 'JSON'),
isNonNull: false,
),
),
_i1.FieldDefinitionNode(
name: _i1.NameNode(value: 'photoUrls'),
directives: [],
args: [],
type: _i1.ListTypeNode(
type: _i1.NamedTypeNode(
name: _i1.NameNode(value: 'String'),
isNonNull: true,
),
isNonNull: true,
),
),
_i1.FieldDefinitionNode(
name: _i1.NameNode(value: 'photoAttributions'),
directives: [],
args: [],
type: _i1.NamedTypeNode(
name: _i1.NameNode(value: 'JSON'),
isNonNull: false,
),
),
_i1.FieldDefinitionNode(
name: _i1.NameNode(value: 'traits'),
directives: [],
args: [],
type: _i1.ListTypeNode(
type: _i1.NamedTypeNode(
name: _i1.NameNode(value: 'String'),
isNonNull: true,
),
isNonNull: true,
),
),
_i1.FieldDefinitionNode(
name: _i1.NameNode(value: 'isFavorite'),
directives: [],
args: [],
type: _i1.NamedTypeNode(
name: _i1.NameNode(value: 'Boolean'),
isNonNull: true,
),
),
_i1.FieldDefinitionNode(
name: _i1.NameNode(value: 'experiences'),
directives: [],
@@ -270,6 +375,27 @@ const VoiceExperience = _i1.ObjectTypeDefinitionNode(
isNonNull: false,
),
),
_i1.FieldDefinitionNode(
name: _i1.NameNode(value: 'recordingPayload'),
directives: [],
args: [],
type: _i1.NamedTypeNode(
name: _i1.NameNode(value: 'JSON'),
isNonNull: false,
),
),
_i1.FieldDefinitionNode(
name: _i1.NameNode(value: 'promptHintsShown'),
directives: [],
args: [],
type: _i1.ListTypeNode(
type: _i1.NamedTypeNode(
name: _i1.NameNode(value: 'String'),
isNonNull: true,
),
isNonNull: true,
),
),
_i1.FieldDefinitionNode(
name: _i1.NameNode(value: 'createdAt'),
directives: [],
@@ -321,6 +447,27 @@ const CreateVoiceExperienceInput = _i1.InputObjectTypeDefinitionNode(
),
defaultValue: null,
),
_i1.InputValueDefinitionNode(
name: _i1.NameNode(value: 'googlePrimaryType'),
directives: [],
type: _i1.NamedTypeNode(
name: _i1.NameNode(value: 'String'),
isNonNull: false,
),
defaultValue: null,
),
_i1.InputValueDefinitionNode(
name: _i1.NameNode(value: 'googleTypes'),
directives: [],
type: _i1.ListTypeNode(
type: _i1.NamedTypeNode(
name: _i1.NameNode(value: 'String'),
isNonNull: true,
),
isNonNull: false,
),
defaultValue: _i1.ListValueNode(values: []),
),
_i1.InputValueDefinitionNode(
name: _i1.NameNode(value: 'durationSeconds'),
directives: [],
@@ -357,6 +504,36 @@ const CreateVoiceExperienceInput = _i1.InputObjectTypeDefinitionNode(
),
defaultValue: null,
),
_i1.InputValueDefinitionNode(
name: _i1.NameNode(value: 'addToFavorites'),
directives: [],
type: _i1.NamedTypeNode(
name: _i1.NameNode(value: 'Boolean'),
isNonNull: false,
),
defaultValue: _i1.BooleanValueNode(value: false),
),
_i1.InputValueDefinitionNode(
name: _i1.NameNode(value: 'recordingPayload'),
directives: [],
type: _i1.NamedTypeNode(
name: _i1.NameNode(value: 'JSON'),
isNonNull: false,
),
defaultValue: null,
),
_i1.InputValueDefinitionNode(
name: _i1.NameNode(value: 'promptHintsShown'),
directives: [],
type: _i1.ListTypeNode(
type: _i1.NamedTypeNode(
name: _i1.NameNode(value: 'String'),
isNonNull: true,
),
isNonNull: false,
),
defaultValue: _i1.ListValueNode(values: []),
),
],
);
const NearbyPlacesInput = _i1.InputObjectTypeDefinitionNode(
@@ -392,6 +569,21 @@ const NearbyPlacesInput = _i1.InputObjectTypeDefinitionNode(
),
],
);
const SearchPlacesInput = _i1.InputObjectTypeDefinitionNode(
name: _i1.NameNode(value: 'SearchPlacesInput'),
directives: [],
fields: [
_i1.InputValueDefinitionNode(
name: _i1.NameNode(value: 'query'),
directives: [],
type: _i1.NamedTypeNode(
name: _i1.NameNode(value: 'String'),
isNonNull: true,
),
defaultValue: null,
),
],
);
const AuthenticateTelegramInput = _i1.InputObjectTypeDefinitionNode(
name: _i1.NameNode(value: 'AuthenticateTelegramInput'),
directives: [],
@@ -551,6 +743,34 @@ const TelegramBotLoginSession = _i1.ObjectTypeDefinitionNode(
),
],
);
const SearchPlacesPayload = _i1.ObjectTypeDefinitionNode(
name: _i1.NameNode(value: 'SearchPlacesPayload'),
directives: [],
interfaces: [],
fields: [
_i1.FieldDefinitionNode(
name: _i1.NameNode(value: 'message'),
directives: [],
args: [],
type: _i1.NamedTypeNode(
name: _i1.NameNode(value: 'String'),
isNonNull: true,
),
),
_i1.FieldDefinitionNode(
name: _i1.NameNode(value: 'places'),
directives: [],
args: [],
type: _i1.ListTypeNode(
type: _i1.NamedTypeNode(
name: _i1.NameNode(value: 'Place'),
isNonNull: true,
),
isNonNull: true,
),
),
],
);
const Query = _i1.ObjectTypeDefinitionNode(
name: _i1.NameNode(value: 'Query'),
directives: [],
@@ -586,6 +806,18 @@ const Query = _i1.ObjectTypeDefinitionNode(
isNonNull: true,
),
),
_i1.FieldDefinitionNode(
name: _i1.NameNode(value: 'favoritePlaces'),
directives: [],
args: [],
type: _i1.ListTypeNode(
type: _i1.NamedTypeNode(
name: _i1.NameNode(value: 'Place'),
isNonNull: true,
),
isNonNull: true,
),
),
_i1.FieldDefinitionNode(
name: _i1.NameNode(value: 'nearbyPlaces'),
directives: [],
@@ -608,6 +840,25 @@ const Query = _i1.ObjectTypeDefinitionNode(
isNonNull: true,
),
),
_i1.FieldDefinitionNode(
name: _i1.NameNode(value: 'searchPlaces'),
directives: [],
args: [
_i1.InputValueDefinitionNode(
name: _i1.NameNode(value: 'input'),
directives: [],
type: _i1.NamedTypeNode(
name: _i1.NameNode(value: 'SearchPlacesInput'),
isNonNull: true,
),
defaultValue: null,
),
],
type: _i1.NamedTypeNode(
name: _i1.NameNode(value: 'SearchPlacesPayload'),
isNonNull: true,
),
),
_i1.FieldDefinitionNode(
name: _i1.NameNode(value: 'voiceExperiences'),
directives: [],
@@ -712,6 +963,44 @@ const Mutation = _i1.ObjectTypeDefinitionNode(
isNonNull: true,
),
),
_i1.FieldDefinitionNode(
name: _i1.NameNode(value: 'addFavoritePlace'),
directives: [],
args: [
_i1.InputValueDefinitionNode(
name: _i1.NameNode(value: 'placeId'),
directives: [],
type: _i1.NamedTypeNode(
name: _i1.NameNode(value: 'ID'),
isNonNull: true,
),
defaultValue: null,
),
],
type: _i1.NamedTypeNode(
name: _i1.NameNode(value: 'Place'),
isNonNull: true,
),
),
_i1.FieldDefinitionNode(
name: _i1.NameNode(value: 'removeFavoritePlace'),
directives: [],
args: [
_i1.InputValueDefinitionNode(
name: _i1.NameNode(value: 'placeId'),
directives: [],
type: _i1.NamedTypeNode(
name: _i1.NameNode(value: 'ID'),
isNonNull: true,
),
defaultValue: null,
),
],
type: _i1.NamedTypeNode(
name: _i1.NameNode(value: 'Place'),
isNonNull: true,
),
),
],
);
const document = _i1.DocumentNode(
@@ -723,11 +1012,13 @@ const document = _i1.DocumentNode(
VoiceExperience,
CreateVoiceExperienceInput,
NearbyPlacesInput,
SearchPlacesInput,
AuthenticateTelegramInput,
AuthenticateTelegramLoginInput,
AuthPayload,
TelegramBotLoginPayload,
TelegramBotLoginSession,
SearchPlacesPayload,
Query,
Mutation,
],
@@ -4,9 +4,10 @@
// 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 _i1;
import 'package:built_value/serializer.dart';
import 'package:mapflow/features/mapflow/data/graphql/__generated__/serializers.gql.dart'
as _i1;
as _i2;
part 'schema.schema.gql.g.dart';
@@ -53,21 +54,26 @@ abstract class GCreateVoiceExperienceInput
String get googleName;
double get latitude;
double get longitude;
String? get googlePrimaryType;
BuiltList<String>? get googleTypes;
int get durationSeconds;
String get audioObjectKey;
String get audioContentBase64;
String get audioMimeType;
bool? get addToFavorites;
_i1.JsonObject? get recordingPayload;
BuiltList<String>? get promptHintsShown;
static Serializer<GCreateVoiceExperienceInput> get serializer =>
_$gCreateVoiceExperienceInputSerializer;
Map<String, dynamic> toJson() =>
(_i1.serializers.serializeWith(
(_i2.serializers.serializeWith(
GCreateVoiceExperienceInput.serializer,
this,
)
as Map<String, dynamic>);
static GCreateVoiceExperienceInput? fromJson(Map<String, dynamic> json) => _i1
static GCreateVoiceExperienceInput? fromJson(Map<String, dynamic> json) => _i2
.serializers
.deserializeWith(GCreateVoiceExperienceInput.serializer, json);
}
@@ -87,11 +93,31 @@ abstract class GNearbyPlacesInput
_$gNearbyPlacesInputSerializer;
Map<String, dynamic> toJson() =>
(_i1.serializers.serializeWith(GNearbyPlacesInput.serializer, this)
(_i2.serializers.serializeWith(GNearbyPlacesInput.serializer, this)
as Map<String, dynamic>);
static GNearbyPlacesInput? fromJson(Map<String, dynamic> json) =>
_i1.serializers.deserializeWith(GNearbyPlacesInput.serializer, json);
_i2.serializers.deserializeWith(GNearbyPlacesInput.serializer, json);
}
abstract class GSearchPlacesInput
implements Built<GSearchPlacesInput, GSearchPlacesInputBuilder> {
GSearchPlacesInput._();
factory GSearchPlacesInput([
void Function(GSearchPlacesInputBuilder b) updates,
]) = _$GSearchPlacesInput;
String get query;
static Serializer<GSearchPlacesInput> get serializer =>
_$gSearchPlacesInputSerializer;
Map<String, dynamic> toJson() =>
(_i2.serializers.serializeWith(GSearchPlacesInput.serializer, this)
as Map<String, dynamic>);
static GSearchPlacesInput? fromJson(Map<String, dynamic> json) =>
_i2.serializers.deserializeWith(GSearchPlacesInput.serializer, json);
}
abstract class GAuthenticateTelegramInput
@@ -108,13 +134,13 @@ abstract class GAuthenticateTelegramInput
_$gAuthenticateTelegramInputSerializer;
Map<String, dynamic> toJson() =>
(_i1.serializers.serializeWith(
(_i2.serializers.serializeWith(
GAuthenticateTelegramInput.serializer,
this,
)
as Map<String, dynamic>);
static GAuthenticateTelegramInput? fromJson(Map<String, dynamic> json) => _i1
static GAuthenticateTelegramInput? fromJson(Map<String, dynamic> json) => _i2
.serializers
.deserializeWith(GAuthenticateTelegramInput.serializer, json);
}
@@ -142,14 +168,14 @@ abstract class GAuthenticateTelegramLoginInput
_$gAuthenticateTelegramLoginInputSerializer;
Map<String, dynamic> toJson() =>
(_i1.serializers.serializeWith(
(_i2.serializers.serializeWith(
GAuthenticateTelegramLoginInput.serializer,
this,
)
as Map<String, dynamic>);
static GAuthenticateTelegramLoginInput? fromJson(Map<String, dynamic> json) =>
_i1.serializers.deserializeWith(
_i2.serializers.deserializeWith(
GAuthenticateTelegramLoginInput.serializer,
json,
);
@@ -55,6 +55,8 @@ _$gCreateVoiceExperienceInputSerializer =
_$GCreateVoiceExperienceInputSerializer();
Serializer<GNearbyPlacesInput> _$gNearbyPlacesInputSerializer =
_$GNearbyPlacesInputSerializer();
Serializer<GSearchPlacesInput> _$gSearchPlacesInputSerializer =
_$GSearchPlacesInputSerializer();
Serializer<GAuthenticateTelegramInput> _$gAuthenticateTelegramInputSerializer =
_$GAuthenticateTelegramInputSerializer();
Serializer<GAuthenticateTelegramLoginInput>
@@ -141,7 +143,60 @@ class _$GCreateVoiceExperienceInputSerializer
specifiedType: const FullType(String),
),
];
Object? value;
value = object.googlePrimaryType;
if (value != null) {
result
..add('googlePrimaryType')
..add(
serializers.serialize(value, specifiedType: const FullType(String)),
);
}
value = object.googleTypes;
if (value != null) {
result
..add('googleTypes')
..add(
serializers.serialize(
value,
specifiedType: const FullType(BuiltList, const [
const FullType(String),
]),
),
);
}
value = object.addToFavorites;
if (value != null) {
result
..add('addToFavorites')
..add(
serializers.serialize(value, specifiedType: const FullType(bool)),
);
}
value = object.recordingPayload;
if (value != null) {
result
..add('recordingPayload')
..add(
serializers.serialize(
value,
specifiedType: const FullType(_i1.JsonObject),
),
);
}
value = object.promptHintsShown;
if (value != null) {
result
..add('promptHintsShown')
..add(
serializers.serialize(
value,
specifiedType: const FullType(BuiltList, const [
const FullType(String),
]),
),
);
}
return result;
}
@@ -191,6 +246,25 @@ class _$GCreateVoiceExperienceInputSerializer
)!
as double;
break;
case 'googlePrimaryType':
result.googlePrimaryType =
serializers.deserialize(
value,
specifiedType: const FullType(String),
)
as String?;
break;
case 'googleTypes':
result.googleTypes.replace(
serializers.deserialize(
value,
specifiedType: const FullType(BuiltList, const [
const FullType(String),
]),
)!
as BuiltList<Object?>,
);
break;
case 'durationSeconds':
result.durationSeconds =
serializers.deserialize(
@@ -223,6 +297,33 @@ class _$GCreateVoiceExperienceInputSerializer
)!
as String;
break;
case 'addToFavorites':
result.addToFavorites =
serializers.deserialize(
value,
specifiedType: const FullType(bool),
)
as bool?;
break;
case 'recordingPayload':
result.recordingPayload =
serializers.deserialize(
value,
specifiedType: const FullType(_i1.JsonObject),
)
as _i1.JsonObject?;
break;
case 'promptHintsShown':
result.promptHintsShown.replace(
serializers.deserialize(
value,
specifiedType: const FullType(BuiltList, const [
const FullType(String),
]),
)!
as BuiltList<Object?>,
);
break;
}
}
@@ -309,6 +410,59 @@ class _$GNearbyPlacesInputSerializer
}
}
class _$GSearchPlacesInputSerializer
implements StructuredSerializer<GSearchPlacesInput> {
@override
final Iterable<Type> types = const [GSearchPlacesInput, _$GSearchPlacesInput];
@override
final String wireName = 'GSearchPlacesInput';
@override
Iterable<Object?> serialize(
Serializers serializers,
GSearchPlacesInput object, {
FullType specifiedType = FullType.unspecified,
}) {
final result = <Object?>[
'query',
serializers.serialize(
object.query,
specifiedType: const FullType(String),
),
];
return result;
}
@override
GSearchPlacesInput deserialize(
Serializers serializers,
Iterable<Object?> serialized, {
FullType specifiedType = FullType.unspecified,
}) {
final result = GSearchPlacesInputBuilder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current! as String;
iterator.moveNext();
final Object? value = iterator.current;
switch (key) {
case 'query':
result.query =
serializers.deserialize(
value,
specifiedType: const FullType(String),
)!
as String;
break;
}
}
return result.build();
}
}
class _$GAuthenticateTelegramInputSerializer
implements StructuredSerializer<GAuthenticateTelegramInput> {
@override
@@ -515,6 +669,10 @@ class _$GCreateVoiceExperienceInput extends GCreateVoiceExperienceInput {
@override
final double longitude;
@override
final String? googlePrimaryType;
@override
final BuiltList<String>? googleTypes;
@override
final int durationSeconds;
@override
final String audioObjectKey;
@@ -522,6 +680,12 @@ class _$GCreateVoiceExperienceInput extends GCreateVoiceExperienceInput {
final String audioContentBase64;
@override
final String audioMimeType;
@override
final bool? addToFavorites;
@override
final _i1.JsonObject? recordingPayload;
@override
final BuiltList<String>? promptHintsShown;
factory _$GCreateVoiceExperienceInput([
void Function(GCreateVoiceExperienceInputBuilder)? updates,
@@ -532,10 +696,15 @@ class _$GCreateVoiceExperienceInput extends GCreateVoiceExperienceInput {
required this.googleName,
required this.latitude,
required this.longitude,
this.googlePrimaryType,
this.googleTypes,
required this.durationSeconds,
required this.audioObjectKey,
required this.audioContentBase64,
required this.audioMimeType,
this.addToFavorites,
this.recordingPayload,
this.promptHintsShown,
}) : super._();
@override
GCreateVoiceExperienceInput rebuild(
@@ -554,10 +723,15 @@ class _$GCreateVoiceExperienceInput extends GCreateVoiceExperienceInput {
googleName == other.googleName &&
latitude == other.latitude &&
longitude == other.longitude &&
googlePrimaryType == other.googlePrimaryType &&
googleTypes == other.googleTypes &&
durationSeconds == other.durationSeconds &&
audioObjectKey == other.audioObjectKey &&
audioContentBase64 == other.audioContentBase64 &&
audioMimeType == other.audioMimeType;
audioMimeType == other.audioMimeType &&
addToFavorites == other.addToFavorites &&
recordingPayload == other.recordingPayload &&
promptHintsShown == other.promptHintsShown;
}
@override
@@ -567,10 +741,15 @@ class _$GCreateVoiceExperienceInput extends GCreateVoiceExperienceInput {
_$hash = $jc(_$hash, googleName.hashCode);
_$hash = $jc(_$hash, latitude.hashCode);
_$hash = $jc(_$hash, longitude.hashCode);
_$hash = $jc(_$hash, googlePrimaryType.hashCode);
_$hash = $jc(_$hash, googleTypes.hashCode);
_$hash = $jc(_$hash, durationSeconds.hashCode);
_$hash = $jc(_$hash, audioObjectKey.hashCode);
_$hash = $jc(_$hash, audioContentBase64.hashCode);
_$hash = $jc(_$hash, audioMimeType.hashCode);
_$hash = $jc(_$hash, addToFavorites.hashCode);
_$hash = $jc(_$hash, recordingPayload.hashCode);
_$hash = $jc(_$hash, promptHintsShown.hashCode);
_$hash = $jf(_$hash);
return _$hash;
}
@@ -582,10 +761,15 @@ class _$GCreateVoiceExperienceInput extends GCreateVoiceExperienceInput {
..add('googleName', googleName)
..add('latitude', latitude)
..add('longitude', longitude)
..add('googlePrimaryType', googlePrimaryType)
..add('googleTypes', googleTypes)
..add('durationSeconds', durationSeconds)
..add('audioObjectKey', audioObjectKey)
..add('audioContentBase64', audioContentBase64)
..add('audioMimeType', audioMimeType))
..add('audioMimeType', audioMimeType)
..add('addToFavorites', addToFavorites)
..add('recordingPayload', recordingPayload)
..add('promptHintsShown', promptHintsShown))
.toString();
}
}
@@ -615,6 +799,17 @@ class GCreateVoiceExperienceInputBuilder
double? get longitude => _$this._longitude;
set longitude(double? longitude) => _$this._longitude = longitude;
String? _googlePrimaryType;
String? get googlePrimaryType => _$this._googlePrimaryType;
set googlePrimaryType(String? googlePrimaryType) =>
_$this._googlePrimaryType = googlePrimaryType;
ListBuilder<String>? _googleTypes;
ListBuilder<String> get googleTypes =>
_$this._googleTypes ??= ListBuilder<String>();
set googleTypes(ListBuilder<String>? googleTypes) =>
_$this._googleTypes = googleTypes;
int? _durationSeconds;
int? get durationSeconds => _$this._durationSeconds;
set durationSeconds(int? durationSeconds) =>
@@ -635,6 +830,22 @@ class GCreateVoiceExperienceInputBuilder
set audioMimeType(String? audioMimeType) =>
_$this._audioMimeType = audioMimeType;
bool? _addToFavorites;
bool? get addToFavorites => _$this._addToFavorites;
set addToFavorites(bool? addToFavorites) =>
_$this._addToFavorites = addToFavorites;
_i1.JsonObject? _recordingPayload;
_i1.JsonObject? get recordingPayload => _$this._recordingPayload;
set recordingPayload(_i1.JsonObject? recordingPayload) =>
_$this._recordingPayload = recordingPayload;
ListBuilder<String>? _promptHintsShown;
ListBuilder<String> get promptHintsShown =>
_$this._promptHintsShown ??= ListBuilder<String>();
set promptHintsShown(ListBuilder<String>? promptHintsShown) =>
_$this._promptHintsShown = promptHintsShown;
GCreateVoiceExperienceInputBuilder();
GCreateVoiceExperienceInputBuilder get _$this {
@@ -644,10 +855,15 @@ class GCreateVoiceExperienceInputBuilder
_googleName = $v.googleName;
_latitude = $v.latitude;
_longitude = $v.longitude;
_googlePrimaryType = $v.googlePrimaryType;
_googleTypes = $v.googleTypes?.toBuilder();
_durationSeconds = $v.durationSeconds;
_audioObjectKey = $v.audioObjectKey;
_audioContentBase64 = $v.audioContentBase64;
_audioMimeType = $v.audioMimeType;
_addToFavorites = $v.addToFavorites;
_recordingPayload = $v.recordingPayload;
_promptHintsShown = $v.promptHintsShown?.toBuilder();
_$v = null;
}
return this;
@@ -667,50 +883,74 @@ class GCreateVoiceExperienceInputBuilder
GCreateVoiceExperienceInput build() => _build();
_$GCreateVoiceExperienceInput _build() {
final _$result =
_$v ??
_$GCreateVoiceExperienceInput._(
googlePlaceId: BuiltValueNullFieldError.checkNotNull(
googlePlaceId,
r'GCreateVoiceExperienceInput',
'googlePlaceId',
),
googleName: BuiltValueNullFieldError.checkNotNull(
googleName,
r'GCreateVoiceExperienceInput',
'googleName',
),
latitude: BuiltValueNullFieldError.checkNotNull(
latitude,
r'GCreateVoiceExperienceInput',
'latitude',
),
longitude: BuiltValueNullFieldError.checkNotNull(
longitude,
r'GCreateVoiceExperienceInput',
'longitude',
),
durationSeconds: BuiltValueNullFieldError.checkNotNull(
durationSeconds,
r'GCreateVoiceExperienceInput',
'durationSeconds',
),
audioObjectKey: BuiltValueNullFieldError.checkNotNull(
audioObjectKey,
r'GCreateVoiceExperienceInput',
'audioObjectKey',
),
audioContentBase64: BuiltValueNullFieldError.checkNotNull(
audioContentBase64,
r'GCreateVoiceExperienceInput',
'audioContentBase64',
),
audioMimeType: BuiltValueNullFieldError.checkNotNull(
audioMimeType,
r'GCreateVoiceExperienceInput',
'audioMimeType',
),
_$GCreateVoiceExperienceInput _$result;
try {
_$result =
_$v ??
_$GCreateVoiceExperienceInput._(
googlePlaceId: BuiltValueNullFieldError.checkNotNull(
googlePlaceId,
r'GCreateVoiceExperienceInput',
'googlePlaceId',
),
googleName: BuiltValueNullFieldError.checkNotNull(
googleName,
r'GCreateVoiceExperienceInput',
'googleName',
),
latitude: BuiltValueNullFieldError.checkNotNull(
latitude,
r'GCreateVoiceExperienceInput',
'latitude',
),
longitude: BuiltValueNullFieldError.checkNotNull(
longitude,
r'GCreateVoiceExperienceInput',
'longitude',
),
googlePrimaryType: googlePrimaryType,
googleTypes: _googleTypes?.build(),
durationSeconds: BuiltValueNullFieldError.checkNotNull(
durationSeconds,
r'GCreateVoiceExperienceInput',
'durationSeconds',
),
audioObjectKey: BuiltValueNullFieldError.checkNotNull(
audioObjectKey,
r'GCreateVoiceExperienceInput',
'audioObjectKey',
),
audioContentBase64: BuiltValueNullFieldError.checkNotNull(
audioContentBase64,
r'GCreateVoiceExperienceInput',
'audioContentBase64',
),
audioMimeType: BuiltValueNullFieldError.checkNotNull(
audioMimeType,
r'GCreateVoiceExperienceInput',
'audioMimeType',
),
addToFavorites: addToFavorites,
recordingPayload: recordingPayload,
promptHintsShown: _promptHintsShown?.build(),
);
} catch (_) {
late String _$failedField;
try {
_$failedField = 'googleTypes';
_googleTypes?.build();
_$failedField = 'promptHintsShown';
_promptHintsShown?.build();
} catch (e) {
throw BuiltValueNestedFieldError(
r'GCreateVoiceExperienceInput',
_$failedField,
e.toString(),
);
}
rethrow;
}
replace(_$result);
return _$result;
}
@@ -838,6 +1078,93 @@ class GNearbyPlacesInputBuilder
}
}
class _$GSearchPlacesInput extends GSearchPlacesInput {
@override
final String query;
factory _$GSearchPlacesInput([
void Function(GSearchPlacesInputBuilder)? updates,
]) => (GSearchPlacesInputBuilder()..update(updates))._build();
_$GSearchPlacesInput._({required this.query}) : super._();
@override
GSearchPlacesInput rebuild(
void Function(GSearchPlacesInputBuilder) updates,
) => (toBuilder()..update(updates)).build();
@override
GSearchPlacesInputBuilder toBuilder() =>
GSearchPlacesInputBuilder()..replace(this);
@override
bool operator ==(Object other) {
if (identical(other, this)) return true;
return other is GSearchPlacesInput && query == other.query;
}
@override
int get hashCode {
var _$hash = 0;
_$hash = $jc(_$hash, query.hashCode);
_$hash = $jf(_$hash);
return _$hash;
}
@override
String toString() {
return (newBuiltValueToStringHelper(
r'GSearchPlacesInput',
)..add('query', query)).toString();
}
}
class GSearchPlacesInputBuilder
implements Builder<GSearchPlacesInput, GSearchPlacesInputBuilder> {
_$GSearchPlacesInput? _$v;
String? _query;
String? get query => _$this._query;
set query(String? query) => _$this._query = query;
GSearchPlacesInputBuilder();
GSearchPlacesInputBuilder get _$this {
final $v = _$v;
if ($v != null) {
_query = $v.query;
_$v = null;
}
return this;
}
@override
void replace(GSearchPlacesInput other) {
_$v = other as _$GSearchPlacesInput;
}
@override
void update(void Function(GSearchPlacesInputBuilder)? updates) {
if (updates != null) updates(this);
}
@override
GSearchPlacesInput build() => _build();
_$GSearchPlacesInput _build() {
final _$result =
_$v ??
_$GSearchPlacesInput._(
query: BuiltValueNullFieldError.checkNotNull(
query,
r'GSearchPlacesInput',
'query',
),
);
replace(_$result);
return _$result;
}
}
class _$GAuthenticateTelegramInput extends GAuthenticateTelegramInput {
@override
final String initData;
@@ -0,0 +1,195 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'package:gql/ast.dart' as _i1;
const SearchPlaces = _i1.OperationDefinitionNode(
type: _i1.OperationType.query,
name: _i1.NameNode(value: 'SearchPlaces'),
variableDefinitions: [
_i1.VariableDefinitionNode(
variable: _i1.VariableNode(name: _i1.NameNode(value: 'input')),
type: _i1.NamedTypeNode(
name: _i1.NameNode(value: 'SearchPlacesInput'),
isNonNull: true,
),
defaultValue: _i1.DefaultValueNode(value: null),
directives: [],
),
],
directives: [],
selectionSet: _i1.SelectionSetNode(
selections: [
_i1.FieldNode(
name: _i1.NameNode(value: 'searchPlaces'),
alias: null,
arguments: [
_i1.ArgumentNode(
name: _i1.NameNode(value: 'input'),
value: _i1.VariableNode(name: _i1.NameNode(value: 'input')),
),
],
directives: [],
selectionSet: _i1.SelectionSetNode(
selections: [
_i1.FieldNode(
name: _i1.NameNode(value: 'message'),
alias: null,
arguments: [],
directives: [],
selectionSet: null,
),
_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,
),
],
),
),
],
),
),
],
),
),
],
),
);
const document = _i1.DocumentNode(definitions: [SearchPlaces]);
@@ -0,0 +1,167 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// 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;
part 'search_places.data.gql.g.dart';
abstract class GSearchPlacesData
implements Built<GSearchPlacesData, GSearchPlacesDataBuilder> {
GSearchPlacesData._();
factory GSearchPlacesData([
void Function(GSearchPlacesDataBuilder b) updates,
]) = _$GSearchPlacesData;
static void _initializeBuilder(GSearchPlacesDataBuilder b) =>
b..G__typename = 'Query';
@BuiltValueField(wireName: '__typename')
String get G__typename;
GSearchPlacesData_searchPlaces get searchPlaces;
static Serializer<GSearchPlacesData> get serializer =>
_$gSearchPlacesDataSerializer;
Map<String, dynamic> toJson() =>
(_i1.serializers.serializeWith(GSearchPlacesData.serializer, this)
as Map<String, dynamic>);
static GSearchPlacesData? fromJson(Map<String, dynamic> json) =>
_i1.serializers.deserializeWith(GSearchPlacesData.serializer, json);
}
abstract class GSearchPlacesData_searchPlaces
implements
Built<
GSearchPlacesData_searchPlaces,
GSearchPlacesData_searchPlacesBuilder
> {
GSearchPlacesData_searchPlaces._();
factory GSearchPlacesData_searchPlaces([
void Function(GSearchPlacesData_searchPlacesBuilder b) updates,
]) = _$GSearchPlacesData_searchPlaces;
static void _initializeBuilder(GSearchPlacesData_searchPlacesBuilder b) =>
b..G__typename = 'SearchPlacesPayload';
@BuiltValueField(wireName: '__typename')
String get G__typename;
String get message;
BuiltList<GSearchPlacesData_searchPlaces_places> get places;
static Serializer<GSearchPlacesData_searchPlaces> get serializer =>
_$gSearchPlacesDataSearchPlacesSerializer;
Map<String, dynamic> toJson() =>
(_i1.serializers.serializeWith(
GSearchPlacesData_searchPlaces.serializer,
this,
)
as Map<String, dynamic>);
static GSearchPlacesData_searchPlaces? fromJson(Map<String, dynamic> json) =>
_i1.serializers.deserializeWith(
GSearchPlacesData_searchPlaces.serializer,
json,
);
}
abstract class GSearchPlacesData_searchPlaces_places
implements
Built<
GSearchPlacesData_searchPlaces_places,
GSearchPlacesData_searchPlaces_placesBuilder
> {
GSearchPlacesData_searchPlaces_places._();
factory GSearchPlacesData_searchPlaces_places([
void Function(GSearchPlacesData_searchPlaces_placesBuilder b) updates,
]) = _$GSearchPlacesData_searchPlaces_places;
static void _initializeBuilder(
GSearchPlacesData_searchPlaces_placesBuilder b,
) => b..G__typename = 'Place';
@BuiltValueField(wireName: '__typename')
String get G__typename;
String get id;
String get googlePlaceId;
String get name;
double get latitude;
double get longitude;
String? get googlePrimaryType;
BuiltList<String> get googleTypes;
String? get googleBusinessStatus;
double? get googleRating;
int? get googleUserRatingCount;
_i2.JsonObject? get googleRegularOpeningHours;
_i2.JsonObject? get googleCurrentOpeningHours;
BuiltList<String> get photoUrls;
BuiltList<String> get traits;
bool get isFavorite;
BuiltList<GSearchPlacesData_searchPlaces_places_experiences> get experiences;
static Serializer<GSearchPlacesData_searchPlaces_places> get serializer =>
_$gSearchPlacesDataSearchPlacesPlacesSerializer;
Map<String, dynamic> toJson() =>
(_i1.serializers.serializeWith(
GSearchPlacesData_searchPlaces_places.serializer,
this,
)
as Map<String, dynamic>);
static GSearchPlacesData_searchPlaces_places? fromJson(
Map<String, dynamic> json,
) => _i1.serializers.deserializeWith(
GSearchPlacesData_searchPlaces_places.serializer,
json,
);
}
abstract class GSearchPlacesData_searchPlaces_places_experiences
implements
Built<
GSearchPlacesData_searchPlaces_places_experiences,
GSearchPlacesData_searchPlaces_places_experiencesBuilder
> {
GSearchPlacesData_searchPlaces_places_experiences._();
factory GSearchPlacesData_searchPlaces_places_experiences([
void Function(GSearchPlacesData_searchPlaces_places_experiencesBuilder b)
updates,
]) = _$GSearchPlacesData_searchPlaces_places_experiences;
static void _initializeBuilder(
GSearchPlacesData_searchPlaces_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<GSearchPlacesData_searchPlaces_places_experiences>
get serializer => _$gSearchPlacesDataSearchPlacesPlacesExperiencesSerializer;
Map<String, dynamic> toJson() =>
(_i1.serializers.serializeWith(
GSearchPlacesData_searchPlaces_places_experiences.serializer,
this,
)
as Map<String, dynamic>);
static GSearchPlacesData_searchPlaces_places_experiences? fromJson(
Map<String, dynamic> json,
) => _i1.serializers.deserializeWith(
GSearchPlacesData_searchPlaces_places_experiences.serializer,
json,
);
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,93 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
import 'package:ferry_exec/ferry_exec.dart' as _i1;
import 'package:gql_exec/gql_exec.dart' as _i4;
import 'package:mapflow/features/mapflow/data/graphql/__generated__/search_places.ast.gql.dart'
as _i5;
import 'package:mapflow/features/mapflow/data/graphql/__generated__/search_places.data.gql.dart'
as _i2;
import 'package:mapflow/features/mapflow/data/graphql/__generated__/search_places.var.gql.dart'
as _i3;
import 'package:mapflow/features/mapflow/data/graphql/__generated__/serializers.gql.dart'
as _i6;
part 'search_places.req.gql.g.dart';
abstract class GSearchPlacesReq
implements
Built<GSearchPlacesReq, GSearchPlacesReqBuilder>,
_i1.OperationRequest<_i2.GSearchPlacesData, _i3.GSearchPlacesVars> {
GSearchPlacesReq._();
factory GSearchPlacesReq([void Function(GSearchPlacesReqBuilder b) updates]) =
_$GSearchPlacesReq;
static void _initializeBuilder(GSearchPlacesReqBuilder b) => b
..operation = _i4.Operation(
document: _i5.document,
operationName: 'SearchPlaces',
)
..executeOnListen = true;
@override
_i3.GSearchPlacesVars get vars;
@override
_i4.Operation get operation;
@override
_i4.Request get execRequest => _i4.Request(
operation: operation,
variables: vars.toJson(),
context: context ?? const _i4.Context(),
);
@override
String? get requestId;
@override
@BuiltValueField(serialize: false)
_i2.GSearchPlacesData? Function(
_i2.GSearchPlacesData?,
_i2.GSearchPlacesData?,
)?
get updateResult;
@override
_i2.GSearchPlacesData? get optimisticResponse;
@override
String? get updateCacheHandlerKey;
@override
Map<String, dynamic>? get updateCacheHandlerContext;
@override
_i1.FetchPolicy? get fetchPolicy;
@override
bool get executeOnListen;
@override
@BuiltValueField(serialize: false)
_i4.Context? get context;
@override
_i2.GSearchPlacesData? parseData(Map<String, dynamic> json) =>
_i2.GSearchPlacesData.fromJson(json);
@override
Map<String, dynamic> varsToJson() => vars.toJson();
@override
Map<String, dynamic> dataToJson(_i2.GSearchPlacesData data) => data.toJson();
@override
_i1.OperationRequest<_i2.GSearchPlacesData, _i3.GSearchPlacesVars>
transformOperation(_i4.Operation Function(_i4.Operation) transform) =>
this.rebuild((b) => b..operation = transform(operation));
static Serializer<GSearchPlacesReq> get serializer =>
_$gSearchPlacesReqSerializer;
Map<String, dynamic> toJson() =>
(_i6.serializers.serializeWith(GSearchPlacesReq.serializer, this)
as Map<String, dynamic>);
static GSearchPlacesReq? fromJson(Map<String, dynamic> json) =>
_i6.serializers.deserializeWith(GSearchPlacesReq.serializer, json);
}
@@ -0,0 +1,437 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'search_places.req.gql.dart';
// **************************************************************************
// BuiltValueGenerator
// **************************************************************************
Serializer<GSearchPlacesReq> _$gSearchPlacesReqSerializer =
_$GSearchPlacesReqSerializer();
class _$GSearchPlacesReqSerializer
implements StructuredSerializer<GSearchPlacesReq> {
@override
final Iterable<Type> types = const [GSearchPlacesReq, _$GSearchPlacesReq];
@override
final String wireName = 'GSearchPlacesReq';
@override
Iterable<Object?> serialize(
Serializers serializers,
GSearchPlacesReq object, {
FullType specifiedType = FullType.unspecified,
}) {
final result = <Object?>[
'vars',
serializers.serialize(
object.vars,
specifiedType: const FullType(_i3.GSearchPlacesVars),
),
'operation',
serializers.serialize(
object.operation,
specifiedType: const FullType(_i4.Operation),
),
'executeOnListen',
serializers.serialize(
object.executeOnListen,
specifiedType: const FullType(bool),
),
];
Object? value;
value = object.requestId;
if (value != null) {
result
..add('requestId')
..add(
serializers.serialize(value, specifiedType: const FullType(String)),
);
}
value = object.optimisticResponse;
if (value != null) {
result
..add('optimisticResponse')
..add(
serializers.serialize(
value,
specifiedType: const FullType(_i2.GSearchPlacesData),
),
);
}
value = object.updateCacheHandlerKey;
if (value != null) {
result
..add('updateCacheHandlerKey')
..add(
serializers.serialize(value, specifiedType: const FullType(String)),
);
}
value = object.updateCacheHandlerContext;
if (value != null) {
result
..add('updateCacheHandlerContext')
..add(
serializers.serialize(
value,
specifiedType: const FullType(Map, const [
const FullType(String),
const FullType(dynamic),
]),
),
);
}
value = object.fetchPolicy;
if (value != null) {
result
..add('fetchPolicy')
..add(
serializers.serialize(
value,
specifiedType: const FullType(_i1.FetchPolicy),
),
);
}
return result;
}
@override
GSearchPlacesReq deserialize(
Serializers serializers,
Iterable<Object?> serialized, {
FullType specifiedType = FullType.unspecified,
}) {
final result = GSearchPlacesReqBuilder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current! as String;
iterator.moveNext();
final Object? value = iterator.current;
switch (key) {
case 'vars':
result.vars.replace(
serializers.deserialize(
value,
specifiedType: const FullType(_i3.GSearchPlacesVars),
)!
as _i3.GSearchPlacesVars,
);
break;
case 'operation':
result.operation =
serializers.deserialize(
value,
specifiedType: const FullType(_i4.Operation),
)!
as _i4.Operation;
break;
case 'requestId':
result.requestId =
serializers.deserialize(
value,
specifiedType: const FullType(String),
)
as String?;
break;
case 'optimisticResponse':
result.optimisticResponse.replace(
serializers.deserialize(
value,
specifiedType: const FullType(_i2.GSearchPlacesData),
)!
as _i2.GSearchPlacesData,
);
break;
case 'updateCacheHandlerKey':
result.updateCacheHandlerKey =
serializers.deserialize(
value,
specifiedType: const FullType(String),
)
as String?;
break;
case 'updateCacheHandlerContext':
result.updateCacheHandlerContext =
serializers.deserialize(
value,
specifiedType: const FullType(Map, const [
const FullType(String),
const FullType(dynamic),
]),
)
as Map<String, dynamic>?;
break;
case 'fetchPolicy':
result.fetchPolicy =
serializers.deserialize(
value,
specifiedType: const FullType(_i1.FetchPolicy),
)
as _i1.FetchPolicy?;
break;
case 'executeOnListen':
result.executeOnListen =
serializers.deserialize(
value,
specifiedType: const FullType(bool),
)!
as bool;
break;
}
}
return result.build();
}
}
class _$GSearchPlacesReq extends GSearchPlacesReq {
@override
final _i3.GSearchPlacesVars vars;
@override
final _i4.Operation operation;
@override
final String? requestId;
@override
final _i2.GSearchPlacesData? Function(
_i2.GSearchPlacesData?,
_i2.GSearchPlacesData?,
)?
updateResult;
@override
final _i2.GSearchPlacesData? optimisticResponse;
@override
final String? updateCacheHandlerKey;
@override
final Map<String, dynamic>? updateCacheHandlerContext;
@override
final _i1.FetchPolicy? fetchPolicy;
@override
final bool executeOnListen;
@override
final _i4.Context? context;
factory _$GSearchPlacesReq([
void Function(GSearchPlacesReqBuilder)? updates,
]) => (GSearchPlacesReqBuilder()..update(updates))._build();
_$GSearchPlacesReq._({
required this.vars,
required this.operation,
this.requestId,
this.updateResult,
this.optimisticResponse,
this.updateCacheHandlerKey,
this.updateCacheHandlerContext,
this.fetchPolicy,
required this.executeOnListen,
this.context,
}) : super._();
@override
GSearchPlacesReq rebuild(void Function(GSearchPlacesReqBuilder) updates) =>
(toBuilder()..update(updates)).build();
@override
GSearchPlacesReqBuilder toBuilder() =>
GSearchPlacesReqBuilder()..replace(this);
@override
bool operator ==(Object other) {
if (identical(other, this)) return true;
return other is GSearchPlacesReq &&
vars == other.vars &&
operation == other.operation &&
requestId == other.requestId &&
updateResult == other.updateResult &&
optimisticResponse == other.optimisticResponse &&
updateCacheHandlerKey == other.updateCacheHandlerKey &&
updateCacheHandlerContext == other.updateCacheHandlerContext &&
fetchPolicy == other.fetchPolicy &&
executeOnListen == other.executeOnListen &&
context == other.context;
}
@override
int get hashCode {
var _$hash = 0;
_$hash = $jc(_$hash, vars.hashCode);
_$hash = $jc(_$hash, operation.hashCode);
_$hash = $jc(_$hash, requestId.hashCode);
_$hash = $jc(_$hash, updateResult.hashCode);
_$hash = $jc(_$hash, optimisticResponse.hashCode);
_$hash = $jc(_$hash, updateCacheHandlerKey.hashCode);
_$hash = $jc(_$hash, updateCacheHandlerContext.hashCode);
_$hash = $jc(_$hash, fetchPolicy.hashCode);
_$hash = $jc(_$hash, executeOnListen.hashCode);
_$hash = $jc(_$hash, context.hashCode);
_$hash = $jf(_$hash);
return _$hash;
}
@override
String toString() {
return (newBuiltValueToStringHelper(r'GSearchPlacesReq')
..add('vars', vars)
..add('operation', operation)
..add('requestId', requestId)
..add('updateResult', updateResult)
..add('optimisticResponse', optimisticResponse)
..add('updateCacheHandlerKey', updateCacheHandlerKey)
..add('updateCacheHandlerContext', updateCacheHandlerContext)
..add('fetchPolicy', fetchPolicy)
..add('executeOnListen', executeOnListen)
..add('context', context))
.toString();
}
}
class GSearchPlacesReqBuilder
implements Builder<GSearchPlacesReq, GSearchPlacesReqBuilder> {
_$GSearchPlacesReq? _$v;
_i3.GSearchPlacesVarsBuilder? _vars;
_i3.GSearchPlacesVarsBuilder get vars =>
_$this._vars ??= _i3.GSearchPlacesVarsBuilder();
set vars(_i3.GSearchPlacesVarsBuilder? vars) => _$this._vars = vars;
_i4.Operation? _operation;
_i4.Operation? get operation => _$this._operation;
set operation(_i4.Operation? operation) => _$this._operation = operation;
String? _requestId;
String? get requestId => _$this._requestId;
set requestId(String? requestId) => _$this._requestId = requestId;
_i2.GSearchPlacesData? Function(
_i2.GSearchPlacesData?,
_i2.GSearchPlacesData?,
)?
_updateResult;
_i2.GSearchPlacesData? Function(
_i2.GSearchPlacesData?,
_i2.GSearchPlacesData?,
)?
get updateResult => _$this._updateResult;
set updateResult(
_i2.GSearchPlacesData? Function(
_i2.GSearchPlacesData?,
_i2.GSearchPlacesData?,
)?
updateResult,
) => _$this._updateResult = updateResult;
_i2.GSearchPlacesDataBuilder? _optimisticResponse;
_i2.GSearchPlacesDataBuilder get optimisticResponse =>
_$this._optimisticResponse ??= _i2.GSearchPlacesDataBuilder();
set optimisticResponse(_i2.GSearchPlacesDataBuilder? optimisticResponse) =>
_$this._optimisticResponse = optimisticResponse;
String? _updateCacheHandlerKey;
String? get updateCacheHandlerKey => _$this._updateCacheHandlerKey;
set updateCacheHandlerKey(String? updateCacheHandlerKey) =>
_$this._updateCacheHandlerKey = updateCacheHandlerKey;
Map<String, dynamic>? _updateCacheHandlerContext;
Map<String, dynamic>? get updateCacheHandlerContext =>
_$this._updateCacheHandlerContext;
set updateCacheHandlerContext(
Map<String, dynamic>? updateCacheHandlerContext,
) => _$this._updateCacheHandlerContext = updateCacheHandlerContext;
_i1.FetchPolicy? _fetchPolicy;
_i1.FetchPolicy? get fetchPolicy => _$this._fetchPolicy;
set fetchPolicy(_i1.FetchPolicy? fetchPolicy) =>
_$this._fetchPolicy = fetchPolicy;
bool? _executeOnListen;
bool? get executeOnListen => _$this._executeOnListen;
set executeOnListen(bool? executeOnListen) =>
_$this._executeOnListen = executeOnListen;
_i4.Context? _context;
_i4.Context? get context => _$this._context;
set context(_i4.Context? context) => _$this._context = context;
GSearchPlacesReqBuilder() {
GSearchPlacesReq._initializeBuilder(this);
}
GSearchPlacesReqBuilder get _$this {
final $v = _$v;
if ($v != null) {
_vars = $v.vars.toBuilder();
_operation = $v.operation;
_requestId = $v.requestId;
_updateResult = $v.updateResult;
_optimisticResponse = $v.optimisticResponse?.toBuilder();
_updateCacheHandlerKey = $v.updateCacheHandlerKey;
_updateCacheHandlerContext = $v.updateCacheHandlerContext;
_fetchPolicy = $v.fetchPolicy;
_executeOnListen = $v.executeOnListen;
_context = $v.context;
_$v = null;
}
return this;
}
@override
void replace(GSearchPlacesReq other) {
_$v = other as _$GSearchPlacesReq;
}
@override
void update(void Function(GSearchPlacesReqBuilder)? updates) {
if (updates != null) updates(this);
}
@override
GSearchPlacesReq build() => _build();
_$GSearchPlacesReq _build() {
_$GSearchPlacesReq _$result;
try {
_$result =
_$v ??
_$GSearchPlacesReq._(
vars: vars.build(),
operation: BuiltValueNullFieldError.checkNotNull(
operation,
r'GSearchPlacesReq',
'operation',
),
requestId: requestId,
updateResult: updateResult,
optimisticResponse: _optimisticResponse?.build(),
updateCacheHandlerKey: updateCacheHandlerKey,
updateCacheHandlerContext: updateCacheHandlerContext,
fetchPolicy: fetchPolicy,
executeOnListen: BuiltValueNullFieldError.checkNotNull(
executeOnListen,
r'GSearchPlacesReq',
'executeOnListen',
),
context: context,
);
} catch (_) {
late String _$failedField;
try {
_$failedField = 'vars';
vars.build();
_$failedField = 'optimisticResponse';
_optimisticResponse?.build();
} catch (e) {
throw BuiltValueNestedFieldError(
r'GSearchPlacesReq',
_$failedField,
e.toString(),
);
}
rethrow;
}
replace(_$result);
return _$result;
}
}
// ignore_for_file: deprecated_member_use_from_same_package,type=lint
@@ -0,0 +1,32 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
import 'package:mapflow/features/mapflow/data/graphql/__generated__/schema.schema.gql.dart'
as _i1;
import 'package:mapflow/features/mapflow/data/graphql/__generated__/serializers.gql.dart'
as _i2;
part 'search_places.var.gql.g.dart';
abstract class GSearchPlacesVars
implements Built<GSearchPlacesVars, GSearchPlacesVarsBuilder> {
GSearchPlacesVars._();
factory GSearchPlacesVars([
void Function(GSearchPlacesVarsBuilder b) updates,
]) = _$GSearchPlacesVars;
_i1.GSearchPlacesInput get input;
static Serializer<GSearchPlacesVars> get serializer =>
_$gSearchPlacesVarsSerializer;
Map<String, dynamic> toJson() =>
(_i2.serializers.serializeWith(GSearchPlacesVars.serializer, this)
as Map<String, dynamic>);
static GSearchPlacesVars? fromJson(Map<String, dynamic> json) =>
_i2.serializers.deserializeWith(GSearchPlacesVars.serializer, json);
}
@@ -0,0 +1,161 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'search_places.var.gql.dart';
// **************************************************************************
// BuiltValueGenerator
// **************************************************************************
Serializer<GSearchPlacesVars> _$gSearchPlacesVarsSerializer =
_$GSearchPlacesVarsSerializer();
class _$GSearchPlacesVarsSerializer
implements StructuredSerializer<GSearchPlacesVars> {
@override
final Iterable<Type> types = const [GSearchPlacesVars, _$GSearchPlacesVars];
@override
final String wireName = 'GSearchPlacesVars';
@override
Iterable<Object?> serialize(
Serializers serializers,
GSearchPlacesVars object, {
FullType specifiedType = FullType.unspecified,
}) {
final result = <Object?>[
'input',
serializers.serialize(
object.input,
specifiedType: const FullType(_i1.GSearchPlacesInput),
),
];
return result;
}
@override
GSearchPlacesVars deserialize(
Serializers serializers,
Iterable<Object?> serialized, {
FullType specifiedType = FullType.unspecified,
}) {
final result = GSearchPlacesVarsBuilder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current! as String;
iterator.moveNext();
final Object? value = iterator.current;
switch (key) {
case 'input':
result.input.replace(
serializers.deserialize(
value,
specifiedType: const FullType(_i1.GSearchPlacesInput),
)!
as _i1.GSearchPlacesInput,
);
break;
}
}
return result.build();
}
}
class _$GSearchPlacesVars extends GSearchPlacesVars {
@override
final _i1.GSearchPlacesInput input;
factory _$GSearchPlacesVars([
void Function(GSearchPlacesVarsBuilder)? updates,
]) => (GSearchPlacesVarsBuilder()..update(updates))._build();
_$GSearchPlacesVars._({required this.input}) : super._();
@override
GSearchPlacesVars rebuild(void Function(GSearchPlacesVarsBuilder) updates) =>
(toBuilder()..update(updates)).build();
@override
GSearchPlacesVarsBuilder toBuilder() =>
GSearchPlacesVarsBuilder()..replace(this);
@override
bool operator ==(Object other) {
if (identical(other, this)) return true;
return other is GSearchPlacesVars && input == other.input;
}
@override
int get hashCode {
var _$hash = 0;
_$hash = $jc(_$hash, input.hashCode);
_$hash = $jf(_$hash);
return _$hash;
}
@override
String toString() {
return (newBuiltValueToStringHelper(
r'GSearchPlacesVars',
)..add('input', input)).toString();
}
}
class GSearchPlacesVarsBuilder
implements Builder<GSearchPlacesVars, GSearchPlacesVarsBuilder> {
_$GSearchPlacesVars? _$v;
_i1.GSearchPlacesInputBuilder? _input;
_i1.GSearchPlacesInputBuilder get input =>
_$this._input ??= _i1.GSearchPlacesInputBuilder();
set input(_i1.GSearchPlacesInputBuilder? input) => _$this._input = input;
GSearchPlacesVarsBuilder();
GSearchPlacesVarsBuilder get _$this {
final $v = _$v;
if ($v != null) {
_input = $v.input.toBuilder();
_$v = null;
}
return this;
}
@override
void replace(GSearchPlacesVars other) {
_$v = other as _$GSearchPlacesVars;
}
@override
void update(void Function(GSearchPlacesVarsBuilder)? updates) {
if (updates != null) updates(this);
}
@override
GSearchPlacesVars build() => _build();
_$GSearchPlacesVars _build() {
_$GSearchPlacesVars _$result;
try {
_$result = _$v ?? _$GSearchPlacesVars._(input: input.build());
} catch (_) {
late String _$failedField;
try {
_$failedField = 'input';
input.build();
} catch (e) {
throw BuiltValueNestedFieldError(
r'GSearchPlacesVars',
_$failedField,
e.toString(),
);
}
rethrow;
}
replace(_$result);
return _$result;
}
}
// ignore_for_file: deprecated_member_use_from_same_package,type=lint
@@ -8,6 +8,15 @@ import 'package:built_value/standard_json_plugin.dart' show StandardJsonPlugin;
import 'package:ferry_exec/ferry_exec.dart';
import 'package:gql_code_builder_serializers/gql_code_builder_serializers.dart'
show OperationSerializer;
import 'package:mapflow/features/mapflow/data/graphql/__generated__/add_favorite_place.data.gql.dart'
show
GAddFavoritePlaceData,
GAddFavoritePlaceData_addFavoritePlace,
GAddFavoritePlaceData_addFavoritePlace_experiences;
import 'package:mapflow/features/mapflow/data/graphql/__generated__/add_favorite_place.req.gql.dart'
show GAddFavoritePlaceReq;
import 'package:mapflow/features/mapflow/data/graphql/__generated__/add_favorite_place.var.gql.dart'
show GAddFavoritePlaceVars;
import 'package:mapflow/features/mapflow/data/graphql/__generated__/authenticate_telegram.data.gql.dart'
show
GAuthenticateTelegramData,
@@ -43,6 +52,15 @@ import 'package:mapflow/features/mapflow/data/graphql/__generated__/create_voice
show GCreateVoiceExperienceReq;
import 'package:mapflow/features/mapflow/data/graphql/__generated__/create_voice_experience.var.gql.dart'
show GCreateVoiceExperienceVars;
import 'package:mapflow/features/mapflow/data/graphql/__generated__/favorite_places.data.gql.dart'
show
GFavoritePlacesData,
GFavoritePlacesData_favoritePlaces,
GFavoritePlacesData_favoritePlaces_experiences;
import 'package:mapflow/features/mapflow/data/graphql/__generated__/favorite_places.req.gql.dart'
show GFavoritePlacesReq;
import 'package:mapflow/features/mapflow/data/graphql/__generated__/favorite_places.var.gql.dart'
show GFavoritePlacesVars;
import 'package:mapflow/features/mapflow/data/graphql/__generated__/me.data.gql.dart'
show GMeData, GMeData_me;
import 'package:mapflow/features/mapflow/data/graphql/__generated__/me.req.gql.dart'
@@ -64,13 +82,33 @@ import 'package:mapflow/features/mapflow/data/graphql/__generated__/places.req.g
show GPlacesReq;
import 'package:mapflow/features/mapflow/data/graphql/__generated__/places.var.gql.dart'
show GPlacesVars;
import 'package:mapflow/features/mapflow/data/graphql/__generated__/remove_favorite_place.data.gql.dart'
show
GRemoveFavoritePlaceData,
GRemoveFavoritePlaceData_removeFavoritePlace,
GRemoveFavoritePlaceData_removeFavoritePlace_experiences;
import 'package:mapflow/features/mapflow/data/graphql/__generated__/remove_favorite_place.req.gql.dart'
show GRemoveFavoritePlaceReq;
import 'package:mapflow/features/mapflow/data/graphql/__generated__/remove_favorite_place.var.gql.dart'
show GRemoveFavoritePlaceVars;
import 'package:mapflow/features/mapflow/data/graphql/__generated__/schema.schema.gql.dart'
show
GAuthenticateTelegramInput,
GAuthenticateTelegramLoginInput,
GCreateVoiceExperienceInput,
GNearbyPlacesInput,
GSearchPlacesInput,
GVoiceExperienceStatus;
import 'package:mapflow/features/mapflow/data/graphql/__generated__/search_places.data.gql.dart'
show
GSearchPlacesData,
GSearchPlacesData_searchPlaces,
GSearchPlacesData_searchPlaces_places,
GSearchPlacesData_searchPlaces_places_experiences;
import 'package:mapflow/features/mapflow/data/graphql/__generated__/search_places.req.gql.dart'
show GSearchPlacesReq;
import 'package:mapflow/features/mapflow/data/graphql/__generated__/search_places.var.gql.dart'
show GSearchPlacesVars;
import 'package:mapflow/features/mapflow/data/graphql/__generated__/start_telegram_bot_login.data.gql.dart'
show
GStartTelegramBotLoginData,
@@ -96,6 +134,11 @@ final SerializersBuilder _serializersBuilder = _$serializers.toBuilder()
..add(OperationSerializer())
..addPlugin(StandardJsonPlugin());
@SerializersFor([
GAddFavoritePlaceData,
GAddFavoritePlaceData_addFavoritePlace,
GAddFavoritePlaceData_addFavoritePlace_experiences,
GAddFavoritePlaceReq,
GAddFavoritePlaceVars,
GAuthenticateTelegramData,
GAuthenticateTelegramData_authenticateTelegram,
GAuthenticateTelegramData_authenticateTelegram_user,
@@ -118,6 +161,11 @@ final SerializersBuilder _serializersBuilder = _$serializers.toBuilder()
GCreateVoiceExperienceInput,
GCreateVoiceExperienceReq,
GCreateVoiceExperienceVars,
GFavoritePlacesData,
GFavoritePlacesData_favoritePlaces,
GFavoritePlacesData_favoritePlaces_experiences,
GFavoritePlacesReq,
GFavoritePlacesVars,
GMeData,
GMeData_me,
GMeReq,
@@ -133,6 +181,18 @@ final SerializersBuilder _serializersBuilder = _$serializers.toBuilder()
GPlacesData_places_experiences,
GPlacesReq,
GPlacesVars,
GRemoveFavoritePlaceData,
GRemoveFavoritePlaceData_removeFavoritePlace,
GRemoveFavoritePlaceData_removeFavoritePlace_experiences,
GRemoveFavoritePlaceReq,
GRemoveFavoritePlaceVars,
GSearchPlacesData,
GSearchPlacesData_searchPlaces,
GSearchPlacesData_searchPlaces_places,
GSearchPlacesData_searchPlaces_places_experiences,
GSearchPlacesInput,
GSearchPlacesReq,
GSearchPlacesVars,
GStartTelegramBotLoginData,
GStartTelegramBotLoginData_startTelegramBotLogin,
GStartTelegramBotLoginReq,
@@ -9,6 +9,11 @@ part of 'serializers.gql.dart';
Serializers _$serializers =
(Serializers().toBuilder()
..add(FetchPolicy.serializer)
..add(GAddFavoritePlaceData.serializer)
..add(GAddFavoritePlaceData_addFavoritePlace.serializer)
..add(GAddFavoritePlaceData_addFavoritePlace_experiences.serializer)
..add(GAddFavoritePlaceReq.serializer)
..add(GAddFavoritePlaceVars.serializer)
..add(GAuthenticateTelegramData.serializer)
..add(GAuthenticateTelegramData_authenticateTelegram.serializer)
..add(GAuthenticateTelegramData_authenticateTelegram_user.serializer)
@@ -41,6 +46,11 @@ Serializers _$serializers =
..add(GCreateVoiceExperienceInput.serializer)
..add(GCreateVoiceExperienceReq.serializer)
..add(GCreateVoiceExperienceVars.serializer)
..add(GFavoritePlacesData.serializer)
..add(GFavoritePlacesData_favoritePlaces.serializer)
..add(GFavoritePlacesData_favoritePlaces_experiences.serializer)
..add(GFavoritePlacesReq.serializer)
..add(GFavoritePlacesVars.serializer)
..add(GMeData.serializer)
..add(GMeData_me.serializer)
..add(GMeReq.serializer)
@@ -56,6 +66,20 @@ Serializers _$serializers =
..add(GPlacesData_places_experiences.serializer)
..add(GPlacesReq.serializer)
..add(GPlacesVars.serializer)
..add(GRemoveFavoritePlaceData.serializer)
..add(GRemoveFavoritePlaceData_removeFavoritePlace.serializer)
..add(
GRemoveFavoritePlaceData_removeFavoritePlace_experiences.serializer,
)
..add(GRemoveFavoritePlaceReq.serializer)
..add(GRemoveFavoritePlaceVars.serializer)
..add(GSearchPlacesData.serializer)
..add(GSearchPlacesData_searchPlaces.serializer)
..add(GSearchPlacesData_searchPlaces_places.serializer)
..add(GSearchPlacesData_searchPlaces_places_experiences.serializer)
..add(GSearchPlacesInput.serializer)
..add(GSearchPlacesReq.serializer)
..add(GSearchPlacesVars.serializer)
..add(GStartTelegramBotLoginData.serializer)
..add(GStartTelegramBotLoginData_startTelegramBotLogin.serializer)
..add(GStartTelegramBotLoginReq.serializer)
@@ -67,6 +91,12 @@ Serializers _$serializers =
..add(GVoiceExperiencesData_voiceExperiences_user.serializer)
..add(GVoiceExperiencesReq.serializer)
..add(GVoiceExperiencesVars.serializer)
..addBuilderFactory(
const FullType(BuiltList, const [
const FullType(GFavoritePlacesData_favoritePlaces),
]),
() => ListBuilder<GFavoritePlacesData_favoritePlaces>(),
)
..addBuilderFactory(
const FullType(BuiltList, const [
const FullType(GNearbyPlacesData_nearbyPlaces),
@@ -79,6 +109,12 @@ Serializers _$serializers =
]),
() => ListBuilder<GPlacesData_places>(),
)
..addBuilderFactory(
const FullType(BuiltList, const [
const FullType(GSearchPlacesData_searchPlaces_places),
]),
() => ListBuilder<GSearchPlacesData_searchPlaces_places>(),
)
..addBuilderFactory(
const FullType(BuiltList, const [
const FullType(GVoiceExperiencesData_voiceExperiences),
@@ -89,6 +125,67 @@ Serializers _$serializers =
const FullType(BuiltList, const [const FullType(String)]),
() => ListBuilder<String>(),
)
..addBuilderFactory(
const FullType(BuiltList, const [const FullType(String)]),
() => ListBuilder<String>(),
)
..addBuilderFactory(
const FullType(BuiltList, const [const FullType(String)]),
() => ListBuilder<String>(),
)
..addBuilderFactory(
const FullType(BuiltList, const [const FullType(String)]),
() => ListBuilder<String>(),
)
..addBuilderFactory(
const FullType(BuiltList, const [const FullType(String)]),
() => ListBuilder<String>(),
)
..addBuilderFactory(
const FullType(BuiltList, const [const FullType(String)]),
() => ListBuilder<String>(),
)
..addBuilderFactory(
const FullType(BuiltList, const [
const FullType(
GAddFavoritePlaceData_addFavoritePlace_experiences,
),
]),
() =>
ListBuilder<
GAddFavoritePlaceData_addFavoritePlace_experiences
>(),
)
..addBuilderFactory(
const FullType(BuiltList, const [const FullType(String)]),
() => ListBuilder<String>(),
)
..addBuilderFactory(
const FullType(BuiltList, const [const FullType(String)]),
() => ListBuilder<String>(),
)
..addBuilderFactory(
const FullType(BuiltList, const [const FullType(String)]),
() => ListBuilder<String>(),
)
..addBuilderFactory(
const FullType(BuiltList, const [
const FullType(GFavoritePlacesData_favoritePlaces_experiences),
]),
() => ListBuilder<GFavoritePlacesData_favoritePlaces_experiences>(),
)
..addBuilderFactory(
const FullType(BuiltList, const [const FullType(String)]),
() => ListBuilder<String>(),
)
..addBuilderFactory(
const FullType(BuiltList, const [const FullType(String)]),
() => ListBuilder<String>(),
)
..addBuilderFactory(
const FullType(BuiltList, const [const FullType(String)]),
() => ListBuilder<String>(),
)
..addBuilderFactory(
const FullType(BuiltList, const [
const FullType(GNearbyPlacesData_nearbyPlaces_experiences),
@@ -99,11 +196,63 @@ Serializers _$serializers =
const FullType(BuiltList, const [const FullType(String)]),
() => ListBuilder<String>(),
)
..addBuilderFactory(
const FullType(BuiltList, const [const FullType(String)]),
() => ListBuilder<String>(),
)
..addBuilderFactory(
const FullType(BuiltList, const [const FullType(String)]),
() => ListBuilder<String>(),
)
..addBuilderFactory(
const FullType(BuiltList, const [
const FullType(GPlacesData_places_experiences),
]),
() => ListBuilder<GPlacesData_places_experiences>(),
)
..addBuilderFactory(
const FullType(BuiltList, const [const FullType(String)]),
() => ListBuilder<String>(),
)
..addBuilderFactory(
const FullType(BuiltList, const [const FullType(String)]),
() => ListBuilder<String>(),
)
..addBuilderFactory(
const FullType(BuiltList, const [const FullType(String)]),
() => ListBuilder<String>(),
)
..addBuilderFactory(
const FullType(BuiltList, const [
const FullType(
GRemoveFavoritePlaceData_removeFavoritePlace_experiences,
),
]),
() =>
ListBuilder<
GRemoveFavoritePlaceData_removeFavoritePlace_experiences
>(),
)
..addBuilderFactory(
const FullType(BuiltList, const [const FullType(String)]),
() => ListBuilder<String>(),
)
..addBuilderFactory(
const FullType(BuiltList, const [const FullType(String)]),
() => ListBuilder<String>(),
)
..addBuilderFactory(
const FullType(BuiltList, const [const FullType(String)]),
() => ListBuilder<String>(),
)
..addBuilderFactory(
const FullType(BuiltList, const [
const FullType(GSearchPlacesData_searchPlaces_places_experiences),
]),
() =>
ListBuilder<
GSearchPlacesData_searchPlaces_places_experiences
>(),
))
.build();
@@ -53,6 +53,20 @@ const VoiceExperiences = _i1.OperationDefinitionNode(
directives: [],
selectionSet: null,
),
_i1.FieldNode(
name: _i1.NameNode(value: 'recordingPayload'),
alias: null,
arguments: [],
directives: [],
selectionSet: null,
),
_i1.FieldNode(
name: _i1.NameNode(value: 'promptHintsShown'),
alias: null,
arguments: [],
directives: [],
selectionSet: null,
),
_i1.FieldNode(
name: _i1.NameNode(value: 'createdAt'),
alias: null,
@@ -61,6 +61,8 @@ abstract class GVoiceExperiencesData_voiceExperiences
int get durationSeconds;
String? get transcript;
_i3.JsonObject? get analysis;
_i3.JsonObject? get recordingPayload;
BuiltList<String> get promptHintsShown;
String get createdAt;
GVoiceExperiencesData_voiceExperiences_place get place;
GVoiceExperiencesData_voiceExperiences_user? get user;
@@ -126,6 +126,13 @@ class _$GVoiceExperiencesData_voiceExperiencesSerializer
object.durationSeconds,
specifiedType: const FullType(int),
),
'promptHintsShown',
serializers.serialize(
object.promptHintsShown,
specifiedType: const FullType(BuiltList, const [
const FullType(String),
]),
),
'createdAt',
serializers.serialize(
object.createdAt,
@@ -159,6 +166,17 @@ class _$GVoiceExperiencesData_voiceExperiencesSerializer
),
);
}
value = object.recordingPayload;
if (value != null) {
result
..add('recordingPayload')
..add(
serializers.serialize(
value,
specifiedType: const FullType(_i3.JsonObject),
),
);
}
value = object.user;
if (value != null) {
result
@@ -237,6 +255,25 @@ class _$GVoiceExperiencesData_voiceExperiencesSerializer
)
as _i3.JsonObject?;
break;
case 'recordingPayload':
result.recordingPayload =
serializers.deserialize(
value,
specifiedType: const FullType(_i3.JsonObject),
)
as _i3.JsonObject?;
break;
case 'promptHintsShown':
result.promptHintsShown.replace(
serializers.deserialize(
value,
specifiedType: const FullType(BuiltList, const [
const FullType(String),
]),
)!
as BuiltList<Object?>,
);
break;
case 'createdAt':
result.createdAt =
serializers.deserialize(
@@ -582,6 +619,10 @@ class _$GVoiceExperiencesData_voiceExperiences
@override
final _i3.JsonObject? analysis;
@override
final _i3.JsonObject? recordingPayload;
@override
final BuiltList<String> promptHintsShown;
@override
final String createdAt;
@override
final GVoiceExperiencesData_voiceExperiences_place place;
@@ -600,6 +641,8 @@ class _$GVoiceExperiencesData_voiceExperiences
required this.durationSeconds,
this.transcript,
this.analysis,
this.recordingPayload,
required this.promptHintsShown,
required this.createdAt,
required this.place,
this.user,
@@ -623,6 +666,8 @@ class _$GVoiceExperiencesData_voiceExperiences
durationSeconds == other.durationSeconds &&
transcript == other.transcript &&
analysis == other.analysis &&
recordingPayload == other.recordingPayload &&
promptHintsShown == other.promptHintsShown &&
createdAt == other.createdAt &&
place == other.place &&
user == other.user;
@@ -637,6 +682,8 @@ class _$GVoiceExperiencesData_voiceExperiences
_$hash = $jc(_$hash, durationSeconds.hashCode);
_$hash = $jc(_$hash, transcript.hashCode);
_$hash = $jc(_$hash, analysis.hashCode);
_$hash = $jc(_$hash, recordingPayload.hashCode);
_$hash = $jc(_$hash, promptHintsShown.hashCode);
_$hash = $jc(_$hash, createdAt.hashCode);
_$hash = $jc(_$hash, place.hashCode);
_$hash = $jc(_$hash, user.hashCode);
@@ -655,6 +702,8 @@ class _$GVoiceExperiencesData_voiceExperiences
..add('durationSeconds', durationSeconds)
..add('transcript', transcript)
..add('analysis', analysis)
..add('recordingPayload', recordingPayload)
..add('promptHintsShown', promptHintsShown)
..add('createdAt', createdAt)
..add('place', place)
..add('user', user))
@@ -695,6 +744,17 @@ class GVoiceExperiencesData_voiceExperiencesBuilder
_i3.JsonObject? get analysis => _$this._analysis;
set analysis(_i3.JsonObject? analysis) => _$this._analysis = analysis;
_i3.JsonObject? _recordingPayload;
_i3.JsonObject? get recordingPayload => _$this._recordingPayload;
set recordingPayload(_i3.JsonObject? recordingPayload) =>
_$this._recordingPayload = recordingPayload;
ListBuilder<String>? _promptHintsShown;
ListBuilder<String> get promptHintsShown =>
_$this._promptHintsShown ??= ListBuilder<String>();
set promptHintsShown(ListBuilder<String>? promptHintsShown) =>
_$this._promptHintsShown = promptHintsShown;
String? _createdAt;
String? get createdAt => _$this._createdAt;
set createdAt(String? createdAt) => _$this._createdAt = createdAt;
@@ -724,6 +784,8 @@ class GVoiceExperiencesData_voiceExperiencesBuilder
_durationSeconds = $v.durationSeconds;
_transcript = $v.transcript;
_analysis = $v.analysis;
_recordingPayload = $v.recordingPayload;
_promptHintsShown = $v.promptHintsShown.toBuilder();
_createdAt = $v.createdAt;
_place = $v.place.toBuilder();
_user = $v.user?.toBuilder();
@@ -775,6 +837,8 @@ class GVoiceExperiencesData_voiceExperiencesBuilder
),
transcript: transcript,
analysis: analysis,
recordingPayload: recordingPayload,
promptHintsShown: promptHintsShown.build(),
createdAt: BuiltValueNullFieldError.checkNotNull(
createdAt,
r'GVoiceExperiencesData_voiceExperiences',
@@ -786,6 +850,9 @@ class GVoiceExperiencesData_voiceExperiencesBuilder
} catch (_) {
late String _$failedField;
try {
_$failedField = 'promptHintsShown';
promptHintsShown.build();
_$failedField = 'place';
place.build();
_$failedField = 'user';
@@ -0,0 +1,24 @@
mutation AddFavoritePlace($placeId: ID!) {
addFavoritePlace(placeId: $placeId) {
id
googlePlaceId
name
latitude
longitude
googlePrimaryType
googleTypes
googleBusinessStatus
googleRating
googleUserRatingCount
googleRegularOpeningHours
googleCurrentOpeningHours
photoUrls
traits
isFavorite
experiences {
id
status
createdAt
}
}
}
@@ -0,0 +1,24 @@
query FavoritePlaces {
favoritePlaces {
id
googlePlaceId
name
latitude
longitude
googlePrimaryType
googleTypes
googleBusinessStatus
googleRating
googleUserRatingCount
googleRegularOpeningHours
googleCurrentOpeningHours
photoUrls
traits
isFavorite
experiences {
id
status
createdAt
}
}
}
@@ -7,10 +7,17 @@ query NearbyPlaces($input: NearbyPlacesInput!) {
longitude
googlePrimaryType
googleTypes
googleBusinessStatus
googleRating
googleUserRatingCount
googleRegularOpeningHours
googleCurrentOpeningHours
photoUrls
traits
isFavorite
experiences {
id
status
analysis
createdAt
}
}
@@ -7,10 +7,17 @@ query Places {
longitude
googlePrimaryType
googleTypes
googleBusinessStatus
googleRating
googleUserRatingCount
googleRegularOpeningHours
googleCurrentOpeningHours
photoUrls
traits
isFavorite
experiences {
id
status
analysis
createdAt
}
}
@@ -0,0 +1,24 @@
mutation RemoveFavoritePlace($placeId: ID!) {
removeFavoritePlace(placeId: $placeId) {
id
googlePlaceId
name
latitude
longitude
googlePrimaryType
googleTypes
googleBusinessStatus
googleRating
googleUserRatingCount
googleRegularOpeningHours
googleCurrentOpeningHours
photoUrls
traits
isFavorite
experiences {
id
status
createdAt
}
}
}
@@ -0,0 +1,27 @@
query SearchPlaces($input: SearchPlacesInput!) {
searchPlaces(input: $input) {
message
places {
id
googlePlaceId
name
latitude
longitude
googlePrimaryType
googleTypes
googleBusinessStatus
googleRating
googleUserRatingCount
googleRegularOpeningHours
googleCurrentOpeningHours
photoUrls
traits
isFavorite
experiences {
id
status
createdAt
}
}
}
}
@@ -5,6 +5,8 @@ query VoiceExperiences {
durationSeconds
transcript
analysis
recordingPayload
promptHintsShown
createdAt
place {
name
@@ -2,12 +2,16 @@ import 'package:built_value/json_object.dart';
import 'package:latlong2/latlong.dart';
import '../domain/place_models.dart';
import 'graphql/__generated__/add_favorite_place.data.gql.dart';
import 'graphql/__generated__/authenticate_telegram.data.gql.dart';
import 'graphql/__generated__/authenticate_telegram_login.data.gql.dart';
import 'graphql/__generated__/complete_telegram_bot_login.data.gql.dart';
import 'graphql/__generated__/favorite_places.data.gql.dart';
import 'graphql/__generated__/me.data.gql.dart';
import 'graphql/__generated__/nearby_places.data.gql.dart';
import 'graphql/__generated__/places.data.gql.dart';
import 'graphql/__generated__/remove_favorite_place.data.gql.dart';
import 'graphql/__generated__/search_places.data.gql.dart';
import 'graphql/__generated__/voice_experiences.data.gql.dart';
AppUser appUserFromMe(GMeData_me user) {
@@ -96,11 +100,17 @@ PlaceRecommendation placeRecommendationFromPlace(GPlacesData_places place) {
googlePlaceId: place.googlePlaceId,
name: place.name,
area: '',
photoUrls: const [],
photoUrls: place.photoUrls.toList().cast<String>(),
coordinate: LatLng(place.latitude, place.longitude),
traits: _traitsFromAnalyses(place.experiences.map((item) => item.analysis)),
traits: _traitsFromTags(place.traits),
googlePrimaryType: place.googlePrimaryType,
googleTypes: place.googleTypes.toList().cast<String>(),
googleBusinessStatus: place.googleBusinessStatus,
googleRating: place.googleRating,
googleUserRatingCount: place.googleUserRatingCount,
googleRegularOpeningHours: _jsonMap(place.googleRegularOpeningHours),
googleCurrentOpeningHours: _jsonMap(place.googleCurrentOpeningHours),
isFavorite: place.isFavorite,
);
}
@@ -112,11 +122,105 @@ PlaceRecommendation placeRecommendationFromNearbyPlace(
googlePlaceId: place.googlePlaceId,
name: place.name,
area: '',
photoUrls: const [],
photoUrls: place.photoUrls.toList().cast<String>(),
coordinate: LatLng(place.latitude, place.longitude),
traits: _traitsFromAnalyses(place.experiences.map((item) => item.analysis)),
traits: _traitsFromTags(place.traits),
googlePrimaryType: place.googlePrimaryType,
googleTypes: place.googleTypes.toList().cast<String>(),
googleBusinessStatus: place.googleBusinessStatus,
googleRating: place.googleRating,
googleUserRatingCount: place.googleUserRatingCount,
googleRegularOpeningHours: _jsonMap(place.googleRegularOpeningHours),
googleCurrentOpeningHours: _jsonMap(place.googleCurrentOpeningHours),
isFavorite: place.isFavorite,
);
}
PlaceRecommendation placeRecommendationFromFavoritePlace(
GFavoritePlacesData_favoritePlaces place,
) {
return PlaceRecommendation(
id: place.id,
googlePlaceId: place.googlePlaceId,
name: place.name,
area: '',
photoUrls: place.photoUrls.toList().cast<String>(),
coordinate: LatLng(place.latitude, place.longitude),
traits: _traitsFromTags(place.traits),
googlePrimaryType: place.googlePrimaryType,
googleTypes: place.googleTypes.toList().cast<String>(),
googleBusinessStatus: place.googleBusinessStatus,
googleRating: place.googleRating,
googleUserRatingCount: place.googleUserRatingCount,
googleRegularOpeningHours: _jsonMap(place.googleRegularOpeningHours),
googleCurrentOpeningHours: _jsonMap(place.googleCurrentOpeningHours),
isFavorite: place.isFavorite,
);
}
PlaceRecommendation placeRecommendationFromSearchPlace(
GSearchPlacesData_searchPlaces_places place,
) {
return PlaceRecommendation(
id: place.id,
googlePlaceId: place.googlePlaceId,
name: place.name,
area: '',
photoUrls: place.photoUrls.toList().cast<String>(),
coordinate: LatLng(place.latitude, place.longitude),
traits: _traitsFromTags(place.traits),
googlePrimaryType: place.googlePrimaryType,
googleTypes: place.googleTypes.toList().cast<String>(),
googleBusinessStatus: place.googleBusinessStatus,
googleRating: place.googleRating,
googleUserRatingCount: place.googleUserRatingCount,
googleRegularOpeningHours: _jsonMap(place.googleRegularOpeningHours),
googleCurrentOpeningHours: _jsonMap(place.googleCurrentOpeningHours),
isFavorite: place.isFavorite,
);
}
PlaceRecommendation placeRecommendationFromAddedFavorite(
GAddFavoritePlaceData_addFavoritePlace place,
) {
return PlaceRecommendation(
id: place.id,
googlePlaceId: place.googlePlaceId,
name: place.name,
area: '',
photoUrls: place.photoUrls.toList().cast<String>(),
coordinate: LatLng(place.latitude, place.longitude),
traits: _traitsFromTags(place.traits),
googlePrimaryType: place.googlePrimaryType,
googleTypes: place.googleTypes.toList().cast<String>(),
googleBusinessStatus: place.googleBusinessStatus,
googleRating: place.googleRating,
googleUserRatingCount: place.googleUserRatingCount,
googleRegularOpeningHours: _jsonMap(place.googleRegularOpeningHours),
googleCurrentOpeningHours: _jsonMap(place.googleCurrentOpeningHours),
isFavorite: place.isFavorite,
);
}
PlaceRecommendation placeRecommendationFromRemovedFavorite(
GRemoveFavoritePlaceData_removeFavoritePlace place,
) {
return PlaceRecommendation(
id: place.id,
googlePlaceId: place.googlePlaceId,
name: place.name,
area: '',
photoUrls: place.photoUrls.toList().cast<String>(),
coordinate: LatLng(place.latitude, place.longitude),
traits: _traitsFromTags(place.traits),
googlePrimaryType: place.googlePrimaryType,
googleTypes: place.googleTypes.toList().cast<String>(),
googleBusinessStatus: place.googleBusinessStatus,
googleRating: place.googleRating,
googleUserRatingCount: place.googleUserRatingCount,
googleRegularOpeningHours: _jsonMap(place.googleRegularOpeningHours),
googleCurrentOpeningHours: _jsonMap(place.googleCurrentOpeningHours),
isFavorite: place.isFavorite,
);
}
@@ -152,24 +256,12 @@ String _userDisplayName(GVoiceExperiencesData_voiceExperiences_user? user) {
return telegramId;
}
Set<PlaceTrait> _traitsFromAnalyses(Iterable<JsonObject?> analyses) {
Set<PlaceTrait> _traitsFromTags(Iterable<String> tags) {
final traits = <PlaceTrait>{};
for (final analysisObject in analyses) {
final analysis = _jsonMap(analysisObject);
if (analysis == null) {
continue;
}
final tags = analysis['tags'];
if (tags is! List) {
continue;
}
for (final tag in tags) {
final trait = _traitByTag(tag.toString());
if (trait != null) {
traits.add(trait);
}
for (final tag in tags) {
final trait = _traitByTag(tag);
if (trait != null) {
traits.add(trait);
}
}
@@ -1,8 +1,12 @@
import 'package:latlong2/latlong.dart';
import '../domain/place_models.dart';
import 'graphql/__generated__/add_favorite_place.req.gql.dart';
import 'graphql/__generated__/favorite_places.req.gql.dart';
import 'graphql/__generated__/nearby_places.req.gql.dart';
import 'graphql/__generated__/places.req.gql.dart';
import 'graphql/__generated__/remove_favorite_place.req.gql.dart';
import 'graphql/__generated__/search_places.req.gql.dart';
import 'mapflow_data_mappers.dart';
import 'mapflow_graphql_client.dart';
@@ -17,6 +21,13 @@ class PlacesRepository {
return data.places.map(placeRecommendationFromPlace).toList();
}
Future<List<PlaceRecommendation>> fetchFavoritePlaces() async {
final data = await _client.request(GFavoritePlacesReq());
return data.favoritePlaces
.map(placeRecommendationFromFavoritePlace)
.toList();
}
Future<List<PlaceRecommendation>> fetchNearbyPlaces({
required LatLng coordinate,
required int radiusMeters,
@@ -31,4 +42,36 @@ class PlacesRepository {
);
return data.nearbyPlaces.map(placeRecommendationFromNearbyPlace).toList();
}
Future<PlaceSearchResult> searchPlaces(String query) async {
final data = await _client.request(
GSearchPlacesReq((b) {
b.vars.input.query = query;
}),
);
return PlaceSearchResult(
message: data.searchPlaces.message,
places: data.searchPlaces.places
.map(placeRecommendationFromSearchPlace)
.toList(),
);
}
Future<PlaceRecommendation> addFavoritePlace(String placeId) async {
final data = await _client.request(
GAddFavoritePlaceReq((b) {
b.vars.placeId = placeId;
}),
);
return placeRecommendationFromAddedFavorite(data.addFavoritePlace);
}
Future<PlaceRecommendation> removeFavoritePlace(String placeId) async {
final data = await _client.request(
GRemoveFavoritePlaceReq((b) {
b.vars.placeId = placeId;
}),
);
return placeRecommendationFromRemovedFavorite(data.removeFavoritePlace);
}
}
@@ -1,3 +1,4 @@
import 'package:built_value/json_object.dart';
import 'package:latlong2/latlong.dart';
import '../domain/place_models.dart';
@@ -16,10 +17,15 @@ class VoiceExperiencesRepository {
required String googlePlaceId,
required String googleName,
required LatLng coordinate,
required String? googlePrimaryType,
required List<String> googleTypes,
required int durationSeconds,
required String audioObjectKey,
required String audioContentBase64,
required String audioMimeType,
required bool addToFavorites,
required Map<String, dynamic> recordingPayload,
required List<String> promptHintsShown,
}) async {
if (!_client.hasTelegramAuth) {
throw StateError('Telegram authorization is required.');
@@ -32,10 +38,15 @@ class VoiceExperiencesRepository {
..googleName = googleName
..latitude = coordinate.latitude
..longitude = coordinate.longitude
..googlePrimaryType = googlePrimaryType
..googleTypes.addAll(googleTypes)
..durationSeconds = durationSeconds
..audioObjectKey = audioObjectKey
..audioContentBase64 = audioContentBase64
..audioMimeType = audioMimeType;
..audioMimeType = audioMimeType
..addToFavorites = addToFavorites
..recordingPayload = JsonObject(recordingPayload)
..promptHintsShown.addAll(promptHintsShown);
}),
);
}
+40 -1
View File
@@ -139,6 +139,12 @@ class PlaceRecommendation {
required this.traits,
required this.googlePrimaryType,
required this.googleTypes,
required this.googleBusinessStatus,
required this.googleRating,
required this.googleUserRatingCount,
required this.googleRegularOpeningHours,
required this.googleCurrentOpeningHours,
required this.isFavorite,
});
final String id;
@@ -150,8 +156,41 @@ class PlaceRecommendation {
final Set<PlaceTrait> traits;
final String? googlePrimaryType;
final List<String> googleTypes;
final String? googleBusinessStatus;
final double? googleRating;
final int? googleUserRatingCount;
final Map<String, dynamic>? googleRegularOpeningHours;
final Map<String, dynamic>? googleCurrentOpeningHours;
final bool isFavorite;
String get coverPhotoUrl => photoUrls.first;
String? get coverPhotoUrl => photoUrls.isEmpty ? null : photoUrls.first;
PlaceRecommendation copyWith({bool? isFavorite}) {
return PlaceRecommendation(
id: id,
googlePlaceId: googlePlaceId,
name: name,
area: area,
photoUrls: photoUrls,
coordinate: coordinate,
traits: traits,
googlePrimaryType: googlePrimaryType,
googleTypes: googleTypes,
googleBusinessStatus: googleBusinessStatus,
googleRating: googleRating,
googleUserRatingCount: googleUserRatingCount,
googleRegularOpeningHours: googleRegularOpeningHours,
googleCurrentOpeningHours: googleCurrentOpeningHours,
isFavorite: isFavorite ?? this.isFavorite,
);
}
}
class PlaceSearchResult {
const PlaceSearchResult({required this.message, required this.places});
final String message;
final List<PlaceRecommendation> places;
}
class VoiceReviewDraft {
@@ -111,6 +111,9 @@ class _MapContent extends StatelessWidget {
alignment: Alignment.topLeft,
child: _UserAvatar(
user: state.currentUser,
onAdminReviews: state.currentUser?.isAdmin == true
? () => context.push('/admin/reviews')
: null,
onLogout: () {
telegram_session.clearMapflowSession();
placeCubit.load();
@@ -119,15 +122,29 @@ class _MapContent extends StatelessWidget {
),
),
),
if (state.currentUser?.isAdmin == true)
SafeArea(
child: Align(
alignment: Alignment.topRight,
child: _AdminReviewsButton(
onPressed: () => context.push('/admin/reviews'),
SafeArea(
child: Align(
alignment: Alignment.topCenter,
child: _MapSearchButton(
query: state.searchQuery,
onSearch: placeCubit.searchPlaces,
onClear: state.searchQuery.isEmpty
? null
: placeCubit.clearSearch,
),
),
),
SafeArea(
child: Align(
alignment: Alignment.topRight,
child: _AddReviewButton(
onPressed: () => _openAddFlow(
context,
userCoordinate ?? selected?.coordinate,
),
),
),
),
Align(
alignment: Alignment.bottomCenter,
child: SafeArea(
@@ -144,26 +161,12 @@ class _MapContent extends StatelessWidget {
_PlaceCarousel(
places: state.recommendations,
onSelect: (place) => placeCubit.selectPlace(place.id),
onFavoriteToggle: placeCubit.toggleFavorite,
),
],
),
),
),
SafeArea(
child: Align(
alignment: Alignment.centerRight,
child: Padding(
padding: const EdgeInsets.only(right: 12),
child: FloatingActionButton(
onPressed: () => _openAddFlow(
context,
userCoordinate ?? selected?.coordinate,
),
child: const Icon(Icons.add_location_alt_outlined),
),
),
),
),
],
),
);
@@ -217,9 +220,14 @@ class _UserLocationMarker extends StatelessWidget {
}
class _UserAvatar extends StatelessWidget {
const _UserAvatar({required this.user, required this.onLogout});
const _UserAvatar({
required this.user,
required this.onAdminReviews,
required this.onLogout,
});
final AppUser? user;
final VoidCallback? onAdminReviews;
final VoidCallback onLogout;
@override
@@ -238,12 +246,26 @@ class _UserAvatar extends StatelessWidget {
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
onSelected: (action) {
switch (action) {
case _AvatarAction.adminReviews:
onAdminReviews?.call();
case _AvatarAction.logout:
onLogout();
}
},
itemBuilder: (_) => const [
PopupMenuItem<_AvatarAction>(
itemBuilder: (_) => [
if (onAdminReviews != null)
const PopupMenuItem<_AvatarAction>(
value: _AvatarAction.adminReviews,
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Icon(Icons.table_rows_outlined, size: 18),
SizedBox(width: 10),
Text('Отзывы'),
],
),
),
const PopupMenuItem<_AvatarAction>(
value: _AvatarAction.logout,
child: Row(
mainAxisSize: MainAxisSize.min,
@@ -287,8 +309,8 @@ class _UserAvatar extends StatelessWidget {
}
}
class _AdminReviewsButton extends StatelessWidget {
const _AdminReviewsButton({required this.onPressed});
class _AddReviewButton extends StatelessWidget {
const _AddReviewButton({required this.onPressed});
final VoidCallback onPressed;
@@ -299,24 +321,115 @@ class _AdminReviewsButton extends StatelessWidget {
return Padding(
padding: const EdgeInsets.only(top: 8, right: 12),
child: FilledButton.icon(
child: IconButton.filled(
onPressed: onPressed,
icon: const Icon(Icons.table_rows_outlined, size: 18),
label: const Text('Отзывы'),
icon: const Icon(Icons.add_location_alt_outlined),
style: FilledButton.styleFrom(
backgroundColor: tokens.mapPanel,
foregroundColor: colorScheme.onSurface,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(tokens.panelRadius),
),
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 12),
),
tooltip: 'Добавить отзыв',
),
);
}
}
enum _AvatarAction { logout }
class _MapSearchButton extends StatelessWidget {
const _MapSearchButton({
required this.query,
required this.onSearch,
required this.onClear,
});
final String query;
final Future<void> Function(String) onSearch;
final Future<void> Function()? onClear;
@override
Widget build(BuildContext context) {
final tokens = context.mapflowTokens;
final label = query.isEmpty ? 'Поиск' : query;
return Padding(
padding: const EdgeInsets.only(top: 8, left: 70, right: 70),
child: Material(
color: tokens.mapPanel,
borderRadius: BorderRadius.circular(tokens.panelRadius),
child: InkWell(
onTap: () => _openSearch(context),
borderRadius: BorderRadius.circular(tokens.panelRadius),
child: SizedBox(
height: 44,
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
const SizedBox(width: 12),
const Icon(Icons.auto_awesome_outlined, size: 18),
const SizedBox(width: 8),
Flexible(
child: Text(
label,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: const TextStyle(fontWeight: FontWeight.w800),
),
),
if (onClear != null) ...[
const SizedBox(width: 2),
IconButton(
onPressed: () => onClear!(),
icon: const Icon(Icons.close, size: 18),
tooltip: 'Сбросить',
),
] else
const SizedBox(width: 12),
],
),
),
),
),
);
}
Future<void> _openSearch(BuildContext context) async {
final controller = TextEditingController(text: query);
final result = await showDialog<String>(
context: context,
builder: (context) {
return AlertDialog(
contentPadding: const EdgeInsets.fromLTRB(18, 18, 18, 8),
content: TextField(
controller: controller,
autofocus: true,
textInputAction: TextInputAction.search,
decoration: const InputDecoration(
prefixIcon: Icon(Icons.auto_awesome_outlined),
hintText: 'Что ищем?',
),
onSubmitted: (value) => Navigator.of(context).pop(value),
),
actions: [
TextButton(
onPressed: () => Navigator.of(context).pop(),
child: const Text('Отмена'),
),
FilledButton(
onPressed: () => Navigator.of(context).pop(controller.text),
child: const Text('Найти'),
),
],
);
},
);
controller.dispose();
if (result == null) {
return;
}
await onSearch(result);
}
}
enum _AvatarAction { adminReviews, logout }
class _AvatarImage extends StatelessWidget {
const _AvatarImage({required this.url, required this.fallback});
@@ -624,10 +737,15 @@ class _PlaceMarker extends StatelessWidget {
}
class _PlaceCarousel extends StatelessWidget {
const _PlaceCarousel({required this.places, required this.onSelect});
const _PlaceCarousel({
required this.places,
required this.onSelect,
required this.onFavoriteToggle,
});
final List<PlaceRecommendation> places;
final ValueChanged<PlaceRecommendation> onSelect;
final ValueChanged<PlaceRecommendation> onFavoriteToggle;
@override
Widget build(BuildContext context) {
@@ -644,7 +762,11 @@ class _PlaceCarousel extends StatelessWidget {
separatorBuilder: (_, _) => const SizedBox(width: 10),
itemBuilder: (context, index) {
final place = places[index];
return PlacePhotoCard(place: place, onTap: () => onSelect(place));
return PlacePhotoCard(
place: place,
onTap: () => onSelect(place),
onFavoriteToggle: () => onFavoriteToggle(place),
);
},
),
);
@@ -668,6 +790,14 @@ class AddExperienceFlow extends StatefulWidget {
class _AddExperienceFlowState extends State<AddExperienceFlow> {
static const _minimumInformationUnits = 16.0;
static const _nearbyPlaceRadiusMeters = 50;
static const _voicePromptHints = [
'атмосфера',
'еда',
'сервис',
'люди',
'шум',
'цены',
];
final _waveController = WaveformRecorderController(
interval: const Duration(milliseconds: 45),
@@ -691,6 +821,7 @@ class _AddExperienceFlowState extends State<AddExperienceFlow> {
var _voicePeakDb = -34.0;
var _liveLevel = 0.0;
DateTime? _lastInformationAt;
PlaceRecommendation? _selectedPlaceForSubmit;
@override
void initState() {
@@ -810,6 +941,7 @@ class _AddExperienceFlowState extends State<AddExperienceFlow> {
0 => _IntroStep(onNext: () => setState(() => _step = 1)),
1 => _VoiceStep(
placeName: '',
promptHints: _voicePromptHints,
hasTelegramAuth: widget.hasTelegramAuth,
informationProgress: informationProgress,
isRecording: _recording,
@@ -833,27 +965,21 @@ class _AddExperienceFlowState extends State<AddExperienceFlow> {
radiusMeters: _nearbyPlaceRadiusMeters,
isSubmitting: _submitting,
onSelect: (place) async {
setState(() => _submitting = true);
controller.setReviewPlace(place.name);
final file = _waveController.file;
if (file == null) {
throw StateError('Voice recording file is required.');
}
final bytes = await file.readAsBytes();
await controller.publishReview(
place: place,
audioObjectKey:
'web-recording-${DateTime.now().microsecondsSinceEpoch}-${file.name}',
audioContentBase64: base64Encode(bytes),
audioMimeType: file.mimeType ?? 'audio/wav',
);
if (!context.mounted) {
return;
}
context.pop();
setState(() {
_selectedPlaceForSubmit = place;
_step = 3;
});
},
),
};
final contentWithFavoriteStep = _step == 3
? _FavoriteStep(
place: _selectedPlaceForSubmit,
isSubmitting: _submitting,
onSubmit: _submitSelectedPlace,
)
: content;
return Scaffold(
backgroundColor: tokens.darkSurface,
@@ -869,7 +995,7 @@ class _AddExperienceFlowState extends State<AddExperienceFlow> {
children: [
_StoryProgress(
step: _step,
total: 3,
total: 4,
dark: true,
onClose: () => context.pop(),
),
@@ -877,7 +1003,10 @@ class _AddExperienceFlowState extends State<AddExperienceFlow> {
Expanded(
child: AnimatedSwitcher(
duration: const Duration(milliseconds: 220),
child: KeyedSubtree(key: ValueKey(_step), child: content),
child: KeyedSubtree(
key: ValueKey(_step),
child: contentWithFavoriteStep,
),
),
),
],
@@ -886,6 +1015,47 @@ class _AddExperienceFlowState extends State<AddExperienceFlow> {
),
);
}
Future<void> _submitSelectedPlace(bool addToFavorites) async {
final place = _selectedPlaceForSubmit;
if (place == null) {
throw StateError('Place is required to publish a review.');
}
setState(() => _submitting = true);
final controller = context.read<PlaceCubit>();
final file = _waveController.file;
if (file == null) {
throw StateError('Voice recording file is required.');
}
final bytes = await file.readAsBytes();
await controller.publishReview(
place: place,
audioObjectKey:
'web-recording-${DateTime.now().microsecondsSinceEpoch}-${file.name}',
audioContentBase64: base64Encode(bytes),
audioMimeType: file.mimeType ?? 'audio/wav',
addToFavorites: addToFavorites,
promptHintsShown: _voicePromptHints,
recordingPayload: {
'source': 'web',
'nearbyPlaceRadiusMeters': _nearbyPlaceRadiusMeters,
'informationUnits': _informationUnits,
'minimumInformationUnits': _minimumInformationUnits,
'selectedPlace': {
'googlePlaceId': place.googlePlaceId,
'name': place.name,
'googlePrimaryType': place.googlePrimaryType,
'googleTypes': place.googleTypes,
'latitude': place.coordinate.latitude,
'longitude': place.coordinate.longitude,
},
},
);
if (!mounted) {
return;
}
context.pop();
}
}
class _IntroStep extends StatelessWidget {
@@ -1020,6 +1190,71 @@ class _PlaceStep extends StatelessWidget {
}
}
class _FavoriteStep extends StatelessWidget {
const _FavoriteStep({
required this.place,
required this.isSubmitting,
required this.onSubmit,
});
final PlaceRecommendation? place;
final bool isSubmitting;
final Future<void> Function(bool) onSubmit;
@override
Widget build(BuildContext context) {
final tokens = context.mapflowTokens;
final selectedPlace = place;
if (selectedPlace == null) {
return const SizedBox.shrink();
}
return _StepLayout(
body: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(Icons.favorite_border, color: tokens.onDark, size: 48),
const SizedBox(height: 18),
Text(
selectedPlace.name,
maxLines: 2,
overflow: TextOverflow.ellipsis,
textAlign: TextAlign.center,
style: Theme.of(context).textTheme.headlineSmall?.copyWith(
color: tokens.onDark,
fontWeight: FontWeight.w900,
letterSpacing: 0,
),
),
const SizedBox(height: 26),
Row(
children: [
Expanded(
child: OutlinedButton(
onPressed: isSubmitting ? null : () => onSubmit(false),
child: const Text('Не сейчас'),
),
),
const SizedBox(width: 10),
Expanded(
child: FilledButton(
onPressed: isSubmitting ? null : () => onSubmit(true),
child: isSubmitting
? const SizedBox.square(
dimension: 18,
child: CircularProgressIndicator(strokeWidth: 2),
)
: const Text('В избранное'),
),
),
],
),
],
),
);
}
}
class _NearbyPlaceCard extends StatelessWidget {
const _NearbyPlaceCard({
required this.place,
@@ -1130,6 +1365,7 @@ class _PlaceTypeChip extends StatelessWidget {
class _VoiceStep extends StatelessWidget {
const _VoiceStep({
required this.placeName,
required this.promptHints,
required this.hasTelegramAuth,
required this.informationProgress,
required this.isRecording,
@@ -1142,6 +1378,7 @@ class _VoiceStep extends StatelessWidget {
});
final String placeName;
final List<String> promptHints;
final bool hasTelegramAuth;
final double informationProgress;
final bool isRecording;
@@ -1171,6 +1408,26 @@ class _VoiceStep extends StatelessWidget {
),
const SizedBox(height: 10),
],
Padding(
padding: const EdgeInsets.only(bottom: 12),
child: Wrap(
alignment: WrapAlignment.center,
spacing: 6,
runSpacing: 6,
children: [
for (final hint in promptHints)
Chip(
label: Text(hint),
side: BorderSide.none,
backgroundColor: tokens.onDark.withValues(alpha: 0.12),
labelStyle: TextStyle(
color: tokens.onDark.withValues(alpha: 0.92),
fontWeight: FontWeight.w700,
),
),
],
),
),
Expanded(child: _VoiceProgressGrid(progress: informationProgress)),
if (!micAllowed)
Padding(
@@ -4,10 +4,16 @@ import '../../../../app/theme/mapflow_theme.dart';
import '../../domain/place_models.dart';
class PlacePhotoCard extends StatelessWidget {
const PlacePhotoCard({super.key, required this.place, required this.onTap});
const PlacePhotoCard({
super.key,
required this.place,
required this.onTap,
required this.onFavoriteToggle,
});
final PlaceRecommendation place;
final VoidCallback onTap;
final VoidCallback onFavoriteToggle;
@override
Widget build(BuildContext context) {
@@ -61,6 +67,23 @@ class PlacePhotoCard extends StatelessWidget {
),
),
),
Positioned(
top: 8,
right: 8,
child: IconButton.filledTonal(
onPressed: onFavoriteToggle,
icon: Icon(
place.isFavorite ? Icons.favorite : Icons.favorite_border,
size: 18,
),
style: IconButton.styleFrom(
fixedSize: const Size.square(36),
minimumSize: const Size.square(36),
padding: EdgeInsets.zero,
),
tooltip: 'Избранное',
),
),
Positioned(
left: 10,
right: 10,
+11 -1
View File
@@ -28,7 +28,11 @@ class MapflowWidgetbook extends StatelessWidget {
builder: (_) => Center(
child: SizedBox(
height: 172,
child: PlacePhotoCard(place: _samplePlace, onTap: () {}),
child: PlacePhotoCard(
place: _samplePlace,
onTap: () {},
onFavoriteToggle: () {},
),
),
),
),
@@ -78,4 +82,10 @@ const _samplePlace = PlaceRecommendation(
traits: {PlaceTrait.calm, PlaceTrait.clean},
googlePrimaryType: 'cafe',
googleTypes: ['cafe'],
googleBusinessStatus: 'OPERATIONAL',
googleRating: 4.8,
googleUserRatingCount: 128,
googleRegularOpeningHours: null,
googleCurrentOpeningHours: null,
isFavorite: true,
);