Fix strong-mode warnings.
Closes #11
diff --git a/CHANGELOG.md b/CHANGELOG.md
index feb1001..cb13d7b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 2.0.2
+
+* Fix all strong-mode warnings.
+
## 2.0.1
* Fix a race condition in which a `StateError` could be top-leveled if
diff --git a/lib/src/client.dart b/lib/src/client.dart
index 5df21e4..82baa6a 100644
--- a/lib/src/client.dart
+++ b/lib/src/client.dart
@@ -121,7 +121,7 @@
'parameters, was "$parameters".');
}
- var message = {
+ var message = <String, dynamic>{
"jsonrpc": "2.0",
"method": method
};
diff --git a/lib/src/parameters.dart b/lib/src/parameters.dart
index 91ad1b5..c6c653b 100644
--- a/lib/src/parameters.dart
+++ b/lib/src/parameters.dart
@@ -26,9 +26,10 @@
///
/// If this is accessed for a [Parameter] that was not passed, the request
/// will be automatically rejected. To avoid this, use [Parameter.valueOr].
- final value;
+ get value => _value;
+ final _value;
- Parameters(this.method, this.value);
+ Parameters(this.method, this._value);
/// Returns a single parameter.
///
@@ -141,15 +142,16 @@
}
var path = computePath(params._parent);
- return params._key is int ?
- "$path[${params._key}]" : "$path.${quoteKey(params._key)}";
+ return params._key is int
+ ? "$path[${params._key}]"
+ : "$path.${quoteKey(params._key)}";
}
return computePath(this);
}
/// Whether this parameter exists.
- final exists = true;
+ bool get exists => true;
Parameter._(String method, value, this._parent, this._key)
: super(method, value);
@@ -307,7 +309,7 @@
'missing required parameter $_path.');
}
- final exists = false;
+ bool get exists => false;
_MissingParameter(String method, Parameters parent, key)
: super._(method, null, parent, key);
diff --git a/pubspec.yaml b/pubspec.yaml
index 8cb0dc8..01cb528 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,5 +1,5 @@
name: json_rpc_2
-version: 2.0.1
+version: 2.0.2
author: Dart Team <misc@dartlang.org>
description: An implementation of the JSON-RPC 2.0 spec.
homepage: http://github.com/dart-lang/json_rpc_2