ThemedScaffoldView<T> class
Constructors
-
ThemedScaffoldView({Key? key, required String module, double mobileBreakpoint = kSmallGrid, required Widget child, required List<T> items, T? item, required void onTap(T), required ThemedTableAvatar avatarBuilder(BuildContext, T), required String titleBuilder(BuildContext, T), required String subtitleBuilder(BuildContext, T), required String idBuilder(BuildContext, T), Map<String, dynamic> customTranslations = const {}, IconData? prefixIconBuilder(BuildContext, T)?})
-
ThemedScaffoldView is a widget to easly configure the scaffold details view.
Helps with the sidebar and their button in mobile size (Refer to mobileBreakpoint for more details).
const
Properties
-
avatarBuilder
→ ThemedTableAvatar Function(BuildContext, T)
-
Represents the builders of row avatar in the ListView of the sidebar.
In mobile mode, this sidebar will be replaced as a bottom sheet.
final
-
child
→ Widget
-
Represents the content of the view. The 'content' of the view.
final
-
customTranslations
→ Map<String, dynamic>
-
Represents the custom translations of the table.
If you cannot use Layrz Translation Engine, you can add your custom translations here.
If the Layrz Translation Engine is null, the table will use this property to generate the translations,
but you may see this error:
Missing translation for key: translation.key : {itemCount} : {arguments}
{itemCount}
is the number of items in the table. Only will appear when the translation has pluralization.
{arguments}
is the representation of a Map<String, dynamic>
arguments object.
final
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
idBuilder
→ String Function(BuildContext, T)
-
Represents the builder of id
final
-
item
→ T?
-
Represents the current item
final
-
items
→ List<T>
-
Represents the items of the sidebar list.
final
-
key
→ Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
-
mobileBreakpoint
→ double
-
Represents the mobile breakpoint
This property changes the sidebar behavior to a button and a BottomSheet in mobile size.
final
-
module
→ String
-
Represents the module name of the table. This is used to generate the titleText.
The format of each translation key should be:
final
-
onTap
→ void Function(T)
-
Represents the callback when an item is selected
final
-
prefixIconBuilder
→ (IconData? Function(BuildContext, T)?)
-
prefixSidebarIcon
is the prefix of the sidebar icon. Should return an IconData
final
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
-
Represents the width of the sidebar.
This property only works when the
constraints.maxWidth
is greater than mobileBreakpoint.
final
-
subtitleBuilder
→ String Function(BuildContext, T)
-
Represents the builder of row subtitle in the ListView of the sidebar.
In mobile mode, this sidebar will be replaced as a bottom sheet.
final
-
titleBuilder
→ String Function(BuildContext, T)
-
Represents the builder of row title in the ListView of the sidebar.
In mobile mode, this sidebar will be replaced as a bottom sheet.
final