Skip to content

Commit 3e8e1c8

Browse files
committed
Removed Deprecated Code
1 parent 6bddff8 commit 3e8e1c8

File tree

6 files changed

+10
-9
lines changed

6 files changed

+10
-9
lines changed

lib/helpers/misc.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ extension TimeOfDayExtension on TimeOfDay {
9393
}
9494

9595
void launchURL(String url, BuildContext context) async {
96-
await canLaunch(url)
97-
? await launch(url)
96+
await canLaunchUrl(Uri.parse(url))
97+
? await launchUrl(Uri.parse(url))
9898
: ScaffoldMessenger.of(context).showSnackBar(
9999
SnackBar(content: Text('Could not open $url.')),
100100
);

lib/models/nutrition/nutritional_values.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ class NutritionalValues {
9191

9292
@override
9393
//ignore: avoid_equals_and_hash_code_on_mutable_classes
94-
int get hashCode => hashValues(
95-
energy, protein, carbohydrates, carbohydratesSugar, fat, fatSaturated, fibres, sodium);
94+
int get hashCode => Object.hash(energy, protein, carbohydrates,
95+
carbohydratesSugar, fat, fatSaturated, fibres, sodium);
9696
}
9797

9898
class BaseNutritionalValues {

lib/models/workouts/log.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,8 @@ class Log {
133133

134134
@override
135135
//ignore: avoid_equals_and_hash_code_on_mutable_classes
136-
int get hashCode => hashValues(exerciseId, weight, weightUnitId, reps, repetitionUnitId, rir);
136+
int get hashCode => Object.hash(
137+
exerciseId, weight, weightUnitId, reps, repetitionUnitId, rir);
137138

138139
//@override
139140
//int get hashCode => super.hashCode;

lib/screens/home_tabs_screen.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ class _HomeTabsScreenState extends State<HomeTabsScreen> with SingleTickerProvid
165165
),
166166
BottomNavigationBarItem(
167167
icon: const FaIcon(
168-
FontAwesomeIcons.weight,
168+
FontAwesomeIcons.weightScale,
169169
size: 20,
170170
),
171171
label: AppLocalizations.of(context).weight,

lib/theme/theme.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,14 +100,14 @@ final ThemeData wgerTheme = ThemeData(
100100
),
101101
outlinedButtonTheme: OutlinedButtonThemeData(
102102
style: OutlinedButton.styleFrom(
103-
primary: wgerPrimaryButtonColor,
103+
foregroundColor: wgerPrimaryButtonColor,
104104
visualDensity: VisualDensity.compact,
105105
side: const BorderSide(color: wgerPrimaryButtonColor),
106106
),
107107
),
108108
elevatedButtonTheme: ElevatedButtonThemeData(
109109
style: ElevatedButton.styleFrom(
110-
primary: wgerPrimaryButtonColor,
110+
backgroundColor: wgerPrimaryButtonColor,
111111
),
112112
),
113113

lib/widgets/dashboard/widgets.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ class _DashboardWeightWidgetState extends State<DashboardWeightWidget> {
253253
style: Theme.of(context).textTheme.headline4,
254254
),
255255
leading: const FaIcon(
256-
FontAwesomeIcons.weight,
256+
FontAwesomeIcons.weightScale,
257257
color: Colors.black,
258258
),
259259
trailing: IconButton(

0 commit comments

Comments
 (0)