BankHelpFaqList class
Searchable FAQ accordion for the support hub.
A pinned search field filters by question and keywords with the
matching substrings highlighted; items expand one at a time; expanded
answers end with a was-this-helpful vote; empty results fall back to
BankEmptyStateView with a contact-support CTA.
BankHelpFaqList(
items: faqs,
onContactSupport: _openChat,
onFeedback: (id, helpful) => analytics.faqVote(id, helpful),
)
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- BankHelpFaqList
Constructors
-
BankHelpFaqList({required List<
BankFaqItem> items, Key? key, bool searchable = true, String searchHint = 'Search help topics', VoidCallback? onContactSupport, String contactLabel = 'Contact support', void onFeedback(String id, bool helpful)?, String helpfulPrompt = 'Was this helpful?', String thanksLabel = 'Thanks for the feedback', String emptyTitle = 'No results', String emptyBody = 'Try a different search term, or reach out directly.', Color? accentColor, Color? dividerColor, TextStyle? questionStyle, TextStyle? answerStyle, TextStyle? highlightStyle, IconData? searchIcon, IconData? clearIcon, IconData? expandIcon, IconData? contactIcon, IconData? chevronIcon, IconData? thumbUpIcon, IconData? thumbDownIcon, Duration? animationDuration, Curve? animationCurve}) -
const
Properties
- accentColor → Color?
-
Overrides the accent used for search-match highlights and the
contact-row icon. Defaults to the theme primary.
final
- animationCurve → Curve?
-
Overrides the expand/collapse animation curve. Defaults to
BankTokens.curveStandard.
final
- animationDuration → Duration?
-
Overrides the expand/collapse animation duration. Defaults to
BankTokens.durationBase (chevron: BankTokens.durationFast).
final
- answerStyle → TextStyle?
-
Merged over the answer style (BankTokens.bodyMedium in
onSurfaceVariant).
final
- chevronIcon → IconData?
-
Trailing glyph of the contact-support row. Defaults to
Icons.chevron_right.
final
- clearIcon → IconData?
-
Glyph of the clear-search affordance. Defaults to
BankIcons.close.
final
- contactIcon → IconData?
-
Leading glyph of the contact-support row. Defaults to
Icons.forum_outlined.
final
- contactLabel → String
-
final
- dividerColor → Color?
-
Overrides the divider colour between items. Defaults to the theme
outline.
final
- emptyBody → String
-
final
- emptyTitle → String
-
final
- expandIcon → IconData?
-
Expand chevron on each item. Defaults to BankIcons.expand.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- helpfulPrompt → String
-
final
- highlightStyle → TextStyle?
-
Merged over the search-match highlight style (accent, w700).
final
-
items
→ List<
BankFaqItem> -
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- onContactSupport → VoidCallback?
-
Shows the persistent contact row and the empty-state CTA when set.
final
- onFeedback → void Function(String id, bool helpful)?
-
Fired after a helpful / not-helpful vote on an expanded answer.
final
- questionStyle → TextStyle?
-
Merged over the question style (BankTokens.bodyLarge in onSurface).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- searchable → bool
-
final
- searchHint → String
-
final
- searchIcon → IconData?
-
Glyph inside the search field. Defaults to BankIcons.search.
final
- thanksLabel → String
-
final
- thumbDownIcon → IconData?
-
Not-helpful-vote glyph. Defaults to Icons.thumb_down_outlined.
final
- thumbUpIcon → IconData?
-
Helpful-vote glyph. Defaults to Icons.thumb_up_outlined.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< BankHelpFaqList> -
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