SteamCloudGame/lib/tools/me/property/property_page.dart
2024-11-24 15:06:52 +08:00

173 lines
5.6 KiB
Dart

import 'package:flutter/material.dart';
import 'package:game/network/NetworkConfig.dart';
class PropertyPage extends StatefulWidget {
const PropertyPage({super.key});
@override
State<PropertyPage> createState() => _PropertyPageState();
}
class _PropertyPageState extends State<PropertyPage> {
@override
Widget build(BuildContext context) {
final size = MediaQuery.of(context).size;
final h50 = size.width / 7.2;
final s16 = size.width / 22.5;
final l14 = size.width / 25.71428571428571;
final w19 = size.width / 18.94736842105263;
final h26 = size.width / 13.84615384615385;
final h80 = size.width / 4.5;
final t20 = size.width / 18;
final l18 = size.width / 20;
final l16 = size.width / 22.5;
final t34 = size.width / 10.58823529411765;
final s29 = size.width / 12.41379310344828;
final h60 = size.width / 6;
final t18 = size.width / 20;
final l15 = size.width / 24;
final r23 = size.width / 15.65217391304348;
return Scaffold(
backgroundColor: const Color(0xFF17181A),
body: Column(
children: [
Container(
width: size.width,
height: h50,
margin: EdgeInsets.only(top: MediaQuery.of(context).padding.top),
child: Stack(
alignment: Alignment.center,
children: [
Text(
"我的资产",
style: TextStyle(fontSize: s16, color: const Color(0xFFD6D6D7)),
),
Positioned(
left: l14,
child: GestureDetector(
onTap: () {
Navigator.pop(context);
},
child: Image(
width: w19,
height: h26,
image: const AssetImage('assets/images/btn_fanhui.png'),
),
),
)
],
),
),
///钻石数量
Container(
width: size.width,
height: h80,
margin: EdgeInsets.only(left: l14, right: l14, top: t20),
decoration: const BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(11)),
gradient: LinearGradient(
begin: Alignment.centerLeft,
end: Alignment.centerRight,
colors: [
Color(0xFF0978FF),
Color(0xFF39ADFE),
],
),
),
child: Stack(
children: [
Positioned(
left: l18,
top: l16,
child: const Text(
"当前钻石数量",
style: TextStyle(fontSize: 11, color: Color(0xFFE2F3FF)),
)),
Positioned(
left: l18,
top: t34,
child: Text(
"${NetworkConfig.userInfoBean?.diamond}",
style: TextStyle(fontSize: s29, color: Colors.white),
)),
],
),
),
///资产收入
GestureDetector(
onTap: () {
Navigator.pushNamed(context, "/IncomePage");
},
child: Container(
height: h60,
margin: EdgeInsets.only(top: t18, left: l15, right: l15),
decoration: const BoxDecoration(
color: Color(0xFF202530),
borderRadius: BorderRadius.all(Radius.circular(11)),
),
child: Row(
children: [
Container(
margin: EdgeInsets.only(left: l14),
child: const Text(
"资产收入",
style: TextStyle(fontSize: 14, color: Color(0xFFD6D6D7)),
),
),
Expanded(child: Container()),
Container(
margin: EdgeInsets.only(right: r23),
child: const Image(
width: 4,
height: 8,
image: AssetImage('assets/images/ic_arrow.png'),
),
),
],
),
),
),
///资产支出
GestureDetector(
onTap: () {
Navigator.pushNamed(context, "/ExpensesPage");
},
child: Container(
height: h60,
margin: EdgeInsets.only(top: t18, left: l15, right: l15),
decoration: const BoxDecoration(
color: Color(0xFF202530),
borderRadius: BorderRadius.all(Radius.circular(11)),
),
child: Row(
children: [
Container(
margin: EdgeInsets.only(left: l14),
child: const Text(
"资产支出",
style: TextStyle(fontSize: 14, color: Color(0xFFD6D6D7)),
),
),
Expanded(child: Container()),
Container(
margin: EdgeInsets.only(right: r23),
child: const Image(
width: 4,
height: 8,
image: AssetImage('assets/images/ic_arrow.png'),
),
),
],
),
),
),
],
),
);
}
}