No title
0
December 15, 2025
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: const UserProfileScreen(),
);
}
}
class UserProfileScreen extends StatefulWidget {
const UserProfileScreen({super.key});
@override
State createState() => _UserProfileScreenState();
}
class _UserProfileScreenState extends State {
// ------------------------------------------
// আপনার কাঙ্ক্ষিত UID এখানে পরিবর্তন করুন
final String uid = "1587086";
// ------------------------------------------
final String username = "MEMBERNNGZSNSW";
final String balance = "100.07";
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: const Color(0xFFF5F5F5), // হালকা ছাই ব্যাকগ্রাউন্ড
body: SingleChildScrollView(
child: Column(
children: [
// ১. উপরের হলুদ অংশ (Header)
_buildHeader(),
// ২. ব্যালেন্স কার্ড এবং বাটন
Transform.translate(
offset: const Offset(0, -40), // কার্ডটি একটু উপরে উঠানোর জন্য
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16.0),
child: Column(
children: [
_buildBalanceCard(),
const SizedBox(height: 12),
_buildSafeCard(),
const SizedBox(height: 12),
_buildMenuGrid(),
const SizedBox(height: 12),
_buildNotificationBar(),
],
),
),
),
],
),
),
bottomNavigationBar: _buildBottomNavBar(),
);
}
// হেডারের ডিজাইন (হলুদ অংশ)
Widget _buildHeader() {
return Container(
width: double.infinity,
height: 220,
padding: const EdgeInsets.only(top: 50, left: 20, right: 20),
decoration: const BoxDecoration(
color: Color(0xFFF4D144), // স্ক্রিনশটের মতো হলুদ রঙ
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// প্রোফাইল ছবি
const CircleAvatar(
radius: 30,
backgroundImage: NetworkImage('https://i.pravatar.cc/150?img=5'), // ডামি ছবি
),
const SizedBox(width: 15),
// নাম এবং UID
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Text(
username,
style: const TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
fontSize: 16,
),
),
const SizedBox(width: 5),
Container(
padding: const EdgeInsets.symmetric(horizontal: 6, vertical: 2),
decoration: BoxDecoration(
color: Colors.white.withOpacity(0.3),
borderRadius: BorderRadius.circular(10),
),
child: const Text("VIP 1", style: TextStyle(color: Colors.white, fontSize: 10)),
)
],
),
const SizedBox(height: 5),
Row(
children: [
Text(
"UID $uid", // এখানে আপনার সেট করা UID দেখাবে
style: const TextStyle(color: Colors.white, fontSize: 14),
),
const SizedBox(width: 5),
const Icon(Icons.copy, color: Colors.white, size: 14),
],
),
const SizedBox(height: 5),
const Text(
"Last login: 2025-05-29 08:04:25",
style: TextStyle(color: Colors.white70, fontSize: 10),
),
],
),
],
),
);
}
// ব্যালেন্স কার্ড ডিজাইন
Widget _buildBalanceCard() {
return Container(
padding: const EdgeInsets.all(16),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(15),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Text("Total balance", style: TextStyle(color: Colors.grey)),
const SizedBox(height: 5),
Row(
children: [
Text(
"৳$balance",
style: const TextStyle(fontSize: 24, fontWeight: FontWeight.bold),
),
const SizedBox(width: 10),
const Icon(Icons.refresh, size: 20, color: Colors.grey),
],
),
const SizedBox(height: 20),
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
_iconButton(Icons.account_balance_wallet, "Wallet", Colors.pinkAccent),
_iconButton(Icons.download, "Deposit", Colors.orange),
_iconButton(Icons.upload, "Withdraw", Colors.blue),
_iconButton(Icons.verified, "VIP", Colors.green),
],
)
],
),
);
}
// সেফ বা ভল্ট সেকশন
Widget _buildSafeCard() {
return Container(
padding: const EdgeInsets.all(12),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(12),
),
child: Row(
children: [
Container(
padding: const EdgeInsets.all(8),
decoration: BoxDecoration(color: Colors.orange[100], borderRadius: BorderRadius.circular(8)),
child: const Icon(Icons.security, color: Colors.orange),
),
const SizedBox(width: 10),
const Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("Safe", style: TextStyle(fontWeight: FontWeight.bold)),
Text(
"The daily interest rate is 0.1%...",
style: TextStyle(fontSize: 10, color: Colors.grey),
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
],
),
),
Container(
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
decoration: BoxDecoration(color: Colors.orange, borderRadius: BorderRadius.circular(20)),
child: const Text("৳0.00 >", style: TextStyle(color: Colors.white, fontSize: 12)),
)
],
),
);
}
// মেনু গ্রিড (Game History, Transaction etc.)
Widget _buildMenuGrid() {
return Column(
children: [
Row(
children: [
Expanded(child: _menuItem(Icons.list_alt, "Game History", "My game history", Colors.blue)),
const SizedBox(width: 10),
Expanded(child: _menuItem(Icons.receipt_long, "Transaction", "My transaction history", Colors.green)),
],
),
const SizedBox(height: 10),
Row(
children: [
Expanded(child: _menuItem(Icons.history, "Deposit", "My deposit history", Colors.redAccent)),
const SizedBox(width: 10),
Expanded(child: _menuItem(Icons.outbox, "Withdraw", "My withdraw history", Colors.orangeAccent)),
],
),
],
);
}
// ছোট বাটন তৈরির হেল্পার ফাংশন
Widget _iconButton(IconData icon, String label, Color color) {
return Column(
children: [
Icon(icon, color: color, size: 28),
const SizedBox(height: 5),
Text(label, style: const TextStyle(fontSize: 12)),
],
);
}
// মেনু আইটেম তৈরির হেল্পার
Widget _menuItem(IconData icon, String title, String subtitle, Color color) {
return Container(
padding: const EdgeInsets.all(12),
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(10)),
child: Row(
children: [
Icon(icon, color: color, size: 30),
const SizedBox(width: 10),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(title, style: const TextStyle(fontWeight: FontWeight.bold, fontSize: 13)),
Text(subtitle, style: const TextStyle(color: Colors.grey, fontSize: 10)),
],
)
],
),
);
}
// নোটিফিকেশন বার
Widget _buildNotificationBar(){
return Container(
padding: const EdgeInsets.all(12),
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(10)),
child: const Row(
children: [
Icon(Icons.email, color: Colors.orange),
SizedBox(width: 10),
Text("Notification"),
Spacer(),
CircleAvatar(radius: 10, backgroundColor: Colors.red, child: Text("2", style: TextStyle(fontSize: 10, color: Colors.white))),
Icon(Icons.chevron_right, color: Colors.grey)
],
),
);
}
// নিচের নেভিগেশন বার
Widget _buildBottomNavBar() {
return BottomNavigationBar(
type: BottomNavigationBarType.fixed,
selectedItemColor: Colors.orange,
unselectedItemColor: Colors.grey,
currentIndex: 4, // Account ট্যাব সিলেক্ট করা আছে
items: const [
BottomNavigationBarItem(icon: Icon(Icons.home), label: "Home"),
BottomNavigationBarItem(icon: Icon(Icons.local_activity), label: "Activity"),
BottomNavigationBarItem(icon: CircleAvatar(backgroundColor: Colors.orange, child: Icon(Icons.diamond, color: Colors.white)), label: ""),
BottomNavigationBarItem(icon: Icon(Icons.wallet), label: "Wallet"),
BottomNavigationBarItem(icon: Icon(Icons.person), label: "Account"),
],
);
}
}
