Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-ishita-g committed Dec 12, 2024
1 parent 564cb77 commit 887ce4c
Show file tree
Hide file tree
Showing 9 changed files with 79 additions and 27 deletions.
10 changes: 5 additions & 5 deletions app/lib/ui/flow/auth/sign_in_method_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ class _SignInMethodScreenState extends ConsumerState<SignInMethodScreen> {
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [
context.colorScheme.primary.withOpacity(0),
context.colorScheme.primary.withOpacity(0.02),
context.colorScheme.primary.withOpacity(0.12),
context.colorScheme.primary.withOpacity(0.02),
context.colorScheme.primary.withOpacity(0),
context.colorScheme.primary.withAlpha(0),
context.colorScheme.primary.withAlpha((0.02 * 255).toInt()),
context.colorScheme.primary.withAlpha((0.12 * 255).toInt()),
context.colorScheme.primary.withAlpha((0.02 * 255).toInt()),
context.colorScheme.primary.withAlpha(0),
],
),
);
Expand Down
2 changes: 1 addition & 1 deletion app/lib/ui/flow/geofence/add/components/place_marker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class PlaceMarker extends StatelessWidget {
height: radius,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(radius),
color: context.colorScheme.primary.withOpacity(0.5),
color: context.colorScheme.primary.withAlpha((0.5 * 255).toInt()),
),
),
),
Expand Down
4 changes: 3 additions & 1 deletion app/lib/ui/flow/geofence/edit/edit_place_view_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,9 @@ class EditPlaceViewNotifier extends StateNotifier<EditPlaceState> {
void onSavePlace() async {
if (state.saving &&
state.updatedSetting == null &&
state.updatedPlace == null) return;
state.updatedPlace == null) {
return;
}

try {
state = state.copyWith(saving: true, error: null);
Expand Down
4 changes: 2 additions & 2 deletions app/lib/ui/flow/home/map/map_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -479,8 +479,8 @@ class _MapScreenState extends ConsumerState<MapScreen> {
setState(() {
_places.add(Circle(
circleId: CircleId(place.id),
fillColor: context.colorScheme.primary.withOpacity(0.4),
strokeColor: context.colorScheme.primary.withOpacity(0.6),
fillColor: context.colorScheme.primary.withAlpha((0.4 * 255).toInt()),
strokeColor: context.colorScheme.primary.withAlpha((0.6 * 255).toInt()),
strokeWidth: 1,
center: latLng,
radius: place.radius,
Expand Down
63 changes: 51 additions & 12 deletions data/lib/api/place/api_place.freezed.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,12 @@ mixin _$ApiPlace {
DateTime? get created_at => throw _privateConstructorUsedError;
List<String> get space_member_ids => throw _privateConstructorUsedError;

/// Serializes this ApiPlace to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)

/// Create a copy of ApiPlace
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$ApiPlaceCopyWith<ApiPlace> get copyWith =>
throw _privateConstructorUsedError;
}
Expand Down Expand Up @@ -64,6 +68,8 @@ class _$ApiPlaceCopyWithImpl<$Res, $Val extends ApiPlace>
// ignore: unused_field
final $Res Function($Val) _then;

/// Create a copy of ApiPlace
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Expand Down Expand Up @@ -146,6 +152,8 @@ class __$$ApiPlaceImplCopyWithImpl<$Res>
_$ApiPlaceImpl _value, $Res Function(_$ApiPlaceImpl) _then)
: super(_value, _then);

/// Create a copy of ApiPlace
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Expand Down Expand Up @@ -274,7 +282,7 @@ class _$ApiPlaceImpl extends _ApiPlace {
.equals(other._space_member_ids, _space_member_ids));
}

@JsonKey(ignore: true)
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
Expand All @@ -288,7 +296,9 @@ class _$ApiPlaceImpl extends _ApiPlace {
created_at,
const DeepCollectionEquality().hash(_space_member_ids));

@JsonKey(ignore: true)
/// Create a copy of ApiPlace
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$ApiPlaceImplCopyWith<_$ApiPlaceImpl> get copyWith =>
Expand Down Expand Up @@ -337,8 +347,11 @@ abstract class _ApiPlace extends ApiPlace {
DateTime? get created_at;
@override
List<String> get space_member_ids;

/// Create a copy of ApiPlace
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(ignore: true)
@JsonKey(includeFromJson: false, includeToJson: false)
_$$ApiPlaceImplCopyWith<_$ApiPlaceImpl> get copyWith =>
throw _privateConstructorUsedError;
}
Expand All @@ -356,8 +369,12 @@ mixin _$ApiPlaceMemberSetting {
List<String> get arrival_alert_for => throw _privateConstructorUsedError;
List<String> get leave_alert_for => throw _privateConstructorUsedError;

/// Serializes this ApiPlaceMemberSetting to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)

/// Create a copy of ApiPlaceMemberSetting
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$ApiPlaceMemberSettingCopyWith<ApiPlaceMemberSetting> get copyWith =>
throw _privateConstructorUsedError;
}
Expand Down Expand Up @@ -387,6 +404,8 @@ class _$ApiPlaceMemberSettingCopyWithImpl<$Res,
// ignore: unused_field
final $Res Function($Val) _then;

/// Create a copy of ApiPlaceMemberSetting
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Expand Down Expand Up @@ -447,6 +466,8 @@ class __$$ApiPlaceMemberSettingImplCopyWithImpl<$Res>
$Res Function(_$ApiPlaceMemberSettingImpl) _then)
: super(_value, _then);

/// Create a copy of ApiPlaceMemberSetting
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Expand Down Expand Up @@ -544,7 +565,7 @@ class _$ApiPlaceMemberSettingImpl extends _ApiPlaceMemberSetting {
.equals(other._leave_alert_for, _leave_alert_for));
}

@JsonKey(ignore: true)
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
Expand All @@ -554,7 +575,9 @@ class _$ApiPlaceMemberSettingImpl extends _ApiPlaceMemberSetting {
const DeepCollectionEquality().hash(_arrival_alert_for),
const DeepCollectionEquality().hash(_leave_alert_for));

@JsonKey(ignore: true)
/// Create a copy of ApiPlaceMemberSetting
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$ApiPlaceMemberSettingImplCopyWith<_$ApiPlaceMemberSettingImpl>
Expand Down Expand Up @@ -591,8 +614,11 @@ abstract class _ApiPlaceMemberSetting extends ApiPlaceMemberSetting {
List<String> get arrival_alert_for;
@override
List<String> get leave_alert_for;

/// Create a copy of ApiPlaceMemberSetting
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(ignore: true)
@JsonKey(includeFromJson: false, includeToJson: false)
_$$ApiPlaceMemberSettingImplCopyWith<_$ApiPlaceMemberSettingImpl>
get copyWith => throw _privateConstructorUsedError;
}
Expand All @@ -609,8 +635,12 @@ mixin _$ApiNearbyPlace {
double get lat => throw _privateConstructorUsedError;
double get lng => throw _privateConstructorUsedError;

/// Serializes this ApiNearbyPlace to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)

/// Create a copy of ApiNearbyPlace
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$ApiNearbyPlaceCopyWith<ApiNearbyPlace> get copyWith =>
throw _privateConstructorUsedError;
}
Expand Down Expand Up @@ -639,6 +669,8 @@ class _$ApiNearbyPlaceCopyWithImpl<$Res, $Val extends ApiNearbyPlace>
// ignore: unused_field
final $Res Function($Val) _then;

/// Create a copy of ApiNearbyPlace
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Expand Down Expand Up @@ -697,6 +729,8 @@ class __$$ApiNearbyPlaceImplCopyWithImpl<$Res>
_$ApiNearbyPlaceImpl _value, $Res Function(_$ApiNearbyPlaceImpl) _then)
: super(_value, _then);

/// Create a copy of ApiNearbyPlace
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Expand Down Expand Up @@ -774,12 +808,14 @@ class _$ApiNearbyPlaceImpl extends _ApiNearbyPlace {
(identical(other.lng, lng) || other.lng == lng));
}

@JsonKey(ignore: true)
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode =>
Object.hash(runtimeType, id, name, formatted_address, lat, lng);

@JsonKey(ignore: true)
/// Create a copy of ApiNearbyPlace
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$ApiNearbyPlaceImplCopyWith<_$ApiNearbyPlaceImpl> get copyWith =>
Expand Down Expand Up @@ -816,8 +852,11 @@ abstract class _ApiNearbyPlace extends ApiNearbyPlace {
double get lat;
@override
double get lng;

/// Create a copy of ApiNearbyPlace
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(ignore: true)
@JsonKey(includeFromJson: false, includeToJson: false)
_$$ApiNearbyPlaceImplCopyWith<_$ApiNearbyPlaceImpl> get copyWith =>
throw _privateConstructorUsedError;
}
17 changes: 14 additions & 3 deletions data/lib/api/subscription/subscription_models.freezed.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ mixin _$SubscriptionPlan {
String get planDetail => throw _privateConstructorUsedError;
String get planInfo => throw _privateConstructorUsedError;

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

/// Create a copy of SubscriptionPlan
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Expand Down Expand Up @@ -93,6 +97,8 @@ class __$$SubscriptionPlanImplCopyWithImpl<$Res>
$Res Function(_$SubscriptionPlanImpl) _then)
: super(_value, _then);

/// Create a copy of SubscriptionPlan
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Expand Down Expand Up @@ -161,7 +167,9 @@ class _$SubscriptionPlanImpl implements _SubscriptionPlan {
@override
int get hashCode => Object.hash(runtimeType, id, name, planDetail, planInfo);

@JsonKey(ignore: true)
/// Create a copy of SubscriptionPlan
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$SubscriptionPlanImplCopyWith<_$SubscriptionPlanImpl> get copyWith =>
Expand All @@ -184,8 +192,11 @@ abstract class _SubscriptionPlan implements SubscriptionPlan {
String get planDetail;
@override
String get planInfo;

/// Create a copy of SubscriptionPlan
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(ignore: true)
@JsonKey(includeFromJson: false, includeToJson: false)
_$$SubscriptionPlanImplCopyWith<_$SubscriptionPlanImpl> get copyWith =>
throw _privateConstructorUsedError;
}
2 changes: 1 addition & 1 deletion style/lib/button/bottom_sticky_overlay.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class BottomStickyOverlay extends StatelessWidget {
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [
context.colorScheme.surface.withOpacity(0),
context.colorScheme.surface.withAlpha(0),
context.colorScheme.surface,
context.colorScheme.surface,
context.colorScheme.surface,
Expand Down
2 changes: 1 addition & 1 deletion style/lib/button/large_icon_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class LargeIconButton extends StatelessWidget {
final bg = backgroundColor ?? context.colorScheme.primary;
final bgColor = tappable
? bg
: Color.alphaBlend(bg.withOpacity(0.4), context.colorScheme.surface);
: Color.alphaBlend(bg.withAlpha((0.4 * 255).toInt()), context.colorScheme.surface);

return OnTapScale(
enabled: tappable,
Expand Down
2 changes: 1 addition & 1 deletion style/lib/button/primary_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class OutlinedPrimaryButton extends StatelessWidget {
final fg = foreground ?? colorScheme.primary;
final fgColor = tappable
? fg
: Color.alphaBlend(fg.withOpacity(0.5), colorScheme.surface);
: Color.alphaBlend(fg.withAlpha((0.5 * 255).toInt()), colorScheme.surface);

return OnTapScale(
onTap: () {
Expand Down

0 comments on commit 887ce4c

Please sign in to comment.