This repository was archived by the owner on Feb 22, 2018. It is now read-only.
File tree 3 files changed +6
-4
lines changed
3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -755,5 +755,7 @@ class Http {
755
755
class HttpConfig {
756
756
final Duration coalesceDuration;
757
757
758
- HttpConfig ({this .coalesceDuration});
758
+ HttpConfig (): coalesceDuration = null ;
759
+
760
+ HttpConfig .withOptions ({this .coalesceDuration});
759
761
}
Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ class CoreDomModule extends Module {
86
86
bind (HttpDefaultHeaders );
87
87
bind (HttpDefaults );
88
88
bind (HttpInterceptors );
89
- bind (HttpConfig , toValue : new HttpConfig () );
89
+ bind (HttpConfig );
90
90
bind (Animate );
91
91
bind (ViewCache );
92
92
bind (BrowserCookies );
Original file line number Diff line number Diff line change @@ -1426,8 +1426,8 @@ void main() {
1426
1426
1427
1427
describe ('coalesce' , () {
1428
1428
beforeEachModule ((Module module) {
1429
- var coalesceDuration = new Duration (milliseconds: 100 );
1430
- module.bind (HttpConfig , toValue: new HttpConfig (coalesceDuration: coalesceDuration ));
1429
+ var duration = new Duration (milliseconds: 100 );
1430
+ module.bind (HttpConfig , toValue: new HttpConfig . withOptions (coalesceDuration: duration ));
1431
1431
});
1432
1432
1433
1433
it ('should coalesce requests' , async ((Http http) {
You can’t perform that action at this time.
0 commit comments