#30DaysMasterFlutter
Learn the basics of Flutter and Dart in 30 days! We provide a roadmap, resources, and project ideas to help you along your journey.
back to 30 Days to Master FlutterDay 2: First Dart App
Create and run your first Dart console application. This will allow you to get familiar with the Dart syntax and how to write a simple console application using it.
Project - Greet User
Create a Dart console application that asks the user for their name and prints a greeting message to the console.
Hello <name>!
By the end of this day, you should have a basic understanding of the Dart syntax and how to write a simple console application using it.
dart create command. The default template is a console application.dart create greet_user
cd greet_user
dart run stdin.readLineSync() function. For example:import 'dart:io';
void main() {
print("Enter anything:");
String? input = stdin.readLineSync();
print("You entered: $input");
} readLineSync() returns a nullable String?, because there may be no input. Handle the null case, for example with input ?? 'stranger'.Learn the basics of Flutter and Dart in 30 days! We provide a roadmap, resources, and project ideas to help you along your journey.
back to 30 Days to Master FlutterJoin our community on Discord to connect with fellow learners, share your progress, and get help with any questions you may have throughout the #30DaysMasterFlutter challenge. Join now and get started on your journey to mastering Dart and Flutter!