Answers for "check data type in 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
0

check data type flutter

selector.runtimeType // return data type of the variable

Example:
if (selector.runtimeType == int) print("Hello")
Posted by: Guest on April-25-2021
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