Last active
January 9, 2019 13:52
-
-
Save Keksinautin/5366adf409b6762440cdf3c60ab5404b to your computer and use it in GitHub Desktop.
Error: A value of type 'int' can't be assigned to a parameter of type 'FutureOr<int>'.
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
import 'dart:async'; | |
class A { | |
final FutureOr<int> a; | |
const A({this.a: 2}); | |
} | |
void main() async { | |
final b = const A(); // Here we have an error; | |
///But in this case it works well | |
//final b = new A(); | |
print(b.a); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment