Answers for "get type of variable dart"

3

how to find the type of object in dart

var x = [32,4424];
print(x.runtimeType);

O/P:-
JSArray<int>
Posted by: Guest on December-08-2020
3

dart check type of variable

class Foo { }

main() {
  var foo = new Foo();
  if (foo is Foo) {
    print("it's a foo!");
  }
}
Posted by: Guest on April-29-2021

Code answers related to "Dart"

Browse Popular Code Answers by Language