Skip to content

Commit

Permalink
UI changes
Browse files Browse the repository at this point in the history
  • Loading branch information
tuxpizza committed Oct 16, 2024
1 parent 80f10c6 commit e9415af
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 49 deletions.
5 changes: 1 addition & 4 deletions lib/themes/base_theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ final darkBaseTheme = ThemeData.dark(useMaterial3: true).copyWith(
elevatedButtonTheme: ElevatedButtonThemeData(
style: ElevatedButton.styleFrom(
backgroundColor: onOnBackgroundColor,
side: const BorderSide(
width: 1,
color: buttonBorderColor,
),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(30)),
textStyle: const TextStyle(
color: Colors.white,
)),
Expand Down
83 changes: 50 additions & 33 deletions lib/views/initial_setup_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,39 +14,56 @@ class InitialSetupScreen extends AbstractView {
InitialSetupScreen({super.key});
@override
Widget? body(BuildContext context) {
return Column(
children: [
Padding(
padding: const EdgeInsets.symmetric(horizontal: 64.0, vertical: 16),
child: Assets.cakeLanding.lottie()),
Text(L.welcome_to),
const SizedBox(height: 8),
Text(
"Cupcake",
style: Theme.of(context).textTheme.displaySmall,
),
const SizedBox(height: 8),
Text(L.cupcake_slogan),
const Spacer(),
const SizedBox(height: 8),
LongSecondaryButton(
text: L.create_new_wallet,
icon: Icons.add,
onPressed: () => CreateWallet.staticPush(
context,
CreateWalletViewModel(createMethod: CreateMethod.create),
),
),
LongPrimaryButton(
text: L.restore_wallet,
icon: Icons.restore,
onPressed: () => CreateWallet.staticPush(
context,
CreateWalletViewModel(createMethod: CreateMethod.restore),
),
),
],
);
return SafeArea(
minimum: const EdgeInsets.only(bottom: 16),
child: Column(
children: [
Padding(
padding:
const EdgeInsets.symmetric(horizontal: 64.0, vertical: 24),
child: Assets.cakeLanding.lottie()),
Text(L.welcome_to,
style: Theme.of(context).textTheme.displaySmall?.copyWith(
fontSize: 18,
fontWeight: FontWeight.w500,
)),
const SizedBox(height: 8),
Text(
"Cupcake",
style: Theme.of(context).textTheme.displayLarge?.copyWith(
fontSize: 36,
fontWeight: FontWeight.bold,
),
),
//style: Theme.of(context).textTheme.displaySmall,
const SizedBox(height: 8),
Text(
L.cupcake_slogan,
style: Theme.of(context).textTheme.displaySmall?.copyWith(
fontSize: 16,
fontWeight: FontWeight.w500,
),
),
const Spacer(),
const SizedBox(height: 8),
LongSecondaryButton(
text: L.create_new_wallet,
icon: Icons.add,
onPressed: () => CreateWallet.staticPush(
context,
CreateWalletViewModel(createMethod: CreateMethod.create),
),
),
LongPrimaryButton(
text: L.restore_wallet,
icon: Icons.restore,
onPressed: () => CreateWallet.staticPush(
context,
CreateWalletViewModel(createMethod: CreateMethod.restore),
),
),
],
));
}
}

Expand Down
23 changes: 14 additions & 9 deletions lib/views/wallet_home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import 'package:cup_cake/views/barcode_scanner.dart';
import 'package:cup_cake/views/receive.dart';
import 'package:cup_cake/views/widgets/cake_card.dart';
import 'package:cup_cake/views/widgets/drawer_element.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:cup_cake/gen/assets.gen.dart';

Expand All @@ -16,7 +15,7 @@ class WalletHome extends AbstractView {

static Future<void> pushStatic(BuildContext context, CoinWallet coin) async {
await Navigator.of(context).pushReplacement(
CupertinoPageRoute(
MaterialPageRoute(
builder: (BuildContext context) {
return WalletHome(coinWallet: coin);
},
Expand Down Expand Up @@ -70,20 +69,26 @@ class WalletHome extends AbstractView {
Widget? body(BuildContext context) {
return Column(
children: [
const SizedBox(height: 56),
const SizedBox(height: 40),
CakeCard(
child: Row(
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(L.balance),
Text(
L.balance,
style: Theme.of(context)
.textTheme
.displaySmall!
.copyWith(fontSize: 12, fontWeight: FontWeight.w400),
),
Text(
viewModel.balance,
style: Theme.of(context)
.textTheme
.displaySmall!
.copyWith(fontSize: 32),
.copyWith(fontSize: 24, fontWeight: FontWeight.w900),
),
],
),
Expand All @@ -95,7 +100,7 @@ class WalletHome extends AbstractView {
],
)),
CakeCard(
firmPadding: const EdgeInsets.all(8),
firmPadding: const EdgeInsets.all(12),
child: Row(
children: [
Expanded(
Expand All @@ -108,7 +113,7 @@ class WalletHome extends AbstractView {
const Icon(Icons.inbox, size: 35, color: Colors.white),
label: Text(
L.receive,
style: const TextStyle(color: Colors.white, fontSize: 20),
style: const TextStyle(color: Colors.white, fontSize: 18),
),
),
),
Expand All @@ -121,13 +126,13 @@ class WalletHome extends AbstractView {
onPressed: () =>
BarcodeScanner.pushStatic(context, viewModel.wallet),
icon: const Icon(
Icons.qr_code_2,
Icons.qr_code_rounded,
size: 35,
color: Colors.white,
),
label: Text(
L.scan,
style: const TextStyle(color: Colors.white, fontSize: 20),
style: const TextStyle(color: Colors.white, fontSize: 18),
),
),
),
Expand Down
6 changes: 3 additions & 3 deletions lib/views/widgets/cake_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ class CakeCard extends StatelessWidget {
right: 24,
),
this.externalPadding = const EdgeInsets.only(
top: 8,
top: 4,
left: 16.0,
bottom: 8,
bottom: 4,
right: 16,
),
this.firmPadding =
Expand All @@ -31,7 +31,7 @@ class CakeCard extends StatelessWidget {
width: double.maxFinite,
child: Card(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(32.0),
borderRadius: BorderRadius.circular(30.0),
),
child: Padding(
padding: firmPadding,
Expand Down

0 comments on commit e9415af

Please sign in to comment.