CountryBlocker class

CountryBlocker class useful for geo-blocking

Constructors

CountryBlocker.new()

Properties

blocked Set<String>
Set of blocked countries
final
blockedList List<String>
Returns a list of blocked countries
no setter
count int
Returns the number of blocked countries
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 country block list
block(String country) → void
Blocks a country uses country code e.g. US, IQ, CN, RU, etc..
clear() → void
Clears the country block list
fromJson(String json) → void
Loads the country block list from a JSON string NOTE: THIS WILL CLEAR ALL THE COUNTRY BLOCKS
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
unblock(String country) → void
Unblocks a country

Operators

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