Skip to content

Commit b35bbb2

Browse files
committed
rfac: replaces deprecated methods
1 parent 18fc3d4 commit b35bbb2

File tree

8 files changed

+15
-14
lines changed

8 files changed

+15
-14
lines changed

lib/data/constants/env_config.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
class EnvironmentConfig {
22
static const String BASE_URL = String.fromEnvironment(
33
'BASE_URL',
4-
defaultValue: 'https://mess.iitr.ac.in',
4+
defaultValue: 'https://appetizer.onrender.com',
55
);
66

77
static const String OAUTH_CLIENT_ID = String.fromEnvironment(
@@ -11,7 +11,7 @@ class EnvironmentConfig {
1111

1212
static const String OAUTH_REDIRECT_URI = String.fromEnvironment(
1313
'OAUTH_REDIRECT_URI',
14-
defaultValue: 'https://mess.iitr.ac.in/api/user/oauth/redirect/',
14+
defaultValue: 'https://appetizer.onrender.com/api/user/oauth/redirect/',
1515
);
1616

1717
static const String SENTRY_DSN = String.fromEnvironment('SENTRY_DSN');

lib/domain/models/menu/week_menu.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ class Meal with _$Meal {
128128
return 'Snacks';
129129
case MealType.D:
130130
return 'Dinner';
131-
default:
132-
return 'Meal';
131+
// default:
132+
// return 'Meal';
133133
}
134134
}
135135

lib/domain/models/menu/week_menu_tmp.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,8 @@ class Meal {
300300
return 'Snacks';
301301
case MealType.D:
302302
return 'Dinner';
303-
default:
304-
return 'Meal';
303+
// default:
304+
// return 'Meal';
305305
}
306306
}
307307
}

lib/presentation/components/app_textfield.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class AppTextField extends StatelessWidget {
4747
border: border ??
4848
OutlineInputBorder(
4949
borderSide: BorderSide(
50-
color: const Color(0xFF111111).withOpacity(0.25)),
50+
color: const Color(0xFF111111).withValues(alpha: 0.25)),
5151
borderRadius: BorderRadius.circular(5),
5252
),
5353
contentPadding: EdgeInsets.symmetric(

lib/presentation/feedback/feedback_view.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ class FeedbackScreen extends StatelessWidget {
7373
title: "Description",
7474
controller: textController,
7575
titleStyle: TextStyle(
76-
color: Colors.black.withOpacity(0.5400000214576721),
76+
color: Colors.black
77+
.withValues(alpha: 0.5400000214576721),
7778
fontSize: 12.toAutoScaledFont,
7879
fontFamily: 'Open Sans',
7980
fontWeight: FontWeight.w400,

lib/presentation/hostel_change/hostel_change_screen.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ class HostelChangeScreen extends StatelessWidget {
244244
border: OutlineInputBorder(
245245
borderSide: BorderSide(
246246
color: const Color(0xFF111111)
247-
.withOpacity(0.25)),
247+
.withValues(alpha: 0.25)),
248248
borderRadius: BorderRadius.circular(5),
249249
),
250250
contentPadding: EdgeInsets.symmetric(

lib/presentation/profile/components/profile_photo.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class ProfilePhoto extends StatelessWidget {
2626
height: 124.toAutoScaledHeight,
2727
child: Container(
2828
decoration: BoxDecoration(
29-
color: AppTheme.primary.withOpacity(0.5),
29+
color: AppTheme.primary.withValues(alpha: 0.5),
3030
shape: BoxShape.circle,
3131
),
3232
child: Center(

lib/utils/color_utils.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ class ColorUtils {
2020
case LeaveStatusEnum.U:
2121
return AppTheme.blue;
2222

23-
default:
24-
return AppTheme.white;
23+
// default:
24+
// return AppTheme.white;
2525
}
2626
}
2727

@@ -43,8 +43,8 @@ class ColorUtils {
4343
case SwitchStatusEnum.U:
4444
return AppTheme.grey;
4545

46-
default:
47-
return Colors.transparent;
46+
// default:
47+
// return Colors.transparent;
4848
}
4949
}
5050
}

0 commit comments

Comments
 (0)