NmWebhooksSection class

Outbound webhooks of an account: add (https URL + events), test, delete, last deliveries. The signing secret returned by onAdd is shown once, right after creation, with a copy button.

The app keeps the API: every callback returns null (or false) when the call failed — the app shows its own error — and the section then leaves its state as it was. Renders nothing until load answers.

Inheritance

Constructors

NmWebhooksSection({Key? key, required Future<NmWebhooksData?> load(), required Future<({String? secret})?> onAdd(String url, List<String> events), required Future<({String? detail, bool ok})?> onTest(int id), required Future<void> onDelete(int id), required Future<List<NmWebhookDelivery>?> loadDeliveries(int id), Set<String> initialEvents = const {}, String? title, String? subtitle, String? unavailableText})
Creates an NmWebhooksSection.
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
initialEvents → Set<String>
Events selected for a new webhook at first.
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
load → Future<NmWebhooksData?> Function()
Loads the section; null = failed.
final
loadDeliveries → Future<List<NmWebhookDelivery>?> Function(int id)
Last deliveries of a webhook; null = failed.
final
onAdd → Future<({String? secret})?> Function(String url, List<String> events)
Creates a webhook; returns its signing secret (secret may be null) or null when it failed.
final
onDelete → Future<void> Function(int id)
Deletes a webhook.
final
onTest → Future<({String? detail, bool ok})?> Function(int id)
Sends a test delivery; null = the call failed. detail explains a failed delivery.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
subtitle → String?
Line under the label (the app's text: what is sent and how it is signed).
final
title → String?
Section label; defaults to the localized «Webhooks».
final
unavailableText → String?
Shown when NmWebhooksData.enabled is false; defaults to the localized «Webhooks are unavailable on this server».
final

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → State<NmWebhooksSection>
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