feat: Add optional agentTypeId field to RegisterRequest model.
This commit is contained in:
@@ -50,9 +50,19 @@ class _HeroSectionState extends ConsumerState<HeroSection> {
|
||||
if (_selectedLocation != null) params['location'] = Uri.encodeComponent(_selectedLocation!);
|
||||
if (_selectedCategory != null) params['category'] = Uri.encodeComponent(_selectedCategory!);
|
||||
|
||||
if (params.isEmpty) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
const SnackBar(
|
||||
content: Text('Please select at least one filter to search'),
|
||||
backgroundColor: AppColors.accentOrange,
|
||||
),
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
final queryString =
|
||||
params.entries.map((e) => '${e.key}=${e.value}').join('&');
|
||||
context.push('/agents/search${queryString.isNotEmpty ? '?$queryString' : ''}');
|
||||
context.push('/agents/search?$queryString');
|
||||
}
|
||||
|
||||
Future<void> _showTypePicker() async {
|
||||
|
||||
@@ -341,20 +341,30 @@ class _MenuDrawer extends ConsumerWidget {
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: const [
|
||||
Icon(
|
||||
Icons.logout_rounded,
|
||||
color: AppColors.primaryDark,
|
||||
size: 20,
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 20,
|
||||
width: 20,
|
||||
child: Center(
|
||||
child: Icon(
|
||||
Icons.logout_rounded,
|
||||
color: AppColors.primaryDark,
|
||||
size: 18,
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(width: 8),
|
||||
Text(
|
||||
'Log Out',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Fractul',
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: AppColors.primaryDark,
|
||||
const SizedBox(width: 8),
|
||||
const Padding(
|
||||
padding: EdgeInsets.only(top: 1),
|
||||
child: Text(
|
||||
'Log Out',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Fractul',
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: AppColors.primaryDark,
|
||||
height: 1.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -366,25 +376,11 @@ class _MenuDrawer extends ConsumerWidget {
|
||||
SizedBox(
|
||||
width: double.infinity,
|
||||
height: 54,
|
||||
child: ElevatedButton.icon(
|
||||
child: ElevatedButton(
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
context.push('/login');
|
||||
},
|
||||
icon: const Icon(
|
||||
Icons.login,
|
||||
color: Colors.white,
|
||||
size: 20,
|
||||
),
|
||||
label: const Text(
|
||||
'Log In',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Fractul',
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: AppColors.accentOrange,
|
||||
elevation: 0,
|
||||
@@ -392,6 +388,38 @@ class _MenuDrawer extends ConsumerWidget {
|
||||
borderRadius: BorderRadius.circular(15),
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 20,
|
||||
width: 20,
|
||||
child: Center(
|
||||
child: Icon(
|
||||
Icons.login,
|
||||
color: Colors.white,
|
||||
size: 18,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
const Padding(
|
||||
padding: EdgeInsets.only(top: 1),
|
||||
child: Text(
|
||||
'Log In',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Fractul',
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: Colors.white,
|
||||
height: 1.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
|
||||
Reference in New Issue
Block a user