Unify startup loader and thin places query
Build and deploy Flutter Web / build (push) Successful in 4m10s

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