Skip to content

Commit

Permalink
Fix Header Option Casting (#260)
Browse files Browse the repository at this point in the history
Co-authored-by: Ivan Terekhin <i.terhin@gmail.com>
  • Loading branch information
YoussefRaafatNasry and JEuler committed May 25, 2021
1 parent 45cd40c commit f25fbe4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion chopper/lib/src/base.dart
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ class ChopperClient {
Map<String, String> headers = const {},
Map<String, dynamic> parameters = const {},
String? baseUrl,
dynamic? body,
dynamic body,
}) =>
send<BodyType, InnerType>(
Request(
Expand Down
2 changes: 1 addition & 1 deletion chopper_generator/lib/chopper_generator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ import 'package:build/build.dart';
import 'src/generator.dart';

Builder chopperGeneratorFactory(BuilderOptions options) =>
chopperGeneratorFactoryBuilder(header: options.config['header'] as String);
chopperGeneratorFactoryBuilder(header: options.config['header']);
2 changes: 1 addition & 1 deletion chopper_generator/lib/src/generator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ class ChopperGenerator extends GeneratorForAnnotation<chopper.ChopperApi> {
}
}

Builder chopperGeneratorFactoryBuilder({String header = ''}) => PartBuilder(
Builder chopperGeneratorFactoryBuilder({String? header}) => PartBuilder(
[ChopperGenerator()],
'.chopper.dart',
header: header,
Expand Down

0 comments on commit f25fbe4

Please sign in to comment.