Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

💡 Clean up code in comments #403

Merged
merged 1 commit into from
Jan 9, 2023
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
6 changes: 2 additions & 4 deletions chopper/lib/src/annotations.dart
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ typedef ConvertResponse<T> = FutureOr<Response> Function(Response response);
/// )
/// Future<Response<Todo>> getTodo(@Path("id"));
/// }
/// ```
@immutable
class FactoryConverter {
final ConvertRequest? request;
Expand Down Expand Up @@ -365,7 +366,6 @@ class Field {
/// @Post(path: '/something')
/// Future<Response> fetch(@FieldMap List<Map<String, dynamic>> query);
/// ```
///
@immutable
class FieldMap {
const FieldMap();
Expand Down Expand Up @@ -405,15 +405,14 @@ class Part {
/// @Multipart
/// Future<Response> fetch(@PartMap() List<PartValue> query);
/// ```
///
@immutable
class PartMap {
const PartMap();
}

/// Use [PartFile] to define a file field for a [Multipart] request.
///
/// ```
/// ```dart
/// @Post(path: 'file')
/// @multipart
/// Future<Response> postFile(@PartFile('file') List<int> bytes);
Expand All @@ -437,7 +436,6 @@ class PartFile {
/// @Multipart
/// Future<Response> fetch(@PartFileMap() List<PartValueFile> query);
/// ```
///
@immutable
class PartFileMap {
const PartFileMap();
Expand Down
4 changes: 2 additions & 2 deletions chopper/lib/src/utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ Request applyHeader(
///
/// ```dart
/// final newRequest = applyHeaders(request, {
/// 'Authorization': 'Bearer <token>',
/// 'Content-Type': 'application/json',
/// 'Authorization': 'Bearer <token>',
/// 'Content-Type': 'application/json',
/// });
/// ```
Request applyHeaders(
Expand Down