diff --git a/lib/main.dart b/lib/main.dart index 20d6dd9b0..4f82fffe3 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -21,6 +21,7 @@ import 'package:ente_auth/ui/utils/icon_utils.dart'; import 'package:ente_auth/utils/crypto_util.dart'; import 'package:flutter/foundation.dart'; import "package:flutter/material.dart"; +import 'package:flutter_displaymode/flutter_displaymode.dart'; import 'package:logging/logging.dart'; import 'package:path_provider/path_provider.dart'; @@ -30,6 +31,7 @@ void main() async { WidgetsFlutterBinding.ensureInitialized(); final savedThemeMode = await AdaptiveTheme.getThemeMode(); await _runInForeground(savedThemeMode); + FlutterDisplayMode.setHighRefreshRate(); } Future _runInForeground(AdaptiveThemeMode? savedThemeMode) async { diff --git a/lib/ui/account/email_entry_page.dart b/lib/ui/account/email_entry_page.dart index e1147f416..e6c3f41fb 100644 --- a/lib/ui/account/email_entry_page.dart +++ b/lib/ui/account/email_entry_page.dart @@ -371,35 +371,39 @@ class _EmailEntryPageState extends State { Expanded( child: StyledText( text: context.l10n.signUpTerms, - style: - Theme.of(context).textTheme.titleMedium!.copyWith(fontSize: 12), + style: Theme.of(context) + .textTheme + .titleMedium! + .copyWith(fontSize: 12), tags: { 'u-terms': StyledTextActionTag( - (String? text, Map attrs) => Navigator.of(context).push( - MaterialPageRoute( - builder: (BuildContext context) { - return WebPage( - context.l10n.termsOfServicesTitle, - "https://ente.io/terms", - ); - }, - ), + (String? text, Map attrs) => + Navigator.of(context).push( + MaterialPageRoute( + builder: (BuildContext context) { + return WebPage( + context.l10n.termsOfServicesTitle, + "https://ente.io/terms", + ); + }, ), + ), style: const TextStyle( decoration: TextDecoration.underline, ), ), 'u-policy': StyledTextActionTag( - (String? text, Map attrs) => Navigator.of(context).push( - MaterialPageRoute( - builder: (BuildContext context) { - return WebPage( - context.l10n.privacyPolicyTitle, - "https://ente.io/privacy", - ); - }, - ), + (String? text, Map attrs) => + Navigator.of(context).push( + MaterialPageRoute( + builder: (BuildContext context) { + return WebPage( + context.l10n.privacyPolicyTitle, + "https://ente.io/privacy", + ); + }, ), + ), style: const TextStyle( decoration: TextDecoration.underline, ), @@ -434,20 +438,23 @@ class _EmailEntryPageState extends State { Expanded( child: StyledText( text: context.l10n.ackPasswordLostWarning, - style: - Theme.of(context).textTheme.titleMedium!.copyWith(fontSize: 12), + style: Theme.of(context) + .textTheme + .titleMedium! + .copyWith(fontSize: 12), tags: { 'underline': StyledTextActionTag( - (String? text, Map attrs) => Navigator.of(context).push( - MaterialPageRoute( - builder: (BuildContext context) { - return WebPage( - context.l10n.encryption, - "https://ente.io/architecture", - ); - }, - ), + (String? text, Map attrs) => + Navigator.of(context).push( + MaterialPageRoute( + builder: (BuildContext context) { + return WebPage( + context.l10n.encryption, + "https://ente.io/architecture", + ); + }, ), + ), style: const TextStyle( decoration: TextDecoration.underline, ), diff --git a/pubspec.lock b/pubspec.lock index d951a419a..de0fde90c 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -447,6 +447,14 @@ packages: url: "https://pub.dev" source: hosted version: "8.1.3" + flutter_displaymode: + dependency: "direct main" + description: + name: flutter_displaymode + sha256: "42c5e9abd13d28ed74f701b60529d7f8416947e58256e6659c5550db719c57ef" + url: "https://pub.dev" + source: hosted + version: "0.6.0" flutter_email_sender: dependency: "direct main" description: diff --git a/pubspec.yaml b/pubspec.yaml index 51ae26026..81aea0ad0 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -31,6 +31,7 @@ dependencies: flutter: sdk: flutter flutter_bloc: ^8.0.1 + flutter_displaymode: ^0.6.0 flutter_email_sender: ^5.1.0 flutter_inappwebview: ^5.7.1 flutter_launcher_icons: ^0.9.3