UserRoutes class

Route factory for user management Provides clean route builders that client apps can integrate

Constructors

UserRoutes()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

buildCreateUser(BuildContext context, {void onUserCreated(BuildContext, UserPublic)?, Iterable<License>? firmLicenses, bool showLicenseReminder = true}) Widget
buildCreateUserWithCustomScaffold({required PreferredSizeWidget? appBar, required Widget? drawer, required Widget? endDrawer, void onUserCreated(BuildContext, UserPublic)?, Iterable<License>? firmLicenses, bool showLicenseReminder = true}) Widget
buildProviderUserList({required String getUserId(BuildContext)}) Widget
Standalone widget that uses callback to get currentUserId Use this if you want to embed the user list directly in your widget tree
buildUserDetailView(BuildContext context, UserPublic user, UserProvider userProvider, {VoidCallback? onEdit, VoidCallback? onDelete, String? currentUserId, void onPermissionsChanged(UserPublic, UserPermissions)?, Iterable<License>? firmLicenses}) Widget
Build user detail view with proper scaffold and navigation
buildUserList(BuildContext context, {required String currentUserId}) Widget
Widget builders (can be used standalone) Requires currentUserId to be passed for security (prevents self-permission editing)
buildUserListWithCustomScaffold({required String currentUserId, required PreferredSizeWidget? appBar, required Widget? drawer, required Widget? endDrawer, Widget? floatingActionButton, VoidCallback? onCreateUser, void onUserCreated(BuildContext, UserPublic)?, void onPermissionsChanged(UserPublic, UserPermissions)?, Iterable<License>? firmLicenses}) Widget
Custom scaffold builders where client provides the scaffold structure Requires currentUserId to be passed for security (prevents self-permission editing)
getMaterialRoutes({required String currentUserId, void onUserCreated(BuildContext, UserPublic)?, Iterable<License>? firmLicenses, Iterable<License>? firmLicensesForCreate, bool showLicenseReminderOnCreate = true}) Map<String, WidgetBuilder>
Standard Material App routes (English defaults - override for localization) Requires currentUserId to be passed for security (prevents self-permission editing)
getProviderRoutes({required String getUserId(BuildContext), void onUserCreated(BuildContext, UserPublic)?}) Map<String, WidgetBuilder>
Route map that handles user ID retrieval via callback Perfect for apps where userId is available after MaterialApp initialization
Push the create-user form on the nearest Navigator (works with nested navigators; does not require MaterialApp.routes or GoRouter).
Navigation helper for user detail view
onGenerateRoute(RouteSettings settings, {required String currentUserId, void onUserCreated(BuildContext, UserPublic)?, Iterable<License>? firmLicenses, Iterable<License>? firmLicensesForCreate, bool showLicenseReminderOnCreate = true}) Route?
Route builders for custom integration Requires currentUserId to be passed for security (prevents self-permission editing)