Answers for "dart taking input from user"

1

dart get String input from user

import 'dart:io'; 
  
void main() 
{ 
    print("Enter your name?"); 
    // Reading name of the Geek 
    String name = stdin.readLineSync(); 
  
    // Printing the name 
    print("Hello, $name! nWelcome to GeeksforGeeks!!"); 
}
Posted by: Guest on November-08-2020
2

how to take user input in a flutter app

For userinput, we have a widget called TextField(), An example is given below:
- The decoration field, is self explanatory.
- The labelText: tells user about what he/she has to provide in the respective TextField(). 
TextField(
	decoration: InputDecoration(labelText: 'Title'),
),
Posted by: Guest on October-19-2020

Code answers related to "dart taking input from user"

Code answers related to "Dart"

Browse Popular Code Answers by Language