a class final

The <a> HTML element (or anchor element), with its href attribute, creates a hyperlink to web pages, files, email addresses, locations in the same page, or anything else a URL can address.

Content within each <a> should indicate the link's destination. If the href attribute is present, pressing the enter key while focused on the <a> element will activate it.

Inheritance

Constructors

a(List<Component> children, {required String href, Target? target, String? type, String? download, ReferrerPolicy? referrerPolicy, VoidCallback? onClick, String? id, String? classes, Styles? styles, Map<String, String>? attributes, Map<String, EventCallback>? events, Key? key})
The <a> HTML element (or anchor element), with its href attribute, creates a hyperlink to web pages, files, email addresses, locations in the same page, or anything else a URL can address.
const

Properties

attributes → Map<String, String>?
Additional attributes to apply to the HTML element.
final
children → List<Component>
The children of this component.
final
classes → String?
The CSS classes to apply to the HTML element, separated by whitespace.
final
download → String?
Causes the browser to treat the linked URL as a download. Can be used with or without a value:
final
events → Map<String, EventCallback>?
Event listeners to attach to the HTML element.
final
hashCode → int
The hash code for this object.
no setterinherited
href → String
The URL that the hyperlink points to. Links are not restricted to HTTP-based URLs — they can use any URL scheme supported by browsers:
final
id → String?
The id of the HTML element. Must be unique within the document.
final
key → Key?
Controls how one component replaces another component in the tree.
finalinherited
onClick → VoidCallback?
Callback for the 'click' event. This will override the default behavior of the link and not visit href when clicked.
final
referrerPolicy → ReferrerPolicy?
How much of the referrer to send when following the link.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
styles → Styles?
The inline styles to apply to the HTML element.
final
target → Target?
Where to display the linked URL, as the name for a browsing context (a tab, window, or <iframe>).
final
type → String?
Hints at the linked URL's format with a MIME type. No built-in functionality.
final

Methods

build(BuildContext context) → Component
Describes the part of the user interface represented by this component.
override
createElement() → Element
Creates a StatelessElement to manage this component's location in the tree.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
shouldRebuild(covariant Component newComponent) → bool
Implement this method to determine whether a rebuild can be skipped.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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