Skip to content

vig31/Dart-Programming-For-Flutter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🎯Dart Programming from 🤓Fundas to 🚀Advanced


What is Flutter?

Flutter is a mobile app development framework created by Google. It allows you to create high-quality native interfaces on both Android and iOS platforms with a single codebase, meaning you write code once and can deploy it to both platforms. Flutter uses a programming language called Dart, which is designed to be easy to learn for developers with a range of programming backgrounds. It also includes a comprehensive set of pre-built widgets that allow you to create stunning and responsive user interfaces with ease. Flutter uses a "reactive" programming model, which means that instead of updating the UI directly, you describe what the UI should look like in response to certain events or data changes, and Flutter takes care of the rest. In summary, Flutter is a powerful tool for mobile app development that can help you create beautiful, responsive, and high-quality apps for both Android and iOS platforms with minimal effort.

What is Dart Programming?

Flutter uses the Dart programming language as its primary language for building mobile applications. Dart is an object-oriented language with C-style syntax that was specifically designed to be easy to learn, easy to read, and easy to scale. In Flutter, Dart is used to define the structure and behavior of the user interface, as well as the logic that drives the app. You can use Dart to create custom widgets and layout templates, as well as to define the business logic that powers your app. For example, you might use Dart to create a custom widget that displays a list of items, such as a list of products in an e-commerce app. You could define the appearance and behavior of this widget using Dart code, and then reuse this widget throughout your app whenever you need to display a list of items. Dart also provides a number of powerful features that are useful for building mobile applications, such as asynchronous programming using Futures and Streams, and support for functional programming concepts like higher-order functions and lambdas. Overall, Dart is a powerful and flexible language that is well-suited to building high-quality mobile applications with Flutter.

How to learn Dart programming for flutter?

Learning Dart programming for Flutter involves understanding the basics of the Dart language, and then applying that knowledge to building Flutter apps. Here are some steps you can take to get started:

  1. Learn the basics of Dart: Start by familiarizing yourself with the syntax and structure of the Dart language. There are many online resources available to help you learn Dart, including tutorials, documentation, and courses.
  2. Explore the Flutter framework: Familiarize yourself with the Flutter framework, and learn about its key features and concepts. The Flutter website has extensive documentation..
  3. Build sample apps: Start by building some simple Flutter apps to get a feel for how the framework works.
  4. Practice, practice, practice: The best way to become proficient in Dart and Flutter is to practice building apps on your own. Start by building small, simple apps and gradually work your way up to more complex projects. Remember to use online resources and seek help from the community whenever you get stuck. In summary, learning Dart programming for Flutter involves a combination of learning the basics of the Dart language and exploring the Flutter framework. By following these steps and practicing regularly, you can become proficient in building high-quality mobile apps using Dart and Flutter.

What is variables and data types in dart?

In Dart, a variable is a container that holds a value, and data types define the type of values that can be stored in a variable. And this is stored inside a specific place called memory. Memory can be a storage device like hard-disk, SD-card, Ram here our variable takes memory or space from RAM. To know more about RAM click here. Here are some common data types in Dart:

  1. Int
  2. Double
  3. Num
  4. String
  5. Bool
  6. List
  7. Map
  8. Set Now Lets create a variable and initialize with our name. Syntax: Data_Type_ _Identifier/variableName = Data/Expression ; Here is code for the example:
// Integer value
int myHeight = 175;
// Double value
double price = 9.99;
// String value
String name = "Vignesh Veerasamy";
// Bool value
bool isActive = true;
// Collection of whole number / integer
List<int> numbers = [1, 2, 3, 4, 5];

In Dart, you use the var keyword followed by the variable name and the data type:

var age = 30; // integer
var price = 9.99; // double
var name = "Vignesh Veerasamy"; // string
var isActive = true; // boolean
var numbers = [1, 2, 3, 4, 5]; // list

In summary, variables in Dart are containers that hold values, and data types define the type of values that can be stored in a variable. By understanding the different data types in Dart, you can create variables that hold a wide range of values and use them in your Dart and Flutter applications.