ThemedScaffoldView<T> class

Inheritance

Constructors

ThemedScaffoldView({Key? key, required String module, double sidebarWidth = 300, 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
sidebarWidth double
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

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<ThemedScaffoldView<T>>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

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