LifeMate — Personal, Family & Learning Companion
fix: satisfy Flutter analyzer
davoodmehraban89 committed
Oct 5, 2026 at 07:56 UTC
e003cbe53172a2f05c3624f94fab1ddac12e473d
1 file changed
+7
-3
apps/lifemate/lib/main.dart
+7
-3
@@ -472,7 +472,9 @@ class _ProfileFamilyPageState extends State<ProfileFamilyPage> {
472
onPressed: () async {
473
if (name.text.trim().isEmpty) return;
474
await widget.api.createFamily(name.text.trim(), role: 'parent_guardian');
475
- if (dialogContext.mounted) Navigator.pop(dialogContext, true);
475
+ if (dialogContext.mounted) {
476
+ Navigator.pop(dialogContext, true);
477
+ }
478
},
479
child: const Text('ساخت'),
480
),
@@ -502,7 +504,7 @@ class _ProfileFamilyPageState extends State<ProfileFamilyPage> {
504
ValueListenableBuilder<String>(
505
valueListenable: choice,
506
builder: (_, value, __) => DropdownButtonFormField<String>(
505
- value: value,
507
+ initialValue: value,
508
decoration: const InputDecoration(labelText: 'نوع عضو'),
509
items: const [
510
DropdownMenuItem(value: 'daughter', child: Text('فرزند دختر — سفید / صورتی')),
@@ -511,7 +513,9 @@ class _ProfileFamilyPageState extends State<ProfileFamilyPage> {
513
DropdownMenuItem(value: 'adult', child: Text('عضو بزرگسال — سفید / آبی')),
514
],
515
onChanged: (v) {
514
- if (v != null) choice.value = v;
516
+ if (v != null) {
517
+ choice.value = v;
518
+ }
519
},
520
),
521
),