Update colors

This commit is contained in:
Vishnu Mohandas 2021-05-12 21:29:07 +05:30
parent e7a6722458
commit 84e22229b5
14 changed files with 127 additions and 164 deletions

View file

@ -35,7 +35,7 @@ final themeData = ThemeData(
fontFamily: 'Ubuntu',
brightness: Brightness.dark,
hintColor: Colors.grey,
accentColor: Color.fromRGBO(45, 194, 98, 1.0),
accentColor: Color.fromRGBO(45, 194, 98, 0.2),
buttonColor: Color.fromRGBO(45, 194, 98, 1.0),
buttonTheme: ButtonThemeData().copyWith(
buttonColor: Color.fromRGBO(45, 194, 98, 1.0),

View file

@ -7,6 +7,7 @@ import 'package:photos/db/files_db.dart';
import 'package:photos/events/backup_folders_updated_event.dart';
import 'package:photos/models/file.dart';
import 'package:photos/ui/collections_gallery_widget.dart';
import 'package:photos/ui/common_elements.dart';
import 'package:photos/ui/loading_widget.dart';
import 'package:photos/ui/thumbnail_widget.dart';
@ -59,27 +60,9 @@ class _BackupFolderSelectionPageState extends State<BackupFolderSelectionPage> {
padding: EdgeInsets.only(left: 60, right: 60),
width: double.infinity,
height: 64,
child: OutlinedButton(
style: OutlinedButton.styleFrom(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
),
padding: EdgeInsets.fromLTRB(50, 16, 50, 16),
side: BorderSide(
width: 2,
color: Theme.of(context).accentColor,
),
),
child: Text(
"preserve",
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 18,
letterSpacing: 1.0,
color: Colors.white,
),
textAlign: TextAlign.center,
),
child: button(
"preserve",
fontSize: 18,
onPressed: _backedupFolders.length == 0
? null
: () {

View file

@ -183,12 +183,12 @@ class _CollectionsGalleryWidgetState extends State<CollectionsGalleryWidget>
),
side: BorderSide(
width: 1,
color: Theme.of(context).accentColor.withOpacity(0.4),
color: Theme.of(context).buttonColor.withOpacity(0.4),
),
),
child: Icon(
Icons.add,
color: Theme.of(context).accentColor.withOpacity(0.7),
color: Theme.of(context).buttonColor.withOpacity(0.7),
),
onPressed: () async {
await showToast(

View file

@ -26,7 +26,7 @@ Widget button(
),
padding: EdgeInsets.fromLTRB(50, 16, 50, 16),
side: BorderSide(
width: 2,
width: onPressed == null ? 1 : 2,
color: onPressed == null
? Colors.grey
: Color.fromRGBO(45, 194, 98, 1.0),

View file

@ -219,7 +219,7 @@ class _EmailEntryPageState extends State<EmailEntryPage> {
padding: EdgeInsets.all(20),
),
_getAgreement(),
Padding(padding: EdgeInsets.all(16)),
Padding(padding: EdgeInsets.all(20)),
Container(
width: double.infinity,
height: 64,

View file

@ -311,7 +311,7 @@ class _LazyLoadingGridViewState extends State<LazyLoadingGridView> {
border: widget.selectedFiles.files.contains(file)
? Border.all(
width: 4.0,
color: Theme.of(context).accentColor,
color: Theme.of(context).buttonColor,
)
: null,
),

View file

@ -1,12 +1,7 @@
import 'dart:async';
import 'package:dots_indicator/dots_indicator.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:photos/core/configuration.dart';
import 'package:photos/core/event_bus.dart';
import 'package:photos/events/subscription_purchased_event.dart';
import 'package:photos/services/billing_service.dart';
import 'package:photos/ui/email_entry_page.dart';
import 'package:photos/ui/login_page.dart';
import 'package:photos/ui/password_entry_page.dart';
@ -21,141 +16,122 @@ class LandingPage extends StatefulWidget {
}
class _LandingPageState extends State<LandingPage> {
StreamSubscription _userAuthEventSubscription;
double _featureIndex = 0;
@override
void initState() {
_userAuthEventSubscription =
Bus.instance.on<SubscriptionPurchasedEvent>().listen((event) {
setState(() {});
});
super.initState();
}
@override
void dispose() {
_userAuthEventSubscription.cancel();
super.dispose();
}
@override
Widget build(BuildContext context) {
var hasConfiguredAccount = Configuration.instance.hasConfiguredAccount();
var hasSubscription = BillingService.instance.getSubscription() != null;
if (hasConfiguredAccount && hasSubscription) {
return Container();
} else {
return _getBody(context);
}
return Scaffold(body: _getBody(), resizeToAvoidBottomInset: false);
}
Widget _getBody(BuildContext context) {
return Container(
padding: EdgeInsets.fromLTRB(8, 40, 8, 8),
child: Column(
children: [
Text.rich(
TextSpan(
children: <TextSpan>[
TextSpan(
text: "with ",
style: TextStyle(
fontSize: 16,
Widget _getBody() {
return SingleChildScrollView(
physics: NeverScrollableScrollPhysics(),
child: Container(
padding: EdgeInsets.fromLTRB(8, 40, 8, 8),
child: Column(
children: [
Text.rich(
TextSpan(
children: <TextSpan>[
TextSpan(
text: "with ",
style: TextStyle(
fontSize: 16,
),
),
),
TextSpan(
text: "ente",
style: TextStyle(
fontWeight: FontWeight.bold,
fontFamily: 'Montserrat',
fontSize: 16,
TextSpan(
text: "ente",
style: TextStyle(
fontWeight: FontWeight.bold,
fontFamily: 'Montserrat',
fontSize: 16,
),
),
),
],
],
),
textAlign: TextAlign.center,
),
textAlign: TextAlign.center,
),
Padding(
padding: EdgeInsets.all(2),
),
Text.rich(
TextSpan(
children: <TextSpan>[
TextSpan(
text: "your ",
style: TextStyle(
fontSize: 16,
),
),
TextSpan(
text: "memories",
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 16,
),
),
TextSpan(
text: " are",
style: TextStyle(
fontSize: 16,
),
),
],
Padding(
padding: EdgeInsets.all(2),
),
textAlign: TextAlign.center,
),
Padding(
padding: EdgeInsets.all(24),
),
_getFeatureSlider(),
new DotsIndicator(
dotsCount: 3,
position: _featureIndex,
decorator: DotsDecorator(
color: Colors.white24, // Inactive color
activeColor: Theme.of(context).buttonColor,
Text.rich(
TextSpan(
children: <TextSpan>[
TextSpan(
text: "your ",
style: TextStyle(
fontSize: 16,
),
),
TextSpan(
text: "memories",
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 16,
),
),
TextSpan(
text: " are",
style: TextStyle(
fontSize: 16,
),
),
],
),
textAlign: TextAlign.center,
),
),
Padding(
padding: EdgeInsets.all(28),
),
_getSignUpButton(context),
Padding(
padding: EdgeInsets.all(4),
),
GestureDetector(
behavior: HitTestBehavior.translucent,
child: Container(
width: double.infinity,
Padding(
padding: EdgeInsets.all(24),
),
_getFeatureSlider(),
new DotsIndicator(
dotsCount: 3,
position: _featureIndex,
decorator: DotsDecorator(
color: Colors.white24, // Inactive color
activeColor: Theme.of(context).buttonColor,
),
),
Padding(
padding: EdgeInsets.all(28),
child: Center(
child: Hero(
tag: "sign_in",
child: Material(
type: MaterialType.transparency,
child: Text(
"sign in",
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 16,
letterSpacing: 0.6,
),
_getSignUpButton(context),
Padding(
padding: EdgeInsets.all(4),
),
GestureDetector(
behavior: HitTestBehavior.translucent,
child: Container(
width: double.infinity,
padding: EdgeInsets.all(28),
child: Center(
child: Hero(
tag: "sign_in",
child: Material(
type: MaterialType.transparency,
child: Text(
"sign in",
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 16,
letterSpacing: 0.6,
),
),
),
),
),
),
onTap: _navigateToSignInPage,
),
onTap: _navigateToSignInPage,
),
Padding(
padding: EdgeInsets.all(4),
),
Divider(
height: 1,
color: Theme.of(context).buttonColor.withOpacity(0.5),
),
],
Padding(
padding: EdgeInsets.all(4),
),
Divider(
height: 1,
color: Theme.of(context).buttonColor.withOpacity(0.5),
),
],
),
),
);
}
@ -173,7 +149,7 @@ class _LandingPageState extends State<LandingPage> {
padding: EdgeInsets.fromLTRB(50, 16, 50, 16),
side: BorderSide(
width: 2,
color: Theme.of(context).accentColor,
color: Theme.of(context).buttonColor,
),
),
child: Hero(
@ -196,7 +172,8 @@ class _LandingPageState extends State<LandingPage> {
}
Widget _getFeatureSlider() {
return Expanded(
return ConstrainedBox(
constraints: BoxConstraints(maxHeight: 320),
child: PageView(
children: [
_getProtectedFeature(),

View file

@ -162,7 +162,7 @@ class MemoryWidget extends StatelessWidget {
border: isSeen
? Border()
: Border.all(
color: Theme.of(context).accentColor,
color: Theme.of(context).buttonColor,
width: isSeen ? 0 : 2,
),
borderRadius: BorderRadius.circular(40),

View file

@ -44,7 +44,7 @@ class _OTTVerificationPageState extends State<OTTVerificationPage> {
Text(
Configuration.instance.getEmail(),
style: TextStyle(
color: Theme.of(context).accentColor,
color: Theme.of(context).buttonColor,
fontSize: 18,
),
),
@ -73,6 +73,9 @@ class _OTTVerificationPageState extends State<OTTVerificationPage> {
},
),
),
Padding(
padding: EdgeInsets.all(12),
),
Container(
padding: const EdgeInsets.fromLTRB(60, 0, 60, 0),
width: double.infinity,

View file

@ -16,7 +16,7 @@ class SettingsSectionTitle extends StatelessWidget {
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 16,
color: Theme.of(context).accentColor,
color: Theme.of(context).buttonColor,
),
),
),

View file

@ -174,7 +174,7 @@ class _SharedCollectionGalleryState extends State<SharedCollectionGallery>
padding: EdgeInsets.fromLTRB(50, 16, 50, 16),
side: BorderSide(
width: 1,
color: Theme.of(context).accentColor.withOpacity(0.4),
color: Theme.of(context).buttonColor.withOpacity(0.4),
),
),
child: Row(
@ -224,7 +224,7 @@ class _SharedCollectionGalleryState extends State<SharedCollectionGallery>
padding: EdgeInsets.fromLTRB(50, 16, 50, 16),
side: BorderSide(
width: 1,
color: Theme.of(context).accentColor.withOpacity(0.4),
color: Theme.of(context).buttonColor.withOpacity(0.4),
),
),
child: Row(
@ -393,7 +393,7 @@ class IncomingCollectionItem extends StatelessWidget {
margin: EdgeInsets.fromLTRB(0, 0, 4, 0),
decoration: BoxDecoration(
shape: BoxShape.circle,
color: Theme.of(context).accentColor,
color: Theme.of(context).buttonColor,
),
),
),

View file

@ -542,7 +542,7 @@ class FaqWidget extends StatelessWidget {
Widget build(BuildContext context) {
return ExpansionCard(
title: Text(faq.q),
color: Theme.of(context).accentColor,
color: Theme.of(context).buttonColor,
children: [
Padding(
padding: const EdgeInsets.only(left: 16, right: 16),
@ -664,7 +664,7 @@ class SubscriptionPlanWidget extends StatelessWidget {
? Expanded(
child: Icon(
Icons.check_circle,
color: Theme.of(context).accentColor,
color: Theme.of(context).buttonColor,
),
)
: Container(),

View file

@ -67,7 +67,7 @@ class _SyncIndicatorState extends State<SyncIndicator> {
final icon = _event.status == SyncStatus.completed_backup
? Icon(
Icons.cloud_done_outlined,
color: Theme.of(context).accentColor,
color: Theme.of(context).buttonColor,
)
: _inProgressIcon;
return AnimatedContainer(
@ -118,7 +118,7 @@ class _SyncIndicatorState extends State<SyncIndicator> {
children: [
Icon(
Icons.error_outline,
color: Theme.of(context).accentColor,
color: Theme.of(context).buttonColor,
),
Padding(padding: EdgeInsets.all(4)),
Text("your subscription has expired"),
@ -154,7 +154,7 @@ class _SyncIndicatorState extends State<SyncIndicator> {
children: [
Icon(
Icons.error_outline,
color: Theme.of(context).accentColor,
color: Theme.of(context).buttonColor,
),
Padding(padding: EdgeInsets.all(4)),
Text("storage limit exceeded"),
@ -189,7 +189,7 @@ class _SyncIndicatorState extends State<SyncIndicator> {
children: [
Icon(
Icons.error_outline,
color: Theme.of(context).accentColor,
color: Theme.of(context).buttonColor,
),
Padding(padding: EdgeInsets.all(4)),
Text(_event.reason ?? "upload failed"),

View file

@ -288,7 +288,7 @@ class _VideoControlsState extends State<VideoControls> {
},
colors: chewieController.materialProgressColors ??
ChewieProgressColors(
playedColor: Theme.of(context).accentColor,
playedColor: Theme.of(context).buttonColor,
handleColor: Colors.white,
bufferedColor: Colors.white,
backgroundColor: Theme.of(context).disabledColor),