Skip to content

Commit

Permalink
fix compilation error
Browse files Browse the repository at this point in the history
  • Loading branch information
rrousselGit committed Jan 20, 2021
1 parent a7563cb commit 166eba2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ Future getCustomToken(
var body = json.encode(claims);
var headers = {'authorization': 'Bearer $idToken'};

final response = await http.post(path, headers: headers, body: body);
final response = await http.post(
Uri.parse(path),
headers: headers,
body: body,
);
if (response.statusCode == 200) {
// successful, parse json
var jsonData = json.decode(response.body);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class ReferenceWeb extends ReferencePlatform {
Future<Uint8List /*?*/ > getData(
int maxSize, {
@visibleForTesting
Future<Uint8List> Function(dynamic url) readBytes = http.readBytes,
Future<Uint8List> Function(Uri url) readBytes = http.readBytes,
}) async {
if (maxSize > 0) {
final metadata = await getMetadata();
Expand All @@ -141,7 +141,7 @@ class ReferenceWeb extends ReferencePlatform {

try {
String url = await getDownloadURL();
return await readBytes(url);
return await readBytes(Uri.parse(url));
} catch (e) {
throw getFirebaseException(e);
}
Expand Down

0 comments on commit 166eba2

Please sign in to comment.