Merge pull request #307 from ente-io/style_child_subscription_screen

Style the child subscription screen
This commit is contained in:
Manav 2022-06-13 20:58:45 +05:30 committed by GitHub
commit 8054519b18
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 17 deletions

View file

@ -2,6 +2,9 @@ import 'package:flutter/material.dart';
import 'package:flutter_datetime_picker/flutter_datetime_picker.dart';
extension CustomColorScheme on ColorScheme {
Color get defaultBackgroundColor =>
brightness == Brightness.light ? Colors.white : Colors.black;
Color get defaultTextColor =>
brightness == Brightness.light ? Colors.black : Colors.white;

View file

@ -1,5 +1,4 @@
import 'package:flutter/material.dart';
import 'package:flutter/painting.dart';
import 'package:photos/models/user_details.dart';
import 'package:photos/services/user_service.dart';
import 'package:photos/ui/common/dialogs.dart';
@ -26,15 +25,14 @@ class ChildSubscriptionWidget extends StatelessWidget {
Center(
child: Text(
"You are on a family plan!",
style:
Theme.of(context).textTheme.bodyText1.copyWith(fontSize: 14),
style: Theme.of(context).textTheme.bodyText1,
),
),
Padding(
padding: const EdgeInsets.symmetric(vertical: 8),
),
Padding(
padding: EdgeInsets.symmetric(horizontal: 8),
padding: EdgeInsets.symmetric(horizontal: 16),
child: RichText(
textAlign: TextAlign.center,
text: TextSpan(
@ -47,13 +45,10 @@ class ChildSubscriptionWidget extends StatelessWidget {
style: TextStyle(color: Color.fromRGBO(29, 185, 84, 1)),
),
TextSpan(
text: " to manage your family subscription",
text: " to manage your subscription",
),
],
style: Theme.of(context)
.textTheme
.bodyText1
.copyWith(fontSize: 14),
style: Theme.of(context).textTheme.bodyText1,
),
),
),
@ -74,17 +69,14 @@ class ChildSubscriptionWidget extends StatelessWidget {
borderRadius: BorderRadius.circular(10),
),
padding: EdgeInsets.symmetric(vertical: 18, horizontal: 100),
side: BorderSide(
width: 2,
color: Color.fromRGBO(255, 52, 52, 1),
),
backgroundColor: Colors.red[500],
),
child: Text(
"leave family",
"Leave Family",
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 18,
color: Color.fromRGBO(255, 52, 52, 1),
color: Colors.white, // same for both themes
),
textAlign: TextAlign.center,
),
@ -97,16 +89,21 @@ class ChildSubscriptionWidget extends StatelessWidget {
child: RichText(
textAlign: TextAlign.center,
text: TextSpan(
children: const [
children: [
TextSpan(
text: "Please contact ",
style: Theme.of(context).textTheme.bodyText2,
),
TextSpan(
text: "support@ente.io",
style: TextStyle(color: Color.fromRGBO(29, 185, 84, 1)),
style: Theme.of(context)
.textTheme
.bodyText2
.copyWith(color: Color.fromRGBO(29, 185, 84, 1)),
),
TextSpan(
text: " for help",
style: Theme.of(context).textTheme.bodyText2,
),
],
),