File tree Expand file tree Collapse file tree 9 files changed +84
-84
lines changed Expand file tree Collapse file tree 9 files changed +84
-84
lines changed Original file line number Diff line number Diff line change @@ -9,12 +9,12 @@ class Butter {
9
9
/// The API token for Butter user
10
10
final String _apiKey;
11
11
12
- Pages page;
13
- Content content;
14
- Posts post;
15
- Authors author;
16
- Categories category;
17
- Tags tag;
12
+ Pages ? page;
13
+ Content ? content;
14
+ Posts ? post;
15
+ Authors ? author;
16
+ Categories ? category;
17
+ Tags ? tag;
18
18
19
19
Butter (this ._apiKey) {
20
20
if (_apiKey == "" ) {
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ class Authors {
10
10
/// Retrieves a single author using slug
11
11
/// [params] is a Map used to add additional parameters to the query
12
12
Future <Response > retrieve ([
13
- Map <String , String > params,
13
+ Map <String , String >? params,
14
14
]) {
15
15
if (params != null )
16
16
params["auth_token" ] = _apiKey;
@@ -22,7 +22,7 @@ class Authors {
22
22
/// Lists all authors
23
23
/// [params] is a Map used to add additional parameters to the query
24
24
Future <Response > list ([
25
- Map <String , String > params,
25
+ Map <String , String >? params,
26
26
]) {
27
27
if (params != null )
28
28
params["auth_token" ] = _apiKey;
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ class Categories {
10
10
/// Retrieves a single category using slug
11
11
/// [params] is a Map used to add additional parameters to the query
12
12
Future <Response > retrieve ([
13
- Map <String , String > params,
13
+ Map <String , String >? params,
14
14
]) {
15
15
if (params != null )
16
16
params["auth_token" ] = _apiKey;
@@ -22,7 +22,7 @@ class Categories {
22
22
/// Lists all categories
23
23
/// [params] is a Map used to add additional parameters to the query
24
24
Future <Response > list ([
25
- Map <String , String > params,
25
+ Map <String , String >? params,
26
26
]) {
27
27
if (params != null )
28
28
params["auth_token" ] = _apiKey;
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ class Content {
12
12
/// [params] is a Map used to add additional parameters to the query
13
13
Future <Response > retrieve (
14
14
List <String > keys, [
15
- Map <String , String > params,
15
+ Map <String , String >? params,
16
16
]) {
17
17
if (params != null )
18
18
params["auth_token" ] = _apiKey;
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ class Pages {
14
14
Future <Response > retrieve (
15
15
String pageType,
16
16
String pageSlug, [
17
- Map <String , String > params,
17
+ Map <String , String >? params,
18
18
]) {
19
19
if (params != null )
20
20
params["auth_token" ] = _apiKey;
@@ -30,7 +30,7 @@ class Pages {
30
30
/// [params] is a Map used to add additional parameters to the query
31
31
Future <Response > list (
32
32
String pageType, [
33
- Map <String , String > params,
33
+ Map <String , String >? params,
34
34
]) {
35
35
if (params != null )
36
36
params["auth_token" ] = _apiKey;
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ class Posts {
11
11
/// [params] is a Map used to add additional parameters to the query
12
12
Future <Response > retrieve (
13
13
String slug, [
14
- Map <String , String > params,
14
+ Map <String , String >? params,
15
15
]) {
16
16
if (params != null ) {
17
17
params["auth_token" ] = _apiKey;
@@ -25,7 +25,7 @@ class Posts {
25
25
/// Lists multiple posts according to page size
26
26
/// [params] is a Map used to add additional parameters to the query
27
27
Future <Response > list ([
28
- Map <String , String > params,
28
+ Map <String , String >? params,
29
29
]) {
30
30
if (params != null )
31
31
params["auth_token" ] = _apiKey;
@@ -39,7 +39,7 @@ class Posts {
39
39
/// [params] is a Map used to add additional parameters to the query
40
40
Future <Response > search (
41
41
String query, [
42
- Map <String , String > params,
42
+ Map <String , String >? params,
43
43
]) {
44
44
if (params != null ) {
45
45
params["auth_token" ] = _apiKey;
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ class Tags {
10
10
/// Retrieves a single page from Pages
11
11
/// [params] is a Map used to add additional parameters to the query
12
12
Future <Response > retrieve ([
13
- Map <String , String > params,
13
+ Map <String , String >? params,
14
14
]) {
15
15
if (params != null )
16
16
params["auth_token" ] = _apiKey;
@@ -22,7 +22,7 @@ class Tags {
22
22
/// Retrieves multiple pages from a pageType of Pages
23
23
/// [params] is a Map used to add additional parameters to the query
24
24
Future <Response > list ([
25
- Map <String , String > params,
25
+ Map <String , String >? params,
26
26
]) {
27
27
if (params != null )
28
28
params["auth_token" ] = _apiKey;
You can’t perform that action at this time.
0 commit comments