This repository was created to provide the basics of the Dart programming language and Its use cases.

Overview

dart-exercises


A collection of source code of the Dart Programming language.

How does this repository works?

  • Clone / Fork this repository to make your own copy of it.
  • All source code placed inside the bin folder.
  • Open file named programN.dart where N is a numeric representation.
  • Read the comment(s) inside it, if needed. Comment starts with // or ///.
  • Almost each files has the main function. main is a function where the program execution begins.
  • To run a current file use Ctrl+Shift+F10 shortcut key.
  • If you have any issue with this repository, then post here
  • Our discussions panel is always open to chat on repository related topics

Tools

OR


Programs

program1.dart | Printing a name

void main() {
  const name = "Dipak";
  print("Hello my name is $name");
}

program2.dart | Printing out name and profession of a person

void main() {
  const String name = "Dipak"; 
  const profession = "developer"; 
  print("Hi my name is $name and I'm a $profession.");
}

program3.dart | Printing numbers

void main() {
  for(int number = 1; number <= 100; number++) {
    print("The number is $number");
  }
}

program4.dart | Getting input from user

import 'dart:convert';
import 'dart:io';

void main() {

  stdout.write("Please enter your name: ");
  var name = stdin.readLineSync(encoding: utf8);

  print("Hello $name. It's nice to see you're learning Dart. ๐Ÿ™‚");
}

program5.dart | Swapping two integers

import 'dart:io';

void main() {
  var firstNumber, secondNumber;

  stdout.write("Enter the first number: ");
  firstNumber = int.parse(stdin.readLineSync() ?? "0");

  stdout.write("Enter the second number: ");
  secondNumber = int.parse(stdin.readLineSync() ?? "0");

  // Swapping two integers
  firstNumber = firstNumber + secondNumber;
  secondNumber = firstNumber - secondNumber;
  firstNumber = firstNumber - secondNumber;

  print("first number: $firstNumber \nsecond number: $secondNumber");
}
You might also like...

Fan-made, handmade, recursive-descent parser for the Dart programming language.

Very Unofficial Parser Fan-made, handmade, recursive-descent parser for the Dart programming language. Although this parser strives to parse the langu

Nov 21, 2022

Flutter language pickers2 - Language pickers package for Dart and Flutter

Flutter language pickers2 - Language pickers package for Dart and Flutter

language_pickers2 Notes: Original repository from github.com/gomgom, unfortunate

Feb 6, 2022

Hive Wait provide a Hive repository to calling methods in the box as async.

Hive Wait provide a Hive repository to calling methods in the box as async.

May 10, 2022

Flutter Package used to 'edit' basics aspects [Brightness, Contrast, Saturation, etc...] from a widget or image.

on_image_matrix on_image_matrix is a Flutter Package used to 'edit' basics aspects [Brightness, Contrast, Saturation, etc...] from a widget or image.

Oct 23, 2022

FIDL(Flutter Interface Definition Language) is a language for transfer objects cross platforms.

FIDL(Flutter Interface Definition Language) is a language for transfer objects cross platforms.

Flutter Interface Definition Language (FIDL) README in English(TODO) FIDL ๅณ Flutter ๆŽฅๅฃๅฎšไน‰่ฏญ่จ€๏ผŒ็ฑปไผผไบŽAIDL(Android Interface Definition Language)ใ€‚ๆ‚จๅฏไปฅๅˆฉ็”จๅฎƒๅฎšไน‰ไธๅŒๅนณๅฐ

Dec 7, 2022

Eflashcard - Ready to learn a new language? Try this flashcards app that will help you learn the different writing systems of each language

Eflashcard - Ready to learn a new language? Try this flashcards app that will help you learn the different writing systems of each language

Language Flashcards Mobile App Ready to learn a new language? Try this mobile fl

Jan 8, 2022

This application was created using the Dart language and it is an application that contains a set of different questions and at the end shows you the number of correct answers you have answered , made by flutter

exams_app A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if thi

Dec 28, 2021

A simple yet elegant tip calculator created using flutter framework and dart language.

CAL- TIP, A TIP CALCULATOR APPLICATION A simple yet elegant tip calculator created using flutter framework and dart language. As the name suggests, th

Dec 26, 2021
Owner
Technosoft Labs
Technosoft Labs is a Software company specializes in Website and Mobile application services and development.
Technosoft Labs
App concept created with Flutter using Dart programming language, inspired by Groceries Shopping App Interaction.

Grocery Shop Flutter App concept created with Flutter using Dart programming language, inspired by Groceries Shopping App Interaction. About The app w

Wilton Neto 485 Dec 9, 2022
The component created with Flutter using Dart programming language, inspired in Fluid Slider by Ramotion.

Fluid Slider Flutter The component created with Flutter using Dart programming language, inspired in Fluid Slider by Ramotion. About The component was

Wilton Neto 41 Sep 30, 2022
Flutter component concept created with Flutter using Dart programming language, inspired by Gooey Rab Bar.

Gooey Tab Bar Flutter Flutter component concept created with Flutter using Dart programming language, inspired by Gooey Tab Bar. About This component

Wilton Neto 216 Dec 14, 2022
I start to learn dart-flutter. And also this project was basics of Dart

learning_dart A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if

Natiq Haciyev 3 Dec 14, 2022
Docker images for the Dart programming language (https://dart.dev)

dart-docker This is the Git repo of the Docker "Official Images" for the Dart programming language. See the Docker Hub page for a full description on

Dart 49 Dec 14, 2022
A Dart EPUB parser built from the ground up, and designed to support a variety of use cases and custom

A Dart EPUB parser built from the ground up, and designed to support a variety of use cases and custom implementations such as on-device caching and serving content from a server.

getBoolean 11 Nov 3, 2022
Intel Corporation 238 Dec 24, 2022
Implementation of data structures and algorithms in Dart programming language.

Algorithms in Dart Implementation of several algorithms with Dart programming language. Use dartdoc to generate documentation. Lists List data structu

Mafinar Khan 197 Dec 24, 2022
๐Ÿ‡ฎ๐Ÿ‡ช A generic programming language interpreter, linter, formatter, and all that jazz, written in Dart.

Irishman ???? A generic programming language interpreter, linter, formatter, and all that jazz, written in Dart. Installation To install this package

Fairfield Programming Association 2 Oct 8, 2022
Repo for Teach Yourself mastering dart programming language

mastering-dart Repo for Teach Yourself mastering dart programming language Chapter Membuat Aplikasi Pertama Menggunakan Dart Percabangan Perulangan Fu

Feri Lukmansyah 50 Nov 10, 2022