mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 15:17:31 +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: '',
|
||||
);
|
||||
case 2:
|
||||
return SpacesAccessView();
|
||||
return const SpacesAccessView();
|
||||
case 3:
|
||||
return const RolesAndPermission();
|
||||
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/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_event.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/extension/build_context_x.dart';
|
||||
|
@ -128,7 +128,7 @@ class _PermissionManagementState extends State<PermissionManagement> {
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
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(
|
||||
fontWeight: FontWeight.w700,
|
||||
fontSize: 12,
|
||||
@ -184,7 +184,7 @@ class _PermissionManagementState extends State<PermissionManagement> {
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
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(
|
||||
fontWeight: FontWeight.w700,
|
||||
fontSize: 12,
|
||||
@ -246,7 +246,7 @@ class _PermissionManagementState extends State<PermissionManagement> {
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
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(
|
||||
fontWeight: FontWeight.w400,
|
||||
fontSize: 12,
|
||||
|
@ -5,8 +5,8 @@ import 'package:syncrow_web/utils/style.dart';
|
||||
|
||||
Future<void> showPopUpFilterMenu({
|
||||
required BuildContext context,
|
||||
required Function(String value)? onSortAtoZ,
|
||||
required Function(String value)? onSortZtoA,
|
||||
required Function(String value) onSortAtoZ,
|
||||
required Function(String value) onSortZtoA,
|
||||
Function()? cancelButton,
|
||||
required Map<String, bool> checkboxStates,
|
||||
required RelativeRect position,
|
||||
@ -35,9 +35,9 @@ Future<void> showPopUpFilterMenu({
|
||||
setState(() {
|
||||
if (isSelected == 'Asc') {
|
||||
isSelected = null;
|
||||
onSortAtoZ?.call('');
|
||||
onSortAtoZ.call('');
|
||||
} else {
|
||||
onSortAtoZ?.call('Asc');
|
||||
onSortAtoZ.call('Asc');
|
||||
isSelected = 'Asc';
|
||||
}
|
||||
});
|
||||
@ -60,9 +60,9 @@ Future<void> showPopUpFilterMenu({
|
||||
setState(() {
|
||||
if (isSelected == 'Desc') {
|
||||
isSelected = null;
|
||||
onSortZtoA?.call('');
|
||||
onSortZtoA.call('');
|
||||
} else {
|
||||
onSortZtoA?.call('Desc');
|
||||
onSortZtoA.call('Desc');
|
||||
isSelected = 'Desc';
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user