-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
⚡ use qs_dart for query string encoding (#592)
- Loading branch information
Showing
28 changed files
with
2,920 additions
and
213 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import 'package:qs_dart/qs_dart.dart' as qs show ListFormat; | ||
|
||
/// An enum of all available list format options. | ||
/// | ||
/// This is a wrapper around the [qs.ListFormat] enum. | ||
enum ListFormat { | ||
/// Use brackets to represent list items, for example | ||
/// `foo[]=123&foo[]=456&foo[]=789` | ||
brackets(qs.ListFormat.brackets), | ||
|
||
/// Use commas to represent list items, for example | ||
/// `foo=123,456,789` | ||
comma(qs.ListFormat.comma), | ||
|
||
/// Repeat the same key to represent list items, for example | ||
/// `foo=123&foo=456&foo=789` | ||
repeat(qs.ListFormat.repeat), | ||
|
||
/// Use indices in brackets to represent list items, for example | ||
/// `foo[0]=123&foo[1]=456&foo[2]=789` | ||
indices(qs.ListFormat.indices); | ||
|
||
const ListFormat(this.qsListFormat); | ||
|
||
final qs.ListFormat qsListFormat; | ||
|
||
@override | ||
String toString() => name; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.