Skip to content

Commit

Permalink
[desktop_photo_search] Tighten constraints then regenerate files
Browse files Browse the repository at this point in the history
  • Loading branch information
parlough committed Aug 9, 2023
1 parent 286b5ca commit d4b15e8
Show file tree
Hide file tree
Showing 32 changed files with 459 additions and 393 deletions.
3 changes: 0 additions & 3 deletions desktop_photo_search/fluent_ui/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
include: package:analysis_defaults/flutter.yaml

analyzer:
exclude: [lib/src/**.g.dart]

linter:
rules:
sort_pub_dependencies: true
28 changes: 17 additions & 11 deletions desktop_photo_search/fluent_ui/lib/src/model/search.g.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ class _$SearchSerializer implements StructuredSerializer<Search> {

final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current as String;
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;
specifiedType: const FullType(String))! as String;
break;
case 'results':
result.results.replace(serializers.deserialize(value,
Expand All @@ -69,11 +69,11 @@ class _$Search extends Search {
final BuiltList<Photo> results;

factory _$Search([void Function(SearchBuilder)? updates]) =>
(new SearchBuilder()..update(updates)).build();
(new SearchBuilder()..update(updates))._build();

_$Search._({required this.query, required this.results}) : super._() {
BuiltValueNullFieldError.checkNotNull(query, 'Search', 'query');
BuiltValueNullFieldError.checkNotNull(results, 'Search', 'results');
BuiltValueNullFieldError.checkNotNull(query, r'Search', 'query');
BuiltValueNullFieldError.checkNotNull(results, r'Search', 'results');
}

@override
Expand All @@ -91,12 +91,16 @@ class _$Search extends Search {

@override
int get hashCode {
return $jf($jc($jc(0, query.hashCode), results.hashCode));
var _$hash = 0;
_$hash = $jc(_$hash, query.hashCode);
_$hash = $jc(_$hash, results.hashCode);
_$hash = $jf(_$hash);
return _$hash;
}

@override
String toString() {
return (newBuiltValueToStringHelper('Search')
return (newBuiltValueToStringHelper(r'Search')
..add('query', query)
..add('results', results))
.toString();
Expand Down Expand Up @@ -139,13 +143,15 @@ class SearchBuilder implements Builder<Search, SearchBuilder> {
}

@override
_$Search build() {
Search build() => _build();

_$Search _build() {
_$Search _$result;
try {
_$result = _$v ??
new _$Search._(
query: BuiltValueNullFieldError.checkNotNull(
query, 'Search', 'query'),
query, r'Search', 'query'),
results: results.build());
} catch (_) {
late String _$failedField;
Expand All @@ -154,7 +160,7 @@ class SearchBuilder implements Builder<Search, SearchBuilder> {
results.build();
} catch (e) {
throw new BuiltValueNestedFieldError(
'Search', _$failedField, e.toString());
r'Search', _$failedField, e.toString());
}
rethrow;
}
Expand All @@ -163,4 +169,4 @@ class SearchBuilder implements Builder<Search, SearchBuilder> {
}
}

// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new
// ignore_for_file: deprecated_member_use_from_same_package,type=lint
2 changes: 1 addition & 1 deletion desktop_photo_search/fluent_ui/lib/src/serializers.g.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ Serializers _$serializers = (new Serializers().toBuilder()
() => new ListBuilder<CurrentUserCollections>()))
.build();

// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new
// ignore_for_file: deprecated_member_use_from_same_package,type=lint
19 changes: 12 additions & 7 deletions desktop_photo_search/fluent_ui/lib/src/unsplash/api_error.g.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class _$ApiErrorSerializer implements StructuredSerializer<ApiError> {

final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current as String;
final key = iterator.current! as String;
iterator.moveNext();
final Object? value = iterator.current;
switch (key) {
Expand All @@ -63,7 +63,7 @@ class _$ApiError extends ApiError {
final BuiltList<String>? errors;

factory _$ApiError([void Function(ApiErrorBuilder)? updates]) =>
(new ApiErrorBuilder()..update(updates)).build();
(new ApiErrorBuilder()..update(updates))._build();

_$ApiError._({this.errors}) : super._();

Expand All @@ -82,12 +82,15 @@ class _$ApiError extends ApiError {

@override
int get hashCode {
return $jf($jc(0, errors.hashCode));
var _$hash = 0;
_$hash = $jc(_$hash, errors.hashCode);
_$hash = $jf(_$hash);
return _$hash;
}

@override
String toString() {
return (newBuiltValueToStringHelper('ApiError')..add('errors', errors))
return (newBuiltValueToStringHelper(r'ApiError')..add('errors', errors))
.toString();
}
}
Expand Down Expand Up @@ -123,7 +126,9 @@ class ApiErrorBuilder implements Builder<ApiError, ApiErrorBuilder> {
}

@override
_$ApiError build() {
ApiError build() => _build();

_$ApiError _build() {
_$ApiError _$result;
try {
_$result = _$v ?? new _$ApiError._(errors: _errors?.build());
Expand All @@ -134,7 +139,7 @@ class ApiErrorBuilder implements Builder<ApiError, ApiErrorBuilder> {
_errors?.build();
} catch (e) {
throw new BuiltValueNestedFieldError(
'ApiError', _$failedField, e.toString());
r'ApiError', _$failedField, e.toString());
}
rethrow;
}
Expand All @@ -143,4 +148,4 @@ class ApiErrorBuilder implements Builder<ApiError, ApiErrorBuilder> {
}
}

// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new
// ignore_for_file: deprecated_member_use_from_same_package,type=lint
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ class _$CurrentUserCollectionsSerializer

final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current as String;
final key = iterator.current! as String;
iterator.moveNext();
final Object? value = iterator.current;
switch (key) {
case 'id':
result.id = serializers.deserialize(value,
specifiedType: const FullType(int)) as int;
specifiedType: const FullType(int))! as int;
break;
case 'title':
result.title = serializers.deserialize(value,
Expand Down Expand Up @@ -103,12 +103,12 @@ class _$CurrentUserCollections extends CurrentUserCollections {

factory _$CurrentUserCollections(
[void Function(CurrentUserCollectionsBuilder)? updates]) =>
(new CurrentUserCollectionsBuilder()..update(updates)).build();
(new CurrentUserCollectionsBuilder()..update(updates))._build();

_$CurrentUserCollections._(
{required this.id, this.title, this.publishedAt, this.updatedAt})
: super._() {
BuiltValueNullFieldError.checkNotNull(id, 'CurrentUserCollections', 'id');
BuiltValueNullFieldError.checkNotNull(id, r'CurrentUserCollections', 'id');
}

@override
Expand All @@ -132,14 +132,18 @@ class _$CurrentUserCollections extends CurrentUserCollections {

@override
int get hashCode {
return $jf($jc(
$jc($jc($jc(0, id.hashCode), title.hashCode), publishedAt.hashCode),
updatedAt.hashCode));
var _$hash = 0;
_$hash = $jc(_$hash, id.hashCode);
_$hash = $jc(_$hash, title.hashCode);
_$hash = $jc(_$hash, publishedAt.hashCode);
_$hash = $jc(_$hash, updatedAt.hashCode);
_$hash = $jf(_$hash);
return _$hash;
}

@override
String toString() {
return (newBuiltValueToStringHelper('CurrentUserCollections')
return (newBuiltValueToStringHelper(r'CurrentUserCollections')
..add('id', id)
..add('title', title)
..add('publishedAt', publishedAt)
Expand Down Expand Up @@ -194,11 +198,13 @@ class CurrentUserCollectionsBuilder
}

@override
_$CurrentUserCollections build() {
CurrentUserCollections build() => _build();

_$CurrentUserCollections _build() {
final _$result = _$v ??
new _$CurrentUserCollections._(
id: BuiltValueNullFieldError.checkNotNull(
id, 'CurrentUserCollections', 'id'),
id, r'CurrentUserCollections', 'id'),
title: title,
publishedAt: publishedAt,
updatedAt: updatedAt);
Expand All @@ -207,4 +213,4 @@ class CurrentUserCollectionsBuilder
}
}

// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new
// ignore_for_file: deprecated_member_use_from_same_package,type=lint
29 changes: 16 additions & 13 deletions desktop_photo_search/fluent_ui/lib/src/unsplash/exif.g.dart
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class _$ExifSerializer implements StructuredSerializer<Exif> {

final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current as String;
final key = iterator.current! as String;
iterator.moveNext();
final Object? value = iterator.current;
switch (key) {
Expand Down Expand Up @@ -124,7 +124,7 @@ class _$Exif extends Exif {
final int? iso;

factory _$Exif([void Function(ExifBuilder)? updates]) =>
(new ExifBuilder()..update(updates)).build();
(new ExifBuilder()..update(updates))._build();

_$Exif._(
{this.make,
Expand Down Expand Up @@ -156,19 +156,20 @@ class _$Exif extends Exif {

@override
int get hashCode {
return $jf($jc(
$jc(
$jc(
$jc($jc($jc(0, make.hashCode), model.hashCode),
exposureTime.hashCode),
aperture.hashCode),
focalLength.hashCode),
iso.hashCode));
var _$hash = 0;
_$hash = $jc(_$hash, make.hashCode);
_$hash = $jc(_$hash, model.hashCode);
_$hash = $jc(_$hash, exposureTime.hashCode);
_$hash = $jc(_$hash, aperture.hashCode);
_$hash = $jc(_$hash, focalLength.hashCode);
_$hash = $jc(_$hash, iso.hashCode);
_$hash = $jf(_$hash);
return _$hash;
}

@override
String toString() {
return (newBuiltValueToStringHelper('Exif')
return (newBuiltValueToStringHelper(r'Exif')
..add('make', make)
..add('model', model)
..add('exposureTime', exposureTime)
Expand Down Expand Up @@ -234,7 +235,9 @@ class ExifBuilder implements Builder<Exif, ExifBuilder> {
}

@override
_$Exif build() {
Exif build() => _build();

_$Exif _build() {
final _$result = _$v ??
new _$Exif._(
make: make,
Expand All @@ -248,4 +251,4 @@ class ExifBuilder implements Builder<Exif, ExifBuilder> {
}
}

// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new
// ignore_for_file: deprecated_member_use_from_same_package,type=lint
22 changes: 14 additions & 8 deletions desktop_photo_search/fluent_ui/lib/src/unsplash/links.g.dart
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class _$LinksSerializer implements StructuredSerializer<Links> {

final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current as String;
final key = iterator.current! as String;
iterator.moveNext();
final Object? value = iterator.current;
switch (key) {
Expand Down Expand Up @@ -99,7 +99,7 @@ class _$Links extends Links {
final String? downloadLocation;

factory _$Links([void Function(LinksBuilder)? updates]) =>
(new LinksBuilder()..update(updates)).build();
(new LinksBuilder()..update(updates))._build();

_$Links._({this.self, this.html, this.download, this.downloadLocation})
: super._();
Expand All @@ -123,14 +123,18 @@ class _$Links extends Links {

@override
int get hashCode {
return $jf($jc(
$jc($jc($jc(0, self.hashCode), html.hashCode), download.hashCode),
downloadLocation.hashCode));
var _$hash = 0;
_$hash = $jc(_$hash, self.hashCode);
_$hash = $jc(_$hash, html.hashCode);
_$hash = $jc(_$hash, download.hashCode);
_$hash = $jc(_$hash, downloadLocation.hashCode);
_$hash = $jf(_$hash);
return _$hash;
}

@override
String toString() {
return (newBuiltValueToStringHelper('Links')
return (newBuiltValueToStringHelper(r'Links')
..add('self', self)
..add('html', html)
..add('download', download)
Expand Down Expand Up @@ -185,7 +189,9 @@ class LinksBuilder implements Builder<Links, LinksBuilder> {
}

@override
_$Links build() {
Links build() => _build();

_$Links _build() {
final _$result = _$v ??
new _$Links._(
self: self,
Expand All @@ -197,4 +203,4 @@ class LinksBuilder implements Builder<Links, LinksBuilder> {
}
}

// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new
// ignore_for_file: deprecated_member_use_from_same_package,type=lint
Loading

0 comments on commit d4b15e8

Please sign in to comment.