Assignment 1 (Mad)
Assignment 1 (Mad)
Introduction to Dart :-
Dart is the open-source programming language originally developed by
Google. It is meant for both server side as well as the user side. The Dart SDK
comes with its compiler – the Dart VM and a utility dart2js which is meant for
generating Javascript equivalent of a Dart Script so that it can be run on
those sites also which don’t support Dart.
Dart is Object-oriented language and is quite similar to that of Java
Programming. Dart is extensively use to create single-page websites and
web-applications. Best example of dart application is Gmail.
You can install Dart SDK from their official website or download the installer
from this site.
To Update Dart:
C:\> choco upgrade dart-sdk
To change the PATH for future terminal sessions, use a command like this:
$ echo 'export PATH="$PATH:/usr/lib/dart/bin"' >> ~/.profile
For Mac OS: Install Homebrew , and then run the following
commands:
$ brew tap dart-lang/dart
$ brew install dart
Step 1: Open the Android Studio IDE and select Start a new Flutter project.
Step 2: Select the Flutter Application as the project type. Then click Next.
Step 3: Verify the Flutter SDK path specifies the SDK’s location (select Install
SDK… if the text field is blank).
Step 4: Enter a project name (for example, myapp). Then click Next
Step 5: Click Finish and wait till Android Studio creates the project.
Step 6: Edit the code
// Main Function
void main() {
// Giving command to runApp() to run the app.
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(title),
),
// Sets the content to the
// center of the application page
body: const Center(
// Sets the content of the Application
child: Text(
'Welcome to GeeksForGeeks!',
)),
);
}
}
Conclusion: