fixed build errors

This commit is contained in:
ashilkn 2022-04-21 10:42:18 +05:30
parent 044471eaa1
commit ca6209410b
5 changed files with 49 additions and 16 deletions

View file

@ -83,3 +83,12 @@ ElevatedButtonThemeData buildElevatedButtonThemeData(
),
));
}
TextStyle gradientButtonTextTheme() {
return TextStyle(
color: Colors.white,
fontWeight: FontWeight.w600,
fontFamily: 'Inter-SemiBold',
fontSize: 18,
);
}

View file

@ -22,7 +22,7 @@ class GradientButton extends StatelessWidget {
),
borderRadius: BorderRadius.circular(8),
),
child: child,
child: Center(child: child),
),
);
}

View file

@ -26,11 +26,10 @@ class GalleryFooterWidget extends StatelessWidget {
color: Colors.white,
),
Padding(padding: EdgeInsets.all(6)),
Text("Preserve more",
style: Theme.of(context)
.textTheme
.headline6
.copyWith(color: Colors.white)),
Text(
"Preserve more",
style: gradientButtonTextTheme(),
),
],
),
linearGradientColors: const [

View file

@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:photos/core/configuration.dart';
import 'package:photos/ente_theme_data.dart';
import 'package:photos/ui/common/gradientButton.dart';
import 'package:photos/ui/email_entry_page.dart';
import 'package:photos/ui/login_page.dart';
import 'package:photos/ui/password_entry_page.dart';
@ -122,16 +123,34 @@ class _LandingPageWidgetState extends State<LandingPageWidget> {
Widget _getSignUpButton(BuildContext context) {
return Container(
width: double.infinity,
padding: EdgeInsets.symmetric(horizontal: 24),
child: ElevatedButton(
style: Theme.of(context).colorScheme.primaryActionButtonStyle,
padding: EdgeInsets.symmetric(horizontal: 20),
child: GradientButton(
child: Hero(
tag: "sign_up",
child: Text("New to ente"),
child: Text(
"New to ente",
style: gradientButtonTextTheme(),
),
),
onPressed: _navigateToSignUpPage,
linearGradientColors: const [
Color(0xFF2CD267),
Color(0xFF1DB954),
],
onTap: _navigateToSignUpPage,
),
);
// return Container(
// width: double.infinity,
// padding: EdgeInsets.symmetric(horizontal: 24),
// child: ElevatedButton(
// style: Theme.of(context).colorScheme.primaryActionButtonStyle,
// child: Hero(
// tag: "sign_up",
// child: Text("New to ente"),
// ),
// onPressed: _navigateToSignUpPage,
// ),
//);
}
Widget _getFeatureSlider() {

View file

@ -8,6 +8,7 @@ import 'package:flutter/services.dart';
import 'package:photos/core/configuration.dart';
import 'package:photos/core/constants.dart';
import 'package:photos/ente_theme_data.dart';
import 'package:photos/ui/common/gradientButton.dart';
import 'package:photos/utils/toast_util.dart';
import 'package:share_plus/share_plus.dart';
@ -162,10 +163,16 @@ class _RecoveryKeyPageState extends State<RecoveryKeyPage> {
childrens.add(SizedBox(height: 10));
}
childrens.add(ElevatedButton(
child: Text('Save'),
style: Theme.of(context).colorScheme.primaryActionButtonStyle,
onPressed: () async {
childrens.add(GradientButton(
child: Text(
'Save',
style: gradientButtonTextTheme(),
),
linearGradientColors: const [
Color(0xFF2CD267),
Color(0xFF1DB954),
],
onTap: () async {
await _shareRecoveryKey(recoveryKey);
},
));
@ -173,7 +180,6 @@ class _RecoveryKeyPageState extends State<RecoveryKeyPage> {
childrens.add(SizedBox(height: 10));
childrens.add(ElevatedButton(
child: Text(widget.doneText),
// style: Theme.of(context).colorScheme.primaryActionButtonStyle,
onPressed: () async {
await _saveKeys();
},