Link class
A short link with its slugs, total click count, and metadata.
- Annotations
-
- @immutable
Constructors
-
Link({required int id, required String url, required String? label, required int createdAt, required int? expiresAt, required String? createdVia, required String createdBy, required List<
Slug> slugs, required int totalClicks, double? deltaPct}) -
Creates a link. Most callers should use Link.fromJson.
const
-
Link.fromJson(Map<
String, dynamic> json) -
Parses a link from its JSON representation.
factory
Properties
- createdAt → int
-
Unix seconds when the link was created.
final
- createdBy → String
-
Identity (typically an email) of the creator.
final
- createdVia → String?
-
How the link was created (
sdk,api,ui). Null for legacy links.final - deltaPct → double?
-
Click count change as a percentage versus the previous equivalent period.
Absent when comparison data is unavailable.
final
- expiresAt → int?
-
Unix seconds expiry, or null for no expiry.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → int
-
Unique link ID.
final
- label → String?
-
Optional human-readable label.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
slugs
→ List<
Slug> -
Slugs attached to this link.
final
- totalClicks → int
-
Total clicks across every slug on this link in the requested range.
final
- url → String
-
Target URL.
final
Methods
-
copyWith(
{int? id, String? url, Object? label = _unset, int? createdAt, Object? expiresAt = _unset, Object? createdVia = _unset, String? createdBy, List< Slug> ? slugs, int? totalClicks, Object? deltaPct = _unset}) → Link - Returns a copy with selected fields replaced.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited