before refactor

This commit is contained in:
sewmina7@gmail.com 2024-07-18 11:51:18 +05:30
parent 8dca98f646
commit e3aced3023

View File

@ -645,37 +645,6 @@ class _HomePageState extends State<HomePage> {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
GlassCard(
color: Colors.green,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Row(
children: [
Text("My Stats",
style:
TextStyle(color: Colors.blueGrey)),
SizedBox(
width: 50,
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
"Kills : ${myStatsForSelectedGame['kills']}"),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
"Deaths : ${myStatsForSelectedGame['deaths']}"),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
"Assist : ${myStatsForSelectedGame['assists']}"),
),
],
),
),
),
Row(
children: [
ActionButton,
@ -697,8 +666,41 @@ class _HomePageState extends State<HomePage> {
}).toList();
},
),
],
)
),
GlassCard(
color: Colors.green,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Row(
children: [
Text("My Stats",
style:
TextStyle(color: Colors.blueGrey)),
SizedBox(
width: 50,
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
"Kills : ${(myStatsForSelectedGame['kills'] ?? "0")}"),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
"Deaths : ${(myStatsForSelectedGame['deaths'] ?? "0")}"),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
"Assist : ${(myStatsForSelectedGame['assists'] ?? "0")}"),
),
],
),
),
),
],
),
),
@ -707,6 +709,46 @@ class _HomePageState extends State<HomePage> {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Padding(
padding: const EdgeInsets.all(20.0),
child: GlassCard(
child: Container(
padding: EdgeInsets.symmetric(horizontal: 10),
width: 350,
child: Column(
children: [
Padding(
padding: const EdgeInsets.symmetric(
vertical: 12.0, horizontal: 20),
child: Text(
"News",
style: TextStyle(fontSize: 20),
),
),
Expanded(
child: SingleChildScrollView(
child: Column(
children: List.generate(
newsForSelectedGame.length,
(index) {
return NewsCard(
newsForSelectedGame[index]
['title'],
newsForSelectedGame[index]
['message']);
}),
),
),
)
],
),
)),
),
SizedBox(
width: 50,
),
SingleChildScrollView(
scrollDirection: Axis.vertical,
child: Column(
@ -746,44 +788,6 @@ class _HomePageState extends State<HomePage> {
],
),
),
SizedBox(
width: 50,
),
Padding(
padding: const EdgeInsets.all(20.0),
child: GlassCard(
child: Container(
padding: EdgeInsets.symmetric(horizontal: 10),
width: 350,
child: Column(
children: [
Padding(
padding: const EdgeInsets.symmetric(
vertical: 12.0, horizontal: 20),
child: Text(
"News",
style: TextStyle(fontSize: 20),
),
),
Expanded(
child: SingleChildScrollView(
child: Column(
children: List.generate(
newsForSelectedGame.length,
(index) {
return NewsCard(
newsForSelectedGame[index]
['title'],
newsForSelectedGame[index]
['message']);
}),
),
),
)
],
),
)),
)
],
))
],