Skip to content
This repository has been archived by the owner on Jan 26, 2021. It is now read-only.

Call toDouble() in generated code #192

Merged
merged 1 commit into from
May 24, 2018

Conversation

xvrh
Copy link
Contributor

@xvrh xvrh commented May 22, 2018

This is the first step to fix: google/googleapis.dart#11

The generated code is now like:

if (_json.containsKey("property")) {
  property = _json["property"].toDouble();
}

// and

properties = commons.mapMap<core.num, core.double>(
    _json["properties"].cast<core.String, core.num>(),
     (core.num item) => item.toDouble());

@mkustermann
Copy link
Contributor

/cc @jakobr-google

@mkustermann
Copy link
Contributor

Thanks for the help @xavierhainaux , much appreciated!

@mkustermann mkustermann merged commit 06b4d67 into dart-archive:master May 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

Successfully merging this pull request may close these issues.

Checked mode: type 'int' is not a subtype of type 'double' of 'value'
3 participants