-
Notifications
You must be signed in to change notification settings - Fork 253
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
59 additions
and
43 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
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
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
|
||
import 'dart:convert' show jsonDecode, jsonEncode; | ||
import 'dart:io' show Cookie; | ||
|
||
import 'package:alice/model/alice_form_data_file.dart'; | ||
import 'package:alice/model/alice_from_data_field.dart'; | ||
import 'package:alice/model/alice_http_request.dart'; | ||
import 'package:alice/utils/alice_parser.dart'; | ||
import 'package:alice_objectbox/json_converter/alice_form_data_field_converter.dart'; | ||
import 'package:alice_objectbox/json_converter/alice_form_data_file_converter.dart'; | ||
import 'package:meta/meta.dart'; | ||
|
@@ -17,7 +17,7 @@ class CachedAliceHttpRequest implements AliceHttpRequest { | |
this.objectId = 0, | ||
this.size = 0, | ||
DateTime? time, | ||
this.headers = const <String, dynamic>{}, | ||
this.headers = const <String, String>{}, | ||
this.body = '', | ||
this.contentType = '', | ||
this.cookies = const [], | ||
|
@@ -40,15 +40,15 @@ class CachedAliceHttpRequest implements AliceHttpRequest { | |
|
||
@override | ||
@Transient() | ||
Map<String, dynamic> headers; | ||
Map<String, String> headers; | ||
|
||
/// Custom data type converter of [headers]. | ||
String get dbHeaders => jsonEncode(headers); | ||
|
||
/// Custom data type converter of [headers]. | ||
set dbHeaders(String value) => | ||
headers = jsonDecode(value) as Map<String, dynamic>; | ||
|
||
set dbHeaders(String value) => headers = AliceParser.parseHeaders( | ||
This comment has been minimized.
Sorry, something went wrong. |
||
headers: jsonDecode(value), | ||
); | ||
@override | ||
@Transient() | ||
dynamic body; | ||
|
@@ -135,15 +135,17 @@ class CachedAliceHttpRequest implements AliceHttpRequest { | |
.toList(); | ||
|
||
@override | ||
List<Object?> get props => [ size, | ||
time, | ||
headers, | ||
body, | ||
contentType, | ||
cookies, | ||
queryParameters, | ||
formDataFiles, | ||
formDataFields,]; | ||
List<Object?> get props => [ | ||
This comment has been minimized.
Sorry, something went wrong.
techouse
Collaborator
|
||
size, | ||
time, | ||
headers, | ||
body, | ||
contentType, | ||
cookies, | ||
queryParameters, | ||
formDataFiles, | ||
formDataFields, | ||
]; | ||
|
||
@override | ||
bool? get stringify => true; | ||
|
I'm not sure you understand what this does. This setter is here because ObjectBox can't store a
Map
https://docs.objectbox.io/advanced/custom-typesNot sure why you changed it.
Anyhow, after ANY change to the ObjectBox models, please re-run code generation using
inside packages/alice_objectbox