Compare commits
3 Commits
auth-recov
...
look&feel
| Author | SHA1 | Date | |
|---|---|---|---|
| 094aad2d34 | |||
| d30c28f430 | |||
| 577a3709d3 |
@@ -7,6 +7,7 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
import 'package:navigation/navigation.dart';
|
import 'package:navigation/navigation.dart';
|
||||||
import 'package:sf_localizations/sf_localizations.dart';
|
import 'package:sf_localizations/sf_localizations.dart';
|
||||||
|
import 'package:utils/utils.dart';
|
||||||
|
|
||||||
final onboardingPageControllerProvider = Provider.autoDispose<PageController>((
|
final onboardingPageControllerProvider = Provider.autoDispose<PageController>((
|
||||||
ref,
|
ref,
|
||||||
@@ -57,19 +58,22 @@ class OnboardingScreen extends ConsumerWidget {
|
|||||||
image: page.image,
|
image: page.image,
|
||||||
title: page.title,
|
title: page.title,
|
||||||
subtitle: page.subtitle,
|
subtitle: page.subtitle,
|
||||||
|
isLast: isLast,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
SizedBox(height: SizeUtils.getByScreen(small: 36, big: 28)),
|
||||||
StepIndicator(
|
StepIndicator(
|
||||||
current: state.cardIndex + 1,
|
current: state.cardIndex + 1,
|
||||||
total: onboardingPages.length,
|
total: onboardingPages.length,
|
||||||
color: const Color(0xFF4A4A4A),
|
color: const Color(0xFF4A4A4A),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 38),
|
SizedBox(height: SizeUtils.getByScreen(small: 38, big: 38)),
|
||||||
Container(
|
Container(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 24),
|
padding: const EdgeInsets.symmetric(horizontal: 24),
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
|
height: SizeUtils.getByScreen(small: 64, big: 62),
|
||||||
child: TextButton(
|
child: TextButton(
|
||||||
onPressed: goToNext,
|
onPressed: goToNext,
|
||||||
style: TextButton.styleFrom(
|
style: TextButton.styleFrom(
|
||||||
@@ -117,7 +121,7 @@ class OnboardingScreen extends ConsumerWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 48),
|
SizedBox(height: SizeUtils.getByScreen(small: 24, big: 48)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -1,17 +1,20 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_svg/flutter_svg.dart';
|
import 'package:flutter_svg/flutter_svg.dart';
|
||||||
import 'package:sf_localizations/sf_localizations.dart';
|
import 'package:sf_localizations/sf_localizations.dart';
|
||||||
|
import 'package:utils/utils.dart';
|
||||||
|
|
||||||
class OnboardingContent extends StatelessWidget {
|
class OnboardingContent extends StatelessWidget {
|
||||||
final String image;
|
final String image;
|
||||||
final String title;
|
final String title;
|
||||||
final String subtitle;
|
final String subtitle;
|
||||||
|
final bool isLast;
|
||||||
|
|
||||||
const OnboardingContent({
|
const OnboardingContent({
|
||||||
super.key,
|
super.key,
|
||||||
required this.image,
|
required this.image,
|
||||||
required this.title,
|
required this.title,
|
||||||
required this.subtitle,
|
required this.subtitle,
|
||||||
|
required this.isLast,
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -22,13 +25,15 @@ class OnboardingContent extends StatelessWidget {
|
|||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Flexible(flex: 3, child: SvgPicture.asset(image)),
|
Flexible(flex: 3, child: SvgPicture.asset(image)),
|
||||||
const SizedBox(height: 48),
|
isLast
|
||||||
|
? SizedBox(height: SizeUtils.getByScreen(small: 24, big: 48))
|
||||||
|
: SizedBox(height: SizeUtils.getByScreen(small: 48, big: 68)),
|
||||||
Text(
|
Text(
|
||||||
context.translate(title),
|
context.translate(title),
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: const TextStyle(
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.w700,
|
fontWeight: FontWeight.w500,
|
||||||
fontSize: 28,
|
fontSize: SizeUtils.getByScreen(small: 28, big: 28),
|
||||||
height: 1.4,
|
height: 1.4,
|
||||||
letterSpacing: 0.3,
|
letterSpacing: 0.3,
|
||||||
color: Color(0xFF4A4A4A),
|
color: Color(0xFF4A4A4A),
|
||||||
@@ -38,7 +43,7 @@ class OnboardingContent extends StatelessWidget {
|
|||||||
Text(
|
Text(
|
||||||
context.translate(subtitle),
|
context.translate(subtitle),
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: const TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
height: 1.4,
|
height: 1.4,
|
||||||
letterSpacing: 0.3,
|
letterSpacing: 0.3,
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
import 'package:navigation/navigation.dart';
|
import 'package:navigation/navigation.dart';
|
||||||
import 'package:sf_localizations/sf_localizations.dart';
|
import 'package:sf_localizations/sf_localizations.dart';
|
||||||
|
import 'package:utils/utils.dart';
|
||||||
|
|
||||||
class AccountCreatedScreen extends ConsumerWidget {
|
class AccountCreatedScreen extends ConsumerWidget {
|
||||||
final NavigationContract navigationContract;
|
final NavigationContract navigationContract;
|
||||||
@@ -23,68 +24,68 @@ class AccountCreatedScreen extends ConsumerWidget {
|
|||||||
backgroundColor: theme.getColorFor(ThemeCode.backgroundPrimary),
|
backgroundColor: theme.getColorFor(ThemeCode.backgroundPrimary),
|
||||||
body: Container(
|
body: Container(
|
||||||
margin: const EdgeInsets.all(30),
|
margin: const EdgeInsets.all(30),
|
||||||
child: Center(
|
child: Column(
|
||||||
child: Column(
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
const Spacer(flex: 10),
|
Icon(
|
||||||
Icon(
|
Icons.check,
|
||||||
Icons.check,
|
color: theme.getColorFor(ThemeCode.buttonPrimary),
|
||||||
color: theme.getColorFor(ThemeCode.buttonPrimary),
|
size: 50,
|
||||||
size: 50,
|
),
|
||||||
|
const SizedBox(height: 20),
|
||||||
|
Text(
|
||||||
|
context.translate(I18n.accountCreatedTitle),
|
||||||
|
style: const TextStyle(
|
||||||
|
fontSize: 30,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
const SizedBox(height: 20),
|
),
|
||||||
Text(
|
const SizedBox(height: 20),
|
||||||
context.translate(I18n.accountCreatedTitle),
|
|
||||||
style: const TextStyle(
|
|
||||||
fontSize: 30,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 20),
|
|
||||||
|
|
||||||
Text.rich(
|
Text.rich(
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: '${context.translate(I18n.accountCreatedForLabel)}\n',
|
text: '${context.translate(I18n.accountCreatedForLabel)}\n',
|
||||||
children: [
|
style: TextStyle(fontSize: SizeUtils.getByScreen(small: 16, big: 15, xl: 14)),
|
||||||
TextSpan(
|
children: [
|
||||||
text: fullName,
|
TextSpan(
|
||||||
style: const TextStyle(fontWeight: FontWeight.bold),
|
text: fullName,
|
||||||
),
|
style: const TextStyle(fontWeight: FontWeight.bold),
|
||||||
],
|
),
|
||||||
),
|
],
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
|
||||||
const SizedBox(height: 16),
|
SizedBox(height: SizeUtils.getByScreen(small: 40, big: 40)),
|
||||||
Text.rich(
|
Text.rich(
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text:
|
text:
|
||||||
'${context.translate(I18n.accountCreatedEmailVerificationSentLabel)}\n',
|
'${context.translate(I18n.accountCreatedEmailVerificationSentLabel)}\n',
|
||||||
children: [
|
style: TextStyle(fontSize: SizeUtils.getByScreen(small: 15, big: 15, xl: 13)),
|
||||||
TextSpan(
|
children: [
|
||||||
text: email,
|
TextSpan(
|
||||||
style: const TextStyle(fontWeight: FontWeight.bold),
|
text: email,
|
||||||
),
|
style: const TextStyle(fontWeight: FontWeight.bold),
|
||||||
],
|
),
|
||||||
),
|
],
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
|
||||||
const SizedBox(height: 20),
|
SizedBox(height: SizeUtils.getByScreen(small: 40, big: 40)),
|
||||||
Text(
|
Text(
|
||||||
context.translate(I18n.accountCreatedChildSetupHint),
|
context.translate(I18n.accountCreatedChildSetupHint),
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
),
|
style: TextStyle(fontSize: SizeUtils.getByScreen(small: 16, big: 15, xl: 13)),
|
||||||
|
),
|
||||||
|
|
||||||
const SizedBox(height: 20),
|
SizedBox(height: SizeUtils.getByScreen(small: 40, big: 40)),
|
||||||
PrimaryButton(
|
PrimaryButton(
|
||||||
onPressed: () => navigationContract.goTo(AppRoutes.login),
|
onPressed: () => navigationContract.goTo(AppRoutes.login),
|
||||||
text: context.translate(I18n.accountCreatedContinue),
|
text: context.translate(I18n.accountCreatedContinue),
|
||||||
color: theme.getColorFor(ThemeCode.buttonPrimary),
|
color: theme.getColorFor(ThemeCode.buttonPrimary),
|
||||||
),
|
),
|
||||||
const Spacer(flex: 8),
|
],
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user