Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/src/enums/format.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ enum Format {

/// Rewrites `%20` to `+` (space) and returns the result unchanged otherwise.
/// No decoding is performed.
static String _rfc1738Formatter(String value) => value.replaceAll('%20', '+');
static String _rfc1738Formatter(final String value) =>
value.replaceAll('%20', '+');

/// Identity formatter: returns the input unchanged.
static String _rfc3986Formatter(String value) => value;
static String _rfc3986Formatter(final String value) => value;
}
10 changes: 6 additions & 4 deletions lib/src/enums/list_format.dart
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,16 @@ enum ListFormat {
String toString() => name;

/// `foo[]`
static String _brackets(String prefix, [String? key]) => '$prefix[]';
static String _brackets(final String prefix, [final String? key]) =>
'$prefix[]';

/// `foo` (the encoder will join values with commas)
static String _comma(String prefix, [String? key]) => prefix;
static String _comma(final String prefix, [final String? key]) => prefix;

/// `foo[<index>]`
static String _indices(String prefix, [String? key]) => '$prefix[$key]';
static String _indices(final String prefix, [final String? key]) =>
'$prefix[$key]';

/// `foo` (the encoder will repeat the key per element)
static String _repeat(String prefix, [String? key]) => prefix;
static String _repeat(final String prefix, [final String? key]) => prefix;
}
Loading