This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Error compiling to JavaScript: | |
// unsupported import: dart:io in DartPad | |
// Also dart:io is not supported into DartPad. | |
// Dart:io is also not supported into Web Browser you have to run it Like mobile app only | |
// Also you can use other tool as well Named JDoodle : "https://www.jdoodle.com/execute-dart-online/" | |
import 'dart:io'; | |
void main() { | |
int number; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:io'; | |
void main(){ | |
int n= 5; | |
for(int i = 1 ; i<=n; i++) | |
{ | |
for(int j =i; j<n ;j++) | |
{ | |
stdout.write(" "); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Types of Arithmetic Operator | |
// Plus + | |
// Minus - | |
// Multiplication * | |
// Division / with Default return type as Double | |
// Division ~/ with Return tyoe as Int | |
// -(operand) Unary Minus | |
void main() { | |
print("Example of Arithmetic operators => \n"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Assignment Operator in Dart | |
void main() { | |
print("Example of Equality & Logical operators => \n"); | |
///Function Calling | |
Compare(); | |
} | |
//Function for adding three variables | |
void Compare() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Types OF Comparision Operators | |
// Greator Than > | |
// Less Than < | |
// Greator Than Equal to >= | |
// Less Than Equal to <= | |
//main Method | |
void main() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Types of Increment & Decrement Oprators | |
// += | |
// -= | |
// *= | |
// /= | |
// (operand++) | |
// (operand--) | |
// (++operand) | |
// (--operand) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Different types of loops in Dart | |
// while Loop | |
// Do While Loop | |
// For loop | |
// For In or For Each Loop | |
void main() { | |
//Function Calling | |
whileLoop(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main() { | |
fullName("Harsh", "Shah"); // first Name , Last Name will Print | |
fullName("Harsh", "Shah", | |
"Software Developer"); //Titel, first,last name will prints | |
List vehical = ['Car', 'Bike', 'Cycle', 'Truck']; //list of strings | |
List vehical1 = ['Ship', 'Aeroplane', 'Rocket', 'Helicopter']; | |
final numbers = [42, -1, 299792458, 100]; // list of integers |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use of Ansynchronous Function adn Opration in Dart | |
// A future represents the result of an asynchronous operation | |
// it's have two states: uncompleted or completed. | |
// To define an async function, add async before the function body | |
// The await keyword works only in async functions | |
Future<String> createOrderMessage() async { | |
var order = await fetchUserOrder(); | |
return 'Your order is: $order'; // pizza |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Definition : PFA Array Of Student name, by using dart pad divide all students into group of 4. | |
// final List<String> studentArr = <String>[ | |
// 'Kalpit Seksariya', | |
// 'Gaurang Gajera', | |
// 'Bollam saiprakash', | |
// 'Dhruv Vaghela', | |
// 'Jaydeep Dhamecha', | |
// 'Jigar Pandya', | |
// 'Riddhi Bhavsar', |
OlderNewer