Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/dart/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Flutter 包含颤振中int的函数_Flutter_Dart - Fatal编程技术网

Flutter 包含颤振中int的函数

Flutter 包含颤振中int的函数,flutter,dart,Flutter,Dart,找出整数包含的数字的最佳方法是什么 例如: 我有一个int,它是96,我想看看它是否有9返回某些内容,以及它是否没有返回其他内容 // this will return true if your int contains the pattern bool intContains(myInt,pattern){ return myInt.toString().contains(pattern.toString()); }

找出整数包含的数字的最佳方法是什么 例如:
我有一个int,它是
96
,我想看看它是否有
9
返回某些内容,以及它是否没有返回其他内容

// this will return true if your int contains the pattern
bool intContains(myInt,pattern){
   return myInt.toString().contains(pattern.toString());
}