Files
Tanami_App/lib/features/MainScreens/Wallet/presentation/pages/walletScreen.dart
2024-06-04 15:18:05 +05:30

162 lines
6.3 KiB
Dart

import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:tanami_app/core/styles/app_text.dart';
class WalletScreen extends StatefulWidget {
const WalletScreen({super.key});
@override
State<WalletScreen> createState() => _WalletScreenState();
}
class _WalletScreenState extends State<WalletScreen> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
body: CustomScrollView(
slivers: [
SliverAppBar(
elevation: 0,
scrolledUnderElevation: 0,
expandedHeight: 230.0,
automaticallyImplyLeading: false,
snap: false,
pinned: true,
floating: false,
flexibleSpace: LayoutBuilder(
builder: (BuildContext context, BoxConstraints constraints) {
return FlexibleSpaceBar(
titlePadding:
const EdgeInsets.only(left: 30, top: 0, bottom: 15),
background: Stack(
fit: StackFit.expand,
children: [
Image.asset(
'assets/images/wallet_screen/bg.png', // Replace with your image asset
fit: BoxFit.cover,
),
Padding(
padding: const EdgeInsets.only(left: 40.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
AppText.walletTitle,
style: GoogleFonts.dmSans(
color: const Color(0xFF343434),
fontSize: 14.sp,
fontWeight: FontWeight.w700,
),
),
SizedBox(
height: 4.h,
),
Text(
'SAR 178,000',
style: GoogleFonts.dmSans(
color: const Color(0xFF191B1E),
fontSize: 28.sp,
fontWeight: FontWeight.w700,
),
),
],
),
),
],
),
);
}),
backgroundColor: Colors.white,
),
SliverToBoxAdapter(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 18.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Center(
child: Container(
decoration: BoxDecoration(
color: Colors.grey.withOpacity(0.2),
borderRadius:
const BorderRadius.all(Radius.circular(20.0)),
),
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: 40.0, vertical: 10.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Column(
children: [
Container(
decoration: const BoxDecoration(
shape: BoxShape.circle,
color: Colors.black,
),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Image.asset(
'assets/images/wallet_screen/deposit.png',
height: 20.h,
),
),
),
Text(
'Deposit',
style: GoogleFonts.dmSans(
color: const Color(0xFF363636),
fontSize: 12.sp,
fontWeight: FontWeight.w700,
),
),
],
),
VerticalDivider(
color: Colors.black,
width: 20.0,
),
Column(
children: [
Container(
decoration: const BoxDecoration(
shape: BoxShape.circle,
color: Colors.black,
),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Image.asset(
'assets/images/wallet_screen/withdraw.png',
height: 20.h,
),
),
),
Text(
'Withdraw',
style: GoogleFonts.dmSans(
color: const Color(0xFF363636),
fontSize: 12.sp,
fontWeight: FontWeight.w700,
),
),
],
),
],
),
),
),
)
],
),
),
),
],
),
);
}
}