Skip to content

Commit

Permalink
update some deprecated functions
Browse files Browse the repository at this point in the history
  • Loading branch information
NeXTormer committed Mar 11, 2024
1 parent 851157a commit 0716762
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
3 changes: 1 addition & 2 deletions lib/backend/analytics/frederic_analytics_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import 'dart:io';

import 'package:dio/dio.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:frederic/backend/util/frederic_profiler.dart';
import 'package:frederic/theme/frederic_theme.dart';

Expand Down Expand Up @@ -114,7 +113,7 @@ class UmamiAnalyticsService extends FredericAnalyticsService {
"referrer": "",
"language": Platform.localeName,
"screen":
'${MediaQueryData.fromView(WidgetsBinding.instance.window).size.width.toInt()}x${MediaQueryData.fromView(WidgetsBinding.instance.window).size.height.toInt()}',
'${PlatformDispatcher.instance.displays.first.size.width.toInt()}x${PlatformDispatcher.instance.displays.first.size.height.toInt()}',
"title": name.split('/').last,
"url": "/" + name,
"website": trackingID
Expand Down
3 changes: 2 additions & 1 deletion lib/widgets/charts/activity_heatmap_chart_segment.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ class ActivityHeatmapChartSegment extends StatelessWidget {

@override
Widget build(BuildContext context) {
double scaleFactor = MediaQuery.of(context).textScaleFactor;
//TODO: see if this still works correctly
double scaleFactor = MediaQuery.of(context).textScaler.scale(1);

double chartHeight = 216;
if (scaleFactor > 1.14) chartHeight = 224;
Expand Down
4 changes: 2 additions & 2 deletions lib/widgets/edit_workout_screen/weekday_slider_day_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ class WeekDaysSliderDayCard extends StatelessWidget {
color: Colors.transparent,
child: buildContents(context, false, true, false)));
},
onAccept: (data) {
onSwap?.call(data, dayIndex);
onAcceptWithDetails: (data) {
onSwap?.call(data.data, dayIndex);
},
);
}
Expand Down
4 changes: 2 additions & 2 deletions lib/widgets/login_screen/authenticate_with_email_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import 'package:frederic/misc/ExtraIcons.dart';
import 'package:frederic/screens/forgot_password_screen.dart';
import 'package:frederic/widgets/standard_elements/frederic_button.dart';
import 'package:frederic/widgets/standard_elements/frederic_text_field.dart';
import 'package:url_launcher/url_launcher.dart';
import 'package:url_launcher/url_launcher_string.dart';

class AuthenticateWithEmailButton extends StatefulWidget {
AuthenticateWithEmailButton(
Expand Down Expand Up @@ -135,7 +135,7 @@ class _AuthenticateWithEmailButtonState
.tr(),
GestureDetector(
onTap: () {
launch(widget.termsAndContidionsURL);
launchUrlString(widget.termsAndContidionsURL);
},
child: Text('login.agree_tc_2',
style: TextStyle(
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ dependencies:
animations: ^2.0.8
fluttertoast: ^8.2.2
image_picker: ^1.0.4
url_launcher: ^6.1.14
url_launcher: ^6.2.5
social_share: ^2.3.1
system_theme: ^2.3.1
auto_size_text: ^3.0.0
Expand Down

0 comments on commit 0716762

Please sign in to comment.