Add country dropdown selector to login screens of siro_service and siro_admin
This commit is contained in:
@@ -100,7 +100,36 @@ class LoginPage extends StatelessWidget {
|
||||
hint: 'أدخل كلمة المرور',
|
||||
type: TextInputType.visiblePassword,
|
||||
),
|
||||
|
||||
const SizedBox(height: 20),
|
||||
|
||||
Obx(() => Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 4),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.grey.withOpacity(0.08),
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
border: Border.all(color: Colors.grey.withOpacity(0.2)),
|
||||
),
|
||||
child: DropdownButtonHideUnderline(
|
||||
child: DropdownButton<String>(
|
||||
value: controller.selectedCountry.value,
|
||||
icon: const Icon(Icons.arrow_drop_down, color: AppColor.blueColor),
|
||||
isExpanded: true,
|
||||
dropdownColor: Colors.white,
|
||||
style: const TextStyle(color: Colors.black87, fontSize: 16),
|
||||
items: ['Jordan', 'Egypt', 'Syria'].map((String country) {
|
||||
return DropdownMenuItem<String>(
|
||||
value: country,
|
||||
child: Text(country.tr),
|
||||
);
|
||||
}).toList(),
|
||||
onChanged: (String? val) {
|
||||
if (val != null) {
|
||||
controller.changeCountry(val);
|
||||
}
|
||||
},
|
||||
),
|
||||
),
|
||||
)),
|
||||
const SizedBox(height: 40),
|
||||
|
||||
// Login Button
|
||||
|
||||
Reference in New Issue
Block a user