diff --git a/lib/api.dart b/lib/api.dart index 45b2b119..44f7f636 100644 --- a/lib/api.dart +++ b/lib/api.dart @@ -227,6 +227,10 @@ class InvenTreeAPI { int get apiVersion => _apiVersion; + bool _pluginsEnabled = false; + + bool pluginsEnabled() => supportPlugins() && _pluginsEnabled; + // Getter for server version information String get version => _version; @@ -349,6 +353,8 @@ class InvenTreeAPI { return false; } + _pluginsEnabled = (data["plugins_enabled"] ?? false) as bool; + /** * Request user token information from the server * This is the stage that we check username:password credentials!