refactor(add_contact): improve phone list rendering and enhance layout structure

This commit is contained in:
Vaibhav Surve 2025-07-14 10:15:11 +05:30
parent 395444e8fc
commit 07bf9a93aa

View File

@ -521,12 +521,14 @@ class _AddContactBottomSheetState extends State<AddContactBottomSheet> {
return const Center(child: CircularProgressIndicator()); return const Center(child: CircularProgressIndicator());
} }
return SingleChildScrollView( return SafeArea(
child: SingleChildScrollView(
padding: MediaQuery.of(context).viewInsets, padding: MediaQuery.of(context).viewInsets,
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Theme.of(context).cardColor, color: Theme.of(context).cardColor,
borderRadius: const BorderRadius.vertical(top: Radius.circular(24)), borderRadius:
const BorderRadius.vertical(top: Radius.circular(24)),
), ),
child: Padding( child: Padding(
padding: const EdgeInsets.fromLTRB(20, 16, 20, 32), padding: const EdgeInsets.fromLTRB(20, 16, 20, 32),
@ -558,8 +560,6 @@ class _AddContactBottomSheetState extends State<AddContactBottomSheet> {
options: controller.buckets, options: controller.buckets,
), ),
MySpacing.height(24), MySpacing.height(24),
// Toggle for Advanced Section
Obx(() => GestureDetector( Obx(() => GestureDetector(
onTap: () => showAdvanced.toggle(), onTap: () => showAdvanced.toggle(),
child: Row( child: Row(
@ -625,13 +625,14 @@ class _AddContactBottomSheetState extends State<AddContactBottomSheet> {
maxLines: 2), maxLines: 2),
], ],
) )
: SizedBox()), : const SizedBox()),
MySpacing.height(24), MySpacing.height(24),
_buildActionButtons(), _buildActionButtons(),
], ],
), ),
)), ),
),
),
), ),
); );
}); });