diff --git a/lib/src/butter.dart b/lib/src/butter.dart index 5ed821b..3247143 100644 --- a/lib/src/butter.dart +++ b/lib/src/butter.dart @@ -9,12 +9,12 @@ class Butter { /// The API token for Butter user final String _apiKey; - Pages page; - Content content; - Posts post; - Authors author; - Categories category; - Tags tag; + Pages? page; + Content? content; + Posts? post; + Authors? author; + Categories? category; + Tags? tag; Butter(this._apiKey) { if (_apiKey == "") { diff --git a/lib/src/files/authors.dart b/lib/src/files/authors.dart index 95bfb1b..e7e3a6e 100644 --- a/lib/src/files/authors.dart +++ b/lib/src/files/authors.dart @@ -10,7 +10,7 @@ class Authors { /// Retrieves a single author using slug /// [params] is a Map used to add additional parameters to the query Future retrieve([ - Map params, + Map? params, ]) { if (params != null) params["auth_token"] = _apiKey; @@ -22,7 +22,7 @@ class Authors { /// Lists all authors /// [params] is a Map used to add additional parameters to the query Future list([ - Map params, + Map? params, ]) { if (params != null) params["auth_token"] = _apiKey; diff --git a/lib/src/files/categories.dart b/lib/src/files/categories.dart index 33ea390..41cd23b 100644 --- a/lib/src/files/categories.dart +++ b/lib/src/files/categories.dart @@ -10,7 +10,7 @@ class Categories { /// Retrieves a single category using slug /// [params] is a Map used to add additional parameters to the query Future retrieve([ - Map params, + Map? params, ]) { if (params != null) params["auth_token"] = _apiKey; @@ -22,7 +22,7 @@ class Categories { /// Lists all categories /// [params] is a Map used to add additional parameters to the query Future list([ - Map params, + Map? params, ]) { if (params != null) params["auth_token"] = _apiKey; diff --git a/lib/src/files/content.dart b/lib/src/files/content.dart index 0e659a7..ff01113 100644 --- a/lib/src/files/content.dart +++ b/lib/src/files/content.dart @@ -12,7 +12,7 @@ class Content { /// [params] is a Map used to add additional parameters to the query Future retrieve( List keys, [ - Map params, + Map? params, ]) { if (params != null) params["auth_token"] = _apiKey; diff --git a/lib/src/files/pages.dart b/lib/src/files/pages.dart index 3b818e0..ff48300 100644 --- a/lib/src/files/pages.dart +++ b/lib/src/files/pages.dart @@ -14,7 +14,7 @@ class Pages { Future retrieve( String pageType, String pageSlug, [ - Map params, + Map? params, ]) { if (params != null) params["auth_token"] = _apiKey; @@ -30,7 +30,7 @@ class Pages { /// [params] is a Map used to add additional parameters to the query Future list( String pageType, [ - Map params, + Map? params, ]) { if (params != null) params["auth_token"] = _apiKey; diff --git a/lib/src/files/posts.dart b/lib/src/files/posts.dart index e26b836..3d24d11 100644 --- a/lib/src/files/posts.dart +++ b/lib/src/files/posts.dart @@ -11,7 +11,7 @@ class Posts { /// [params] is a Map used to add additional parameters to the query Future retrieve( String slug, [ - Map params, + Map? params, ]) { if (params != null) { params["auth_token"] = _apiKey; @@ -25,7 +25,7 @@ class Posts { /// Lists multiple posts according to page size /// [params] is a Map used to add additional parameters to the query Future list([ - Map params, + Map? params, ]) { if (params != null) params["auth_token"] = _apiKey; @@ -39,7 +39,7 @@ class Posts { /// [params] is a Map used to add additional parameters to the query Future search( String query, [ - Map params, + Map? params, ]) { if (params != null) { params["auth_token"] = _apiKey; diff --git a/lib/src/files/tags.dart b/lib/src/files/tags.dart index 873f955..31b58b2 100644 --- a/lib/src/files/tags.dart +++ b/lib/src/files/tags.dart @@ -10,7 +10,7 @@ class Tags { /// Retrieves a single page from Pages /// [params] is a Map used to add additional parameters to the query Future retrieve([ - Map params, + Map? params, ]) { if (params != null) params["auth_token"] = _apiKey; @@ -22,7 +22,7 @@ class Tags { /// Retrieves multiple pages from a pageType of Pages /// [params] is a Map used to add additional parameters to the query Future list([ - Map params, + Map? params, ]) { if (params != null) params["auth_token"] = _apiKey; diff --git a/pubspec.lock b/pubspec.lock index 5091f9b..066d95f 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -7,342 +7,342 @@ packages: name: _fe_analyzer_shared url: "https://pub.dartlang.org" source: hosted - version: "11.0.0" + version: "21.0.0" analyzer: dependency: transitive description: name: analyzer url: "https://pub.dartlang.org" source: hosted - version: "0.40.4" + version: "1.5.0" args: dependency: transitive description: name: args url: "https://pub.dartlang.org" source: hosted - version: "1.6.0" + version: "2.1.0" async: dependency: transitive description: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.5.0-nullsafety.1" + version: "2.6.1" boolean_selector: dependency: transitive description: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.1" + version: "2.1.0" charcode: dependency: transitive description: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.0" cli_util: dependency: transitive description: name: cli_util url: "https://pub.dartlang.org" source: hosted - version: "0.2.0" + version: "0.3.0" collection: dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.15.0-nullsafety.3" + version: "1.15.0" convert: dependency: transitive description: name: convert url: "https://pub.dartlang.org" source: hosted - version: "2.1.1" + version: "3.0.0" coverage: dependency: transitive description: name: coverage url: "https://pub.dartlang.org" source: hosted - version: "0.14.1" + version: "1.0.2" crypto: dependency: transitive description: name: crypto url: "https://pub.dartlang.org" source: hosted - version: "2.1.5" + version: "3.0.1" + file: + dependency: transitive + description: + name: file + url: "https://pub.dartlang.org" + source: hosted + version: "6.1.0" + frontend_server_client: + dependency: transitive + description: + name: frontend_server_client + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" glob: dependency: transitive description: name: glob url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "2.0.1" http: dependency: "direct main" description: name: http url: "https://pub.dartlang.org" source: hosted - version: "0.12.2" + version: "0.13.3" http_multi_server: dependency: transitive description: name: http_multi_server url: "https://pub.dartlang.org" source: hosted - version: "2.2.0" + version: "3.0.1" http_parser: dependency: transitive description: name: http_parser url: "https://pub.dartlang.org" source: hosted - version: "3.1.3" + version: "4.0.0" io: dependency: transitive description: name: io url: "https://pub.dartlang.org" source: hosted - version: "0.3.4" + version: "1.0.0" js: dependency: transitive description: name: js url: "https://pub.dartlang.org" source: hosted - version: "0.6.2" + version: "0.6.3" logging: dependency: transitive description: name: logging url: "https://pub.dartlang.org" source: hosted - version: "0.11.4" + version: "1.0.1" matcher: dependency: transitive description: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.9" + version: "0.12.10" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.3" + version: "1.3.0" mime: dependency: transitive description: name: mime url: "https://pub.dartlang.org" source: hosted - version: "0.9.7" - node_interop: - dependency: transitive - description: - name: node_interop - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.1" - node_io: - dependency: transitive - description: - name: node_io - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.1" + version: "1.0.0" node_preamble: dependency: transitive description: name: node_preamble url: "https://pub.dartlang.org" source: hosted - version: "1.4.12" + version: "2.0.0" package_config: dependency: transitive description: name: package_config url: "https://pub.dartlang.org" source: hosted - version: "1.9.3" + version: "2.0.0" path: dependency: transitive description: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.0-nullsafety.1" + version: "1.8.0" pedantic: dependency: transitive description: name: pedantic url: "https://pub.dartlang.org" source: hosted - version: "1.7.0" + version: "1.11.0" pool: dependency: transitive description: name: pool url: "https://pub.dartlang.org" source: hosted - version: "1.4.0" + version: "1.5.0" pub_semver: dependency: transitive description: name: pub_semver url: "https://pub.dartlang.org" source: hosted - version: "1.4.4" + version: "2.0.0" shelf: dependency: transitive description: name: shelf url: "https://pub.dartlang.org" source: hosted - version: "0.7.9" + version: "1.1.2" shelf_packages_handler: dependency: transitive description: name: shelf_packages_handler url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "3.0.0" shelf_static: dependency: transitive description: name: shelf_static url: "https://pub.dartlang.org" source: hosted - version: "0.2.8" + version: "1.0.0" shelf_web_socket: dependency: transitive description: name: shelf_web_socket url: "https://pub.dartlang.org" source: hosted - version: "0.2.3" + version: "1.0.1" source_map_stack_trace: dependency: transitive description: name: source_map_stack_trace url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.1.0" source_maps: dependency: transitive description: name: source_maps url: "https://pub.dartlang.org" source: hosted - version: "0.10.9" + version: "0.10.10" source_span: dependency: transitive description: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.0-nullsafety.2" + version: "1.8.1" stack_trace: dependency: transitive description: name: stack_trace url: "https://pub.dartlang.org" source: hosted - version: "1.10.0-nullsafety.1" + version: "1.10.0" stream_channel: dependency: transitive description: name: stream_channel url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.1" + version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.1" + version: "1.1.0" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.0" test: dependency: "direct dev" description: name: test url: "https://pub.dartlang.org" source: hosted - version: "1.15.4" + version: "1.17.3" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.18" + version: "0.4.0" test_core: dependency: transitive description: name: test_core url: "https://pub.dartlang.org" source: hosted - version: "0.3.11+1" + version: "0.3.23" typed_data: dependency: transitive description: name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.3" + version: "1.3.0" vm_service: dependency: transitive description: name: vm_service url: "https://pub.dartlang.org" source: hosted - version: "4.2.0" + version: "6.2.0" watcher: dependency: transitive description: name: watcher url: "https://pub.dartlang.org" source: hosted - version: "0.9.7+15" + version: "1.0.0" web_socket_channel: dependency: transitive description: name: web_socket_channel url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "2.1.0" webkit_inspection_protocol: dependency: transitive description: name: webkit_inspection_protocol url: "https://pub.dartlang.org" source: hosted - version: "0.7.3" + version: "1.0.0" yaml: dependency: transitive description: name: yaml url: "https://pub.dartlang.org" source: hosted - version: "2.2.1" + version: "3.1.0" sdks: - dart: ">=2.10.0-78 <=2.11.0-161.0.dev" + dart: ">=2.12.0 <3.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 5a800ad..1e04775 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,19 +1,19 @@ name: buttercms_dart description: The official ButterCMS package for Flutter. Use the full feature set Butter offers, now available on Flutter. -version: 0.2.0 +version: 0.3.0 authors: - ButterCMS Team - Deven Joshi homepage: https://github.com/ButterCMS/buttercms-dart environment: - sdk: ">=2.1.0 <3.0.0" + sdk: '>=2.12.0 <3.0.0' dependencies: - http: ^0.12.2 + http: ^0.13.3 dev_dependencies: - test: 1.15.4 + test: 1.17.3 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec