fix(bugs): prevent redundant API calls on PieChart interaction in DeviceManagerPage

This commit is contained in:
anhtunz
2025-01-13 10:11:26 +07:00
parent a17831d0ac
commit 408c92d843
5 changed files with 44 additions and 52 deletions

View File

@@ -52,8 +52,10 @@ class _SettingsScreenState extends State<SettingsScreen> {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
CircleAvatar(
backgroundColor: Theme.of(context).focusColor,
radius: 70,
child: CircleAvatar(
backgroundColor: Theme.of(context).highlightColor,
radius: 60,
child: CircleAvatar(
radius: 50,
@@ -61,7 +63,9 @@ class _SettingsScreenState extends State<SettingsScreen> {
getAvatarContent(
userSnapshot.data?.username ?? ""),
style: const TextStyle(
fontSize: 35, fontWeight: FontWeight.bold),
fontSize: 35,
fontWeight: FontWeight.bold,
),
),
),
),
@@ -121,6 +125,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
}
},
child: Card(
color: Theme.of(context).colorScheme.onInverseSurface,
margin: const EdgeInsets.only(left: 35, right: 35, bottom: 10),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(30)),
child: ListTile(