LedgerAccount class

Who the app belongs to, as its chrome shows them: the initials in the avatar, the name and the quiet meta line ("Member since 2023") at the sidebar's foot, the unread count the bell wears, and where the avatar (onProfilePressed) and the bell (onNotificationsPressed) lead. The app mounts one LedgerAccountScope above its router; the top bars and the sidebar read it, so no page passes the person around. profileLocation is the profile page's path: the sidebar's foot is current there (a :name segment stands for any one, so '/:root/profile' is the profile pushed on any root). notificationsLocation is the bell's page, where the sidebar marks nothing current, as the source's notifications do. searchHint and onSearchPressed are the app's search, which the desktop's masthead offers beside the bell.

LedgerAccount(name: 'Maren Holt', initials: 'MH', meta: 'Since Mar 2023', unread: 2, onProfilePressed: (context) => open('/profile'))
Annotations

Constructors

LedgerAccount({required String name, required String initials, String? meta, int unread = 0, void onProfilePressed(BuildContext context)?, void onNotificationsPressed(BuildContext context)?, String? profileLocation, String? notificationsLocation, String? searchHint, void onSearchPressed(BuildContext context)?})
The signed-in person named name.
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
initials → String
One or two letters, the avatar's face.
final
meta → String?
The quiet line under the name.
final
name → String
The person's name, as the sidebar's foot prints it.
final
notificationsLocation → String?
The notifications page's path, read as profileLocation is ('/:root/notifications'): while it is shown the sidebar marks no destination current, as the source's notifications light none.
final
onNotificationsPressed → void Function(BuildContext context)?
Opens the notifications.
final
onProfilePressed → void Function(BuildContext context)?
Opens the profile; run with the tapped control's context (under the router).
final
onSearchPressed → void Function(BuildContext context)?
Opens the app's search; null draws no pill.
final
profileLocation → String?
The profile page's path, where the sidebar's foot is current: read as written ('/home/profile'), or with go_router's :name segments standing for any one segment ('/:root/profile', the profile pushed on any root, as a router that nests it under every branch has it).
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
searchHint → String?
The words the desktop masthead's search pill shows ("Search activity"); with onSearchPressed, every desktop masthead carries the pill.
final
unread → int
How many notifications are unread: the bell wears its dot while more than none.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
showsNotifications(String path) → bool
Whether the page at path is the notifications, or a page under it, by notificationsLocation.
showsProfile(String path) → bool
Whether the page at path is the profile, or a page under it, by profileLocation.
toString() → String
A string representation of this object.
inherited

Operators

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