Skip to content

Commit

Permalink
project updated to flutter 3.24.2, updated all the packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Meshkat-Shadik committed Sep 5, 2024
1 parent 7e1277c commit 5b49e45
Show file tree
Hide file tree
Showing 17 changed files with 411 additions and 358 deletions.
2 changes: 1 addition & 1 deletion .fvmrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"flutter": "3.22.2"
"flutter": "3.24.2"
}
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"dart.flutterSdkPath": ".fvm/versions/3.22.2"
"dart.flutterSdkPath": ".fvm/versions/3.24.2"
}
12 changes: 6 additions & 6 deletions lib/failure/app_failure.freezed.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ part of 'app_failure.dart';
T _$identity<T>(T value) => value;

final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods');
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');

/// @nodoc
mixin _$AppFailure {
Expand All @@ -24,8 +24,8 @@ mixin _$AppFailure {

/// @nodoc
class _$_AppFailure extends _AppFailure {
const _$_AppFailure(
class _$AppFailureImpl extends _AppFailure {
const _$AppFailureImpl(
{required this.message,
required this.name,
this.uriPath,
Expand All @@ -47,10 +47,10 @@ class _$_AppFailure extends _AppFailure {
}

@override
bool operator ==(dynamic other) {
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$_AppFailure &&
other is _$AppFailureImpl &&
(identical(other.message, message) || other.message == message) &&
(identical(other.name, name) || other.name == name) &&
(identical(other.uriPath, uriPath) || other.uriPath == uriPath) &&
Expand All @@ -68,7 +68,7 @@ abstract class _AppFailure extends AppFailure {
{required final String message,
required final String name,
final String? uriPath,
final int? statusCode}) = _$_AppFailure;
final int? statusCode}) = _$AppFailureImpl;
const _AppFailure._() : super._();

@override
Expand Down
12 changes: 6 additions & 6 deletions lib/failure/local_failure.freezed.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ part of 'local_failure.dart';
T _$identity<T>(T value) => value;

final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods');
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');

/// @nodoc
mixin _$LocalFailure {
Expand All @@ -24,8 +24,8 @@ mixin _$LocalFailure {

/// @nodoc
class _$_LocalFailure implements _LocalFailure {
const _$_LocalFailure(
class _$LocalFailureImpl implements _LocalFailure {
const _$LocalFailureImpl(
{required this.name,
required this.message,
this.uriPath,
Expand All @@ -46,10 +46,10 @@ class _$_LocalFailure implements _LocalFailure {
}

@override
bool operator ==(dynamic other) {
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$_LocalFailure &&
other is _$LocalFailureImpl &&
(identical(other.name, name) || other.name == name) &&
(identical(other.message, message) || other.message == message) &&
(identical(other.uriPath, uriPath) || other.uriPath == uriPath) &&
Expand All @@ -67,7 +67,7 @@ abstract class _LocalFailure implements LocalFailure {
{required final String name,
required final String message,
final String? uriPath,
final int? statusCode}) = _$_LocalFailure;
final int? statusCode}) = _$LocalFailureImpl;

@override
String get name;
Expand Down
56 changes: 34 additions & 22 deletions lib/failure/network_failure.freezed.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ part of 'network_failure.dart';
T _$identity<T>(T value) => value;

final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods');
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');

/// @nodoc
mixin _$NetworkFailure {
Expand All @@ -21,7 +21,9 @@ mixin _$NetworkFailure {
String get uriPath => throw _privateConstructorUsedError;
int get statusCode => throw _privateConstructorUsedError;

@JsonKey(ignore: true)
/// Create a copy of NetworkFailure
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$NetworkFailureCopyWith<NetworkFailure> get copyWith =>
throw _privateConstructorUsedError;
}
Expand All @@ -45,6 +47,8 @@ class _$NetworkFailureCopyWithImpl<$Res, $Val extends NetworkFailure>
// ignore: unused_field
final $Res Function($Val) _then;

/// Create a copy of NetworkFailure
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Expand Down Expand Up @@ -75,24 +79,26 @@ class _$NetworkFailureCopyWithImpl<$Res, $Val extends NetworkFailure>
}

/// @nodoc
abstract class _$$_NetworkFailureCopyWith<$Res>
abstract class _$$NetworkFailureImplCopyWith<$Res>
implements $NetworkFailureCopyWith<$Res> {
factory _$$_NetworkFailureCopyWith(
_$_NetworkFailure value, $Res Function(_$_NetworkFailure) then) =
__$$_NetworkFailureCopyWithImpl<$Res>;
factory _$$NetworkFailureImplCopyWith(_$NetworkFailureImpl value,
$Res Function(_$NetworkFailureImpl) then) =
__$$NetworkFailureImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({String name, String message, String uriPath, int statusCode});
}

/// @nodoc
class __$$_NetworkFailureCopyWithImpl<$Res>
extends _$NetworkFailureCopyWithImpl<$Res, _$_NetworkFailure>
implements _$$_NetworkFailureCopyWith<$Res> {
__$$_NetworkFailureCopyWithImpl(
_$_NetworkFailure _value, $Res Function(_$_NetworkFailure) _then)
class __$$NetworkFailureImplCopyWithImpl<$Res>
extends _$NetworkFailureCopyWithImpl<$Res, _$NetworkFailureImpl>
implements _$$NetworkFailureImplCopyWith<$Res> {
__$$NetworkFailureImplCopyWithImpl(
_$NetworkFailureImpl _value, $Res Function(_$NetworkFailureImpl) _then)
: super(_value, _then);

/// Create a copy of NetworkFailure
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Expand All @@ -101,7 +107,7 @@ class __$$_NetworkFailureCopyWithImpl<$Res>
Object? uriPath = null,
Object? statusCode = null,
}) {
return _then(_$_NetworkFailure(
return _then(_$NetworkFailureImpl(
name: null == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
Expand All @@ -124,8 +130,8 @@ class __$$_NetworkFailureCopyWithImpl<$Res>

/// @nodoc
class _$_NetworkFailure implements _NetworkFailure {
const _$_NetworkFailure(
class _$NetworkFailureImpl implements _NetworkFailure {
const _$NetworkFailureImpl(
{required this.name,
required this.message,
required this.uriPath,
Expand All @@ -146,10 +152,10 @@ class _$_NetworkFailure implements _NetworkFailure {
}

@override
bool operator ==(dynamic other) {
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$_NetworkFailure &&
other is _$NetworkFailureImpl &&
(identical(other.name, name) || other.name == name) &&
(identical(other.message, message) || other.message == message) &&
(identical(other.uriPath, uriPath) || other.uriPath == uriPath) &&
Expand All @@ -161,19 +167,22 @@ class _$_NetworkFailure implements _NetworkFailure {
int get hashCode =>
Object.hash(runtimeType, name, message, uriPath, statusCode);

@JsonKey(ignore: true)
/// Create a copy of NetworkFailure
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$_NetworkFailureCopyWith<_$_NetworkFailure> get copyWith =>
__$$_NetworkFailureCopyWithImpl<_$_NetworkFailure>(this, _$identity);
_$$NetworkFailureImplCopyWith<_$NetworkFailureImpl> get copyWith =>
__$$NetworkFailureImplCopyWithImpl<_$NetworkFailureImpl>(
this, _$identity);
}

abstract class _NetworkFailure implements NetworkFailure {
const factory _NetworkFailure(
{required final String name,
required final String message,
required final String uriPath,
required final int statusCode}) = _$_NetworkFailure;
required final int statusCode}) = _$NetworkFailureImpl;

@override
String get name;
Expand All @@ -183,8 +192,11 @@ abstract class _NetworkFailure implements NetworkFailure {
String get uriPath;
@override
int get statusCode;

/// Create a copy of NetworkFailure
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(ignore: true)
_$$_NetworkFailureCopyWith<_$_NetworkFailure> get copyWith =>
@JsonKey(includeFromJson: false, includeToJson: false)
_$$NetworkFailureImplCopyWith<_$NetworkFailureImpl> get copyWith =>
throw _privateConstructorUsedError;
}
42 changes: 21 additions & 21 deletions lib/feature/common/states/api_state.freezed.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ part of 'api_state.dart';
T _$identity<T>(T value) => value;

final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods');
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');

/// @nodoc
mixin _$ApiRequestState<T, E> {
Expand Down Expand Up @@ -70,18 +70,18 @@ mixin _$ApiRequestState<T, E> {

/// @nodoc
class _$IDLE<T, E> implements IDLE<T, E> {
const _$IDLE();
class _$IDLEImpl<T, E> implements IDLE<T, E> {
const _$IDLEImpl();

@override
String toString() {
return 'ApiRequestState<$T, $E>.idle()';
}

@override
bool operator ==(dynamic other) {
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType && other is _$IDLE<T, E>);
(other.runtimeType == runtimeType && other is _$IDLEImpl<T, E>);
}

@override
Expand Down Expand Up @@ -163,23 +163,23 @@ class _$IDLE<T, E> implements IDLE<T, E> {
}

abstract class IDLE<T, E> implements ApiRequestState<T, E> {
const factory IDLE() = _$IDLE<T, E>;
const factory IDLE() = _$IDLEImpl<T, E>;
}

/// @nodoc
class _$LOADING<T, E> implements LOADING<T, E> {
const _$LOADING();
class _$LOADINGImpl<T, E> implements LOADING<T, E> {
const _$LOADINGImpl();

@override
String toString() {
return 'ApiRequestState<$T, $E>.loading()';
}

@override
bool operator ==(dynamic other) {
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType && other is _$LOADING<T, E>);
(other.runtimeType == runtimeType && other is _$LOADINGImpl<T, E>);
}

@override
Expand Down Expand Up @@ -261,13 +261,13 @@ class _$LOADING<T, E> implements LOADING<T, E> {
}

abstract class LOADING<T, E> implements ApiRequestState<T, E> {
const factory LOADING() = _$LOADING<T, E>;
const factory LOADING() = _$LOADINGImpl<T, E>;
}

/// @nodoc
class _$DATA<T, E> implements DATA<T, E> {
const _$DATA({required this.data});
class _$DATAImpl<T, E> implements DATA<T, E> {
const _$DATAImpl({required this.data});

@override
final T data;
Expand All @@ -278,10 +278,10 @@ class _$DATA<T, E> implements DATA<T, E> {
}

@override
bool operator ==(dynamic other) {
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$DATA<T, E> &&
other is _$DATAImpl<T, E> &&
const DeepCollectionEquality().equals(other.data, data));
}

Expand Down Expand Up @@ -365,15 +365,15 @@ class _$DATA<T, E> implements DATA<T, E> {
}

abstract class DATA<T, E> implements ApiRequestState<T, E> {
const factory DATA({required final T data}) = _$DATA<T, E>;
const factory DATA({required final T data}) = _$DATAImpl<T, E>;

T get data;
}

/// @nodoc
class _$FAILED<T, E> implements FAILED<T, E> {
const _$FAILED({required this.reason});
class _$FAILEDImpl<T, E> implements FAILED<T, E> {
const _$FAILEDImpl({required this.reason});

@override
final E reason;
Expand All @@ -384,10 +384,10 @@ class _$FAILED<T, E> implements FAILED<T, E> {
}

@override
bool operator ==(dynamic other) {
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$FAILED<T, E> &&
other is _$FAILEDImpl<T, E> &&
const DeepCollectionEquality().equals(other.reason, reason));
}

Expand Down Expand Up @@ -471,7 +471,7 @@ class _$FAILED<T, E> implements FAILED<T, E> {
}

abstract class FAILED<T, E> implements ApiRequestState<T, E> {
const factory FAILED({required final E reason}) = _$FAILED<T, E>;
const factory FAILED({required final E reason}) = _$FAILEDImpl<T, E>;

E get reason;
}
7 changes: 5 additions & 2 deletions lib/feature/location/infrastructure/location_repository.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ class LocationRepositoryImpl implements LocationRepository {
@override
Future<Position> getCoordinates() async {
Position position = await Geolocator.getCurrentPosition(
desiredAccuracy: LocationAccuracy.best,
forceAndroidLocationManager: true);
locationSettings: AndroidSettings(
accuracy: LocationAccuracy.best,
distanceFilter: 10,
),
);
return position;
}

Expand Down
Loading

0 comments on commit 5b49e45

Please sign in to comment.