mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
check if title is not empty and remove nullable
This commit is contained in:
@ -155,7 +155,7 @@ class _AddNewUserDialogState extends State<AddNewUserDialog> {
|
|||||||
userId: '',
|
userId: '',
|
||||||
);
|
);
|
||||||
case 2:
|
case 2:
|
||||||
return SpacesAccessView();
|
return const SpacesAccessView();
|
||||||
case 3:
|
case 3:
|
||||||
return const RolesAndPermission();
|
return const RolesAndPermission();
|
||||||
default:
|
default:
|
||||||
|
@ -4,7 +4,6 @@ import 'package:intl_phone_field/countries.dart';
|
|||||||
import 'package:intl_phone_field/country_picker_dialog.dart';
|
import 'package:intl_phone_field/country_picker_dialog.dart';
|
||||||
import 'package:intl_phone_field/intl_phone_field.dart';
|
import 'package:intl_phone_field/intl_phone_field.dart';
|
||||||
import 'package:syncrow_web/pages/roles_and_permission/users_page/add_user_dialog/bloc/users_bloc.dart';
|
import 'package:syncrow_web/pages/roles_and_permission/users_page/add_user_dialog/bloc/users_bloc.dart';
|
||||||
import 'package:syncrow_web/pages/roles_and_permission/users_page/add_user_dialog/bloc/users_event.dart';
|
|
||||||
import 'package:syncrow_web/pages/roles_and_permission/users_page/add_user_dialog/bloc/users_status.dart';
|
import 'package:syncrow_web/pages/roles_and_permission/users_page/add_user_dialog/bloc/users_status.dart';
|
||||||
import 'package:syncrow_web/utils/color_manager.dart';
|
import 'package:syncrow_web/utils/color_manager.dart';
|
||||||
import 'package:syncrow_web/utils/extension/build_context_x.dart';
|
import 'package:syncrow_web/utils/extension/build_context_x.dart';
|
||||||
|
@ -128,7 +128,7 @@ class _PermissionManagementState extends State<PermissionManagement> {
|
|||||||
),
|
),
|
||||||
const SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
Text(
|
Text(
|
||||||
' ${option.title[0].toUpperCase()}${option.title.substring(1)}',
|
' ${option.title.isNotEmpty ? option.title[0].toUpperCase() : ''}${option.title.substring(1)}',
|
||||||
style: context.textTheme.bodyMedium?.copyWith(
|
style: context.textTheme.bodyMedium?.copyWith(
|
||||||
fontWeight: FontWeight.w700,
|
fontWeight: FontWeight.w700,
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
@ -184,7 +184,7 @@ class _PermissionManagementState extends State<PermissionManagement> {
|
|||||||
),
|
),
|
||||||
const SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
Text(
|
Text(
|
||||||
' ${subOption.title[0].toUpperCase()}${subOption.title.substring(1)}',
|
' ${subOption.title.isNotEmpty ? subOption.title[0].toUpperCase() : ''}${subOption.title.substring(1)}',
|
||||||
style: context.textTheme.bodyMedium?.copyWith(
|
style: context.textTheme.bodyMedium?.copyWith(
|
||||||
fontWeight: FontWeight.w700,
|
fontWeight: FontWeight.w700,
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
@ -246,7 +246,7 @@ class _PermissionManagementState extends State<PermissionManagement> {
|
|||||||
),
|
),
|
||||||
const SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
Text(
|
Text(
|
||||||
' ${child.title[0].toUpperCase()}${child.title.substring(1)}',
|
' ${child.title.isNotEmpty ? child.title[0].toUpperCase() : ''}${child.title.substring(1)}',
|
||||||
style: context.textTheme.bodyMedium?.copyWith(
|
style: context.textTheme.bodyMedium?.copyWith(
|
||||||
fontWeight: FontWeight.w400,
|
fontWeight: FontWeight.w400,
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
|
@ -5,8 +5,8 @@ import 'package:syncrow_web/utils/style.dart';
|
|||||||
|
|
||||||
Future<void> showPopUpFilterMenu({
|
Future<void> showPopUpFilterMenu({
|
||||||
required BuildContext context,
|
required BuildContext context,
|
||||||
required Function(String value)? onSortAtoZ,
|
required Function(String value) onSortAtoZ,
|
||||||
required Function(String value)? onSortZtoA,
|
required Function(String value) onSortZtoA,
|
||||||
Function()? cancelButton,
|
Function()? cancelButton,
|
||||||
required Map<String, bool> checkboxStates,
|
required Map<String, bool> checkboxStates,
|
||||||
required RelativeRect position,
|
required RelativeRect position,
|
||||||
@ -35,9 +35,9 @@ Future<void> showPopUpFilterMenu({
|
|||||||
setState(() {
|
setState(() {
|
||||||
if (isSelected == 'Asc') {
|
if (isSelected == 'Asc') {
|
||||||
isSelected = null;
|
isSelected = null;
|
||||||
onSortAtoZ?.call('');
|
onSortAtoZ.call('');
|
||||||
} else {
|
} else {
|
||||||
onSortAtoZ?.call('Asc');
|
onSortAtoZ.call('Asc');
|
||||||
isSelected = 'Asc';
|
isSelected = 'Asc';
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -60,9 +60,9 @@ Future<void> showPopUpFilterMenu({
|
|||||||
setState(() {
|
setState(() {
|
||||||
if (isSelected == 'Desc') {
|
if (isSelected == 'Desc') {
|
||||||
isSelected = null;
|
isSelected = null;
|
||||||
onSortZtoA?.call('');
|
onSortZtoA.call('');
|
||||||
} else {
|
} else {
|
||||||
onSortZtoA?.call('Desc');
|
onSortZtoA.call('Desc');
|
||||||
isSelected = 'Desc';
|
isSelected = 'Desc';
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user