Skip to content

Commit 699778d

Browse files
PawlikMichal25th3brinkphillwigginsmregandla
authored
Specifying return type of get<T> as T instead of dynamic (#310)
* Fixed the Parse().initialize's return value (#307) * Release/1.0.26 - Update docs * Updated Live Queries related documentation (#301) * Fixed the parse initialize method Parse().initialize returns a new instantiation of the Parse class, but it should return the initialized instance. Co-authored-by: Phill Wiggins <[email protected]> Co-authored-by: mregandla <[email protected]> * Specified T return type instead of dynamic for get<T> method Co-authored-by: James Brinkerhoff <[email protected]> Co-authored-by: Phill Wiggins <[email protected]> Co-authored-by: mregandla <[email protected]>
1 parent 6c95686 commit 699778d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/src/objects/parse_base.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ abstract class ParseBase {
220220
/// Returns null or [defaultValue] if provided. To get an int, call
221221
/// getType<int> and an int will be returned, null, or a defaultValue if
222222
/// provided
223-
dynamic get<T>(String key, {T defaultValue}) {
223+
T get<T>(String key, {T defaultValue}) {
224224
if (_getObjectData().containsKey(key)) {
225225
if (T != null && _getObjectData()[key] is T) {
226226
final T data = _getObjectData()[key];

0 commit comments

Comments
 (0)