IPBlocker class

IPBlocker class

Constructors

IPBlocker.new()

Properties

blockedIps Set<String>
Set of blocked IP addresses
final
blockedIpsList List<String>
Returns a list of blocked IP addresses
no setter
count int
Returns the number of blocked IP addresses
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

asJson() String
Returns a string representation of the IP block list
blockIp(String ip) → void
Blocks an IP address
clear() → void
Clears the IP block list
fromJson(String json) → void
Loads the IP block list from a JSON string NOTE: THIS WILL CLEAR ALL THE IP BLOCKS
isIpBlocked(String ip) bool
Checks if an IP address is blocked
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
unblockIp(String ip) → void
Unblocks an IP address

Operators

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