Add Cake Phone products Screen

This commit is contained in:
OmarHatem28 2022-07-01 16:24:44 +02:00
parent e03b7aec3c
commit 2ed6700b48
5 changed files with 115 additions and 2 deletions

View file

@ -66,6 +66,7 @@ import 'package:cake_wallet/src/screens/dashboard/widgets/address_page.dart';
import 'package:cake_wallet/src/screens/receive/fullscreen_qr_page.dart';
import 'package:cake_wallet/src/screens/cake_phone/cake_phone_welcome_page.dart';
import 'package:cake_wallet/src/screens/cake_phone/cake_phone_verification_page.dart';
import 'package:cake_wallet/src/screens/cake_phone/cake_phone_products_page.dart';
RouteSettings currentRouteSettings;
@ -421,6 +422,11 @@ Route<dynamic> createRoute(RouteSettings settings) {
builder: (_) => CakePhoneVerificationPage(),
);
case Routes.cakePhoneProducts:
return MaterialPageRoute<CakePhoneProductsPage>(
builder: (_) => CakePhoneProductsPage(),
);
default:
return MaterialPageRoute<void>(
builder: (_) => Scaffold(

View file

@ -63,4 +63,5 @@ class Routes {
static const cakePhoneWelcome = '/cake_phone_welcome';
static const cakePhoneAuth = '/cake_phone_auth';
static const cakePhoneVerification = '/cake_phone_verification';
static const cakePhoneProducts = '/cake_phone_products';
}

View file

@ -0,0 +1,100 @@
import 'package:cake_wallet/routes.dart';
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'package:cake_wallet/generated/i18n.dart';
import 'package:cake_wallet/src/screens/base_page.dart';
class CakePhoneProductsPage extends BasePage {
CakePhoneProductsPage();
@override
Widget body(BuildContext context) => CakePhoneProductsBody();
@override
Widget middle(BuildContext context) {
return Text(
S.of(context).get_phone_number,
style: TextStyle(
fontSize: 22,
fontWeight: FontWeight.w600,
fontFamily: 'Lato',
color: titleColor ?? Theme.of(context).primaryTextTheme.title.color),
);
}
}
class CakePhoneProductsBody extends StatefulWidget {
CakePhoneProductsBody();
@override
CakePhoneProductsBodyState createState() => CakePhoneProductsBodyState();
}
class CakePhoneProductsBodyState extends State<CakePhoneProductsBody> {
@override
Widget build(BuildContext context) {
return Container(
padding: EdgeInsets.only(top: 16),
child: SingleChildScrollView(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 24, vertical: 20),
child: Column(
children: [
Text(
S.of(context).choose_phone_products,
style: TextStyle(
fontSize: 16,
color: Theme.of(context).primaryTextTheme.title.color,
fontFamily: 'Lato',
),
),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(24)),
gradient: LinearGradient(
colors: [
Theme.of(context).primaryTextTheme.subhead.color,
Theme.of(context).primaryTextTheme.subhead.decorationColor,
],
begin: Alignment.topLeft,
end: Alignment.bottomRight,
),
),
padding: const EdgeInsets.all(24),
margin: const EdgeInsets.only(top: 16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.only(bottom: 16),
child: Text(
S.of(context).phone_number,
style: TextStyle(
fontSize: 32,
fontWeight: FontWeight.w700,
color: Colors.white,
),
),
),
Padding(
padding: const EdgeInsets.only(bottom: 60),
child: Text(
S.of(context).phone_number_product_description,
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w600,
color: Colors.white,
),
),
),
],
),
),
],
),
),
),
);
}
}

View file

@ -122,7 +122,9 @@ class CakePhoneVerificationBodyState extends State<CakePhoneVerificationBody> {
bottomSection: Column(
children: <Widget>[
PrimaryButton(
onPressed: () {},
onPressed: () {
Navigator.pushNamed(context, Routes.cakePhoneProducts);
},
text: S.of(context).continue_text,
color: Theme.of(context).accentTextTheme.body2.color,
textColor: Colors.white,

View file

@ -551,5 +551,9 @@
"did_not_get_code": "Didn't get the code?",
"resend_code_in": "Resend code in",
"get_code": "Get Code",
"cake_phone_introduction": "Cake Phone allows you to purchase virtual phone numbers with digital assets!\n\nOnly an email is required."
"cake_phone_introduction": "Cake Phone allows you to purchase virtual phone numbers with digital assets!\n\nOnly an email is required.",
"get_phone_number": "Get Phone Number",
"choose_phone_products": "Choose from the following available options:",
"phone_number": "Phone Number",
"phone_number_product_description": "SMS messages are forwarded to your email address. Includes 20 free SMS messages for each month of service with the option to pay for more."
}