Home > Software engineering >  error while executing dart code in android studio
error while executing dart code in android studio

Time:10-31

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

CodePudding user response:

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

CodePudding user response:

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

  • Related