Coder Social home page Coder Social logo

darttutorial's Introduction

Dart Programming Tutorial for Beginners

Learn Dart Programming, its basics and Fundamentals from scratch.

Topics to be covered

  1. Overview
    • Course introduction, prequisites and software required
  2. Installation
    • Install required softwares for Windows, MAC and Linux ( Ubuntu )
  3. Getting Started with Dart Programming
    • Run your first app in Dart
    • Comments
  4. Exploring Data Types and Variables
    • Data Types and Variables
    • String, Literals and String Interpolation
    • Define constants using "final" and "const" keywords
  5. Control Flow Statements
    • IF ELSE
    • Conditional Expressions
    • Ternary Operator
  6. Loop Control Statements
    • What are Iterators?
    • FOR Loop and how it works
    • WHILE Loop
    • DO WHILE Loop
    • BREAK statements
    • CONTINUE keyword
    • Labelled FOR Loop
  7. Exploring Functions or Methods
    • Declaring functions
    • Function Expressions: Short hand syntax or using FAT ARROR
    • Optional Positional Parameters
    • Optional Named Parameters
    • Optional Default Parameters
  8. Exception Handling
    • Demo with example
    • Custom Exception Class
  9. Object Oriented Programming: Getting Started
    • Defining Class and creating Objects
    • Instance and field variables
    • Constructors
      • Default
      • Named
      • Parameterized
  10. More on Object Oriented Dart
    • Inheritance
    • Getter and Setter
    • Private Instance Variable
    • Polymorphism
    • Using constructors in Inheritance
    • Static variables and methods
  11. Functional Programming in Dart
    • Lambda Expression
    • Higher-Order Functions
    • Lexical Closures
  12. Dart Collections
    • Arrays or List
      • Fixed Length List
      • Growable List
    • Set and HashSet
    • Map and HashMap
  13. Callable Classes
  14. Conclusion

Authors

  • Sriyank Siddhartha

darttutorial's People

Contributors

smartherd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

darttutorial's Issues

String issue in online complier

When I use String keyword to declared name without Initialize with value it's show me error, but when I used var instead of String it's work fine.

How can I use switch statement to change listview colors

here is the code .i need help in switch case. I watched this video but I need more examples to completely understand switch case..

How can i use switch case to change bg color of listview .I want to add 10 different types of colors in listview


ListView.builder(
  itemBuilder: (BuildContext context, int index) {
    return Container(
      color: (index % 10 == 0) ? Colors.red : Colors.green,
      child: ListTile(
        title: ...
      ),
    );
  },
)

dart pdf

I have make a pdf on dart if you want i can attach and make a pull request if yes reply to me
thanks

Outdated Issues

Error in Fixed-Length List Declaration:

The fixed-length list is declared incorrectly, leading to a compilation error.

List numbersList = List(5); // This line causes an error

Error: The class 'List' doesn't have an unnamed constructor.

Proposed Fix: Replace it with List<int?> numbersList = List<int?>.filled(5, null);.

Error in For-Each Loop:

There's a type mismatch in the for-each loop due to the use of nullable integers.

for (int element in numbersList) { // This line causes a type mismatch error
  print(element);
}

Proposed Fix: Change it to for (int? element in numbersList) {

Current Version of Dart SDK : 3.2.5 / 17 January 2024

Migrate Project

Hello Sir! I am importing this project but getting errors I am just wanted to ask what is the solution for these errors one of them is not resolving pubspec.ymal file..........
Warning: You are using these overridden dependencies:
! flutter_web 0.0.0 from git https://github.com/flutter/flutter_web at c04fb5 in packages/flutter_web
! flutter_web_ui 0.0.0 from git https://github.com/flutter/flutter_web at c04fb5 in packages/flutter_web_ui

Return Type issue

I found my interest in this repo so I just download it and open it into VSCode and found some error like
e.i. in 17_default_parameters has a function
int findVolume(int length, {int breadth = 2, int height = 20}) {
print("Lenght is $length");
print("Breadth is $breadth");
print("Height is $height");

print("Volume is ${length * breadth * height}");
}
this function doesn't return an integer value although the type is int.
Correct me If I did any mistake from my side.

Thank You

Most of the tutorial is outdated

I just started with dart but it seems that this tutorial is outdated and the most recent dart version has
groundbreaking changes that break backwards compatibility.

this is from 21_getters_setters for example:

class Student {

  String name; // Non-nullable instance field 'name' must be initialized.

  double _percent; // Non-nullable instance field '_percent' must be initialized.

  void set percentage(double marksSecured) => _percent = (marksSecured / 500) * 100;

  double get percentage => _percent;
}

I copied the errors that dartpad.dev gave me, into the code above as comments.

both the name and _percent fields have to be initialized now. it's saying about non-nullable types,
I'm pretty sure I read somewhere that every type in dart is an object and therefore set to null when initialized without a value.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.