📜  Dart 整数用户输入 - 无论代码示例

📅  最后修改于: 2022-03-11 15:00:29.536000             🧑  作者: Mango

代码示例1
import 'dart:io';

void main() {
  int value = stdin.readIntSync();
  print(value);
}

extension ReadIntSyncOnStdin on Stdin {
  int readIntSync() => int.parse(this.readLineSync());
}