skip to Main Content
import 'package:flutter/material.dart';
import 'dart:math';
import 'dart:io';

main(){
  print("Enter the first number:");
  String num1 = stdin.readLineSync()!;
  print("Enter the second number:");
  String mun2 = stdin.readLineSync()!;
  print(num1 + mun2);
}

Whenever i try this code to extract the input i get this error, console doesn’t ask for input as well, set aside to printing string with input variable!
enter image description here

2

Answers


  1. dart:io doesn’t work on the web. Try to run it as a console application.

    Login or Signup to reply.
  2. 01 – Frist Check Your Internet

    02 – After Check Your Emulator Showing The Bottom Right

    (Frist Run Cmd – Flutter Doctor Command , i think Flutter Missing Operations.)

    flutter doctor

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search