YaruSearchAppBar class
Creates a search bar inside an AppBar.
By default the text style will be,
const TextStyle(fontSize: 18, fontWeight: FontWeight.w200)
Example usage:
YaruSearchAppBar(
searchHint: 'Search...',
searchController: TextEditingController(),
onChanged: (v) {},
onEscape: () {},
appBarHeight: AppBarTheme.of(context).toolbarHeight,
)
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- YaruSearchAppBar
- Implemented types
Constructors
- YaruSearchAppBar({Key? key, TextEditingController? searchController, required dynamic onChanged(String value), required dynamic onEscape(), bool automaticallyImplyLeading = false, IconData? searchIconData, double appBarHeight = kToolbarHeight, TextStyle? textStyle, String? searchHint, IconData? clearSearchIconData})
-
const
Properties
- appBarHeight → double
-
The height of the YaruSearchAppBar, needed if it is put into
a container without height.
It defaults to kToolbarHeight.
final
- automaticallyImplyLeading → bool
-
If false, hides the back icon in the AppBar
final
- clearSearchIconData → IconData?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- onChanged → dynamic Function(String value)
-
The callback that gets invoked when the value changes in the text field.
final
- onEscape → dynamic Function()
-
The callback that gets invoked when
escape
key is pressed.final - preferredSize → Size
-
The size this widget would prefer if it were otherwise unconstrained.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- searchController → TextEditingController?
-
An optional TextEditingController.
final
- searchHint → String?
-
Specifies the search hint.
final
- searchIconData → IconData?
-
Search icon for search bar.
final
- textStyle → TextStyle?
-
Specifies the TextStyle
final
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
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