From c0ca2166228a9adadc7945ed489d285bed283e17 Mon Sep 17 00:00:00 2001 From: Neeraj Gupta <254676+ua741@users.noreply.github.com> Date: Mon, 30 May 2022 08:00:51 +0530 Subject: [PATCH] Redesign: UI changes --- lib/ui/app_update_dialog.dart | 17 +++++--- lib/ui/gallery_footer_widget.dart | 2 +- lib/ui/payment/skip_subscription_widget.dart | 14 +++++-- lib/ui/sync_indicator.dart | 41 +++++++++++--------- 4 files changed, 45 insertions(+), 29 deletions(-) diff --git a/lib/ui/app_update_dialog.dart b/lib/ui/app_update_dialog.dart index e67d31ac6..e1b74f9ce 100644 --- a/lib/ui/app_update_dialog.dart +++ b/lib/ui/app_update_dialog.dart @@ -4,7 +4,6 @@ import 'package:open_file/open_file.dart'; import 'package:photos/core/configuration.dart'; import 'package:photos/core/network.dart'; import 'package:photos/services/update_service.dart'; -import 'package:photos/ui/common_elements.dart'; class AppUpdateDialog extends StatefulWidget { final LatestVersionInfo latestVersionInfo; @@ -51,9 +50,17 @@ class _AppUpdateDialogState extends State { width: double.infinity, height: 64, padding: const EdgeInsets.fromLTRB(50, 0, 50, 0), - child: button( - "Update", - fontSize: 16, + child: OutlinedButton( + child: Text( + "Update", + ), + style: Theme.of(context).outlinedButtonTheme.style.copyWith( + textStyle: MaterialStateProperty.resolveWith( + (Set states) { + return Theme.of(context).textTheme.subtitle1; + }, + ), + ), onPressed: () async { Navigator.pop(context); showDialog( @@ -111,7 +118,7 @@ class _ApkDownloaderDialogState extends State { onWillPop: () async => false, child: AlertDialog( title: Text( - "downloading...", + "Downloading...", style: TextStyle( fontSize: 16, ), diff --git a/lib/ui/gallery_footer_widget.dart b/lib/ui/gallery_footer_widget.dart index c575e7973..99dc665e2 100644 --- a/lib/ui/gallery_footer_widget.dart +++ b/lib/ui/gallery_footer_widget.dart @@ -41,7 +41,7 @@ class GalleryFooterWidget extends StatelessWidget { routeToPage( context, BackupFolderSelectionPage( - buttonText: "preserve", + buttonText: "Preserve", ), ); } diff --git a/lib/ui/payment/skip_subscription_widget.dart b/lib/ui/payment/skip_subscription_widget.dart index c58762e49..1144ee10d 100644 --- a/lib/ui/payment/skip_subscription_widget.dart +++ b/lib/ui/payment/skip_subscription_widget.dart @@ -4,7 +4,6 @@ import 'package:photos/events/subscription_purchased_event.dart'; import 'package:photos/models/billing_plan.dart'; import 'package:photos/models/subscription.dart'; import 'package:photos/services/billing_service.dart'; -import 'package:photos/ui/common_elements.dart'; import 'package:photos/utils/toast_util.dart'; class SkipSubscriptionWidget extends StatelessWidget { @@ -22,9 +21,16 @@ class SkipSubscriptionWidget extends StatelessWidget { height: 64, margin: const EdgeInsets.fromLTRB(0, 30, 0, 30), padding: const EdgeInsets.fromLTRB(50, 0, 50, 0), - child: button( - "Continue on free plan", - fontSize: 16, + child: OutlinedButton( + child: Text("Continue on free plan"), + style: Theme.of(context).outlinedButtonTheme.style.copyWith( + textStyle: MaterialStateProperty.resolveWith( + (Set states) { + return Theme.of(context).textTheme.subtitle1; + }, + ), + ), + // fontSize: 16, onPressed: () async { showToast("Thank you for signing up!"); Bus.instance.fire(SubscriptionPurchasedEvent()); diff --git a/lib/ui/sync_indicator.dart b/lib/ui/sync_indicator.dart index 2210a412a..e196c8ade 100644 --- a/lib/ui/sync_indicator.dart +++ b/lib/ui/sync_indicator.dart @@ -5,7 +5,6 @@ import 'package:photos/core/errors.dart'; import 'package:photos/core/event_bus.dart'; import 'package:photos/events/sync_status_update_event.dart'; import 'package:photos/services/sync_service.dart'; -import 'package:photos/ui/common_elements.dart'; import 'package:photos/ui/payment/subscription.dart'; import 'package:photos/utils/email_util.dart'; @@ -133,15 +132,17 @@ class _SyncIndicatorState extends State { width: double.infinity, height: 64, padding: const EdgeInsets.fromLTRB(80, 0, 80, 0), - child: button("Subscribe", onPressed: () { - Navigator.of(context).push( - MaterialPageRoute( - builder: (BuildContext context) { - return getSubscriptionPage(); - }, - ), - ); - }), + child: OutlinedButton( + child: Text("Subscribe"), + onPressed: () { + Navigator.of(context).push( + MaterialPageRoute( + builder: (BuildContext context) { + return getSubscriptionPage(); + }, + ), + ); + }), ), Padding(padding: EdgeInsets.all(8)), ], @@ -169,15 +170,17 @@ class _SyncIndicatorState extends State { width: double.infinity, height: 64, padding: const EdgeInsets.fromLTRB(80, 0, 80, 0), - child: button("Upgrade", onPressed: () { - Navigator.of(context).push( - MaterialPageRoute( - builder: (BuildContext context) { - return getSubscriptionPage(); - }, - ), - ); - }), + child: OutlinedButton( + child: Text("Upgrade"), + onPressed: () { + Navigator.of(context).push( + MaterialPageRoute( + builder: (BuildContext context) { + return getSubscriptionPage(); + }, + ), + ); + }), ), Padding(padding: EdgeInsets.all(8)), ],