diff options
| author | Aldrik Ramaekers <aldrik@amftech.nl> | 2023-02-08 20:08:23 +0100 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrik@amftech.nl> | 2023-02-08 20:08:23 +0100 |
| commit | fcbf592d10199dbac80198dd8c2efb181f95165e (patch) | |
| tree | 4fd50f1bf1c65c7180f1f3b7d64fc1603bf9be73 /lib/services/iblacklist_provider_service.dart | |
| parent | e37d74527e03b6a804a35cbfb0956d4e0100889f (diff) | |
blacklist
Diffstat (limited to 'lib/services/iblacklist_provider_service.dart')
| -rw-r--r-- | lib/services/iblacklist_provider_service.dart | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/lib/services/iblacklist_provider_service.dart b/lib/services/iblacklist_provider_service.dart new file mode 100644 index 0000000..c66a909 --- /dev/null +++ b/lib/services/iblacklist_provider_service.dart @@ -0,0 +1,31 @@ +import 'dart:async'; + +class BlacklistEntry { + String postalcodeNumeric; + String postalcodeAplha; + int houseNumber; + String houseNumberExtra; + + BlacklistEntry(this.postalcodeNumeric, this.postalcodeAplha, this.houseNumber, + this.houseNumberExtra); + + BlacklistEntry.fromJson(Map<String, dynamic> json) + : postalcodeNumeric = json['postalcodeNumeric'], + postalcodeAplha = json['postalcodeAplha'], + houseNumber = json['houseNumber'], + houseNumberExtra = json['houseNumberExtra']; + + Map<String, dynamic> toJson() { + return { + 'postalcodeNumeric': postalcodeNumeric, + 'postalcodeAplha': postalcodeAplha, + 'houseNumber': houseNumber, + 'houseNumberExtra': houseNumberExtra, + }; + } +} + +abstract class IBlacklistProviderService { + Future<List<BlacklistEntry>> getBlacklist(); + Future<void> addToBlacklist(BlacklistEntry data); +} |
