LogFilterSheet class

Bottom sheet for choosing a filter: text search, levels and tags. Every change is passed to onFilterChanged: levels and tags immediately, text after searchDelay since the last keystroke or when the sheet closes, if the pause has not yet elapsed.

The sheet edits only levels, tags and text and passes the owner not a ready filter but an edit (LogFilterUpdate), which the owner applies to the filter in effect at that moment. The other conditions (time range, attributes) stay as the owner has set them by then, even if it changed them while the sheet was open; initialFilter only sets the initial selection. Strings come from LogViewerStrings.of.

LogViewerPage shows it via showModalBottomSheet; a custom page over LogViewerController can do the same:

showModalBottomSheet<void>(
  context: context,
  builder: (_) => LogFilterSheet(
    initialFilter: controller.filter,
    availableTags: controller.availableTags,
    onFilterChanged: controller.updateFilter,
  ),
);
Inheritance

Constructors

LogFilterSheet({required LogFilter initialFilter, required Set<String> availableTags, required void onFilterChanged(LogFilterUpdate update), Duration searchDelay = const Duration(milliseconds: 300), Key? key})
const

Properties

availableTags → Set<String>
Tags offered for selection (usually LogViewerController.availableTags).
final
hashCode → int
The hash code for this object.
no setterinherited
initialFilter → LogFilter
Filter at the moment of opening; its text, levels and tags are shown selected.
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onFilterChanged → void Function(LogFilterUpdate update)
Called on every change with an edit that carries the sheet's levels, tags and text onto the owner's current filter (usually LogViewerController.updateFilter).
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
searchDelay → Duration
Pause in typing after which the search is applied: every letter is a new store query.
final

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → State<LogFilterSheet>
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, int wrapWidth = 65}) → 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