Redesign: UI changes

This commit is contained in:
Neeraj Gupta 2022-05-30 08:00:51 +05:30
parent a391d5bb61
commit c0ca216622
No known key found for this signature in database
GPG key ID: 3C5A1684DC1729E1
4 changed files with 45 additions and 29 deletions

View file

@ -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<AppUpdateDialog> {
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<TextStyle>(
(Set<MaterialState> states) {
return Theme.of(context).textTheme.subtitle1;
},
),
),
onPressed: () async {
Navigator.pop(context);
showDialog(
@ -111,7 +118,7 @@ class _ApkDownloaderDialogState extends State<ApkDownloaderDialog> {
onWillPop: () async => false,
child: AlertDialog(
title: Text(
"downloading...",
"Downloading...",
style: TextStyle(
fontSize: 16,
),

View file

@ -41,7 +41,7 @@ class GalleryFooterWidget extends StatelessWidget {
routeToPage(
context,
BackupFolderSelectionPage(
buttonText: "preserve",
buttonText: "Preserve",
),
);
}

View file

@ -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<TextStyle>(
(Set<MaterialState> states) {
return Theme.of(context).textTheme.subtitle1;
},
),
),
// fontSize: 16,
onPressed: () async {
showToast("Thank you for signing up!");
Bus.instance.fire(SubscriptionPurchasedEvent());

View file

@ -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<SyncIndicator> {
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<SyncIndicator> {
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)),
],