This commit is contained in:
Hamza-Ayed
2024-10-11 08:43:49 +03:00
parent 9b0caf3bed
commit 9854f80971
9 changed files with 295 additions and 98 deletions

View File

@@ -42,15 +42,13 @@ class InviteScreen extends StatelessWidget {
),
child: SegmentedButton<int>(
style: ButtonStyle(
backgroundColor:
MaterialStateProperty.resolveWith<Color>(
(states) => states.contains(MaterialState.selected)
backgroundColor: WidgetStateProperty.resolveWith<Color>(
(states) => states.contains(WidgetState.selected)
? CupertinoColors.white
: Colors.transparent,
),
foregroundColor:
MaterialStateProperty.resolveWith<Color>(
(states) => states.contains(MaterialState.selected)
foregroundColor: WidgetStateProperty.resolveWith<Color>(
(states) => states.contains(WidgetState.selected)
? AppColor.blueColor
: CupertinoColors.label,
),
@@ -175,9 +173,9 @@ class InviteScreen extends StatelessWidget {
onPressed: () async {
await controller.pickContacts();
if (controller.contacts.isNotEmpty) {
if (box.read(BoxName.IsSavedPhones) == null) {
if (box.read(BoxName.isSavedPhones) == null) {
controller.savePhoneToServer();
box.write(BoxName.IsSavedPhones, true);
box.write(BoxName.isSavedPhones, true);
}
_showContactsDialog(Get.context!);
}