0% found this document useful (0 votes)
7 views18 pages

Unit 3 ADAD

The document covers various aspects of Flutter and Dart programming, including the importance of Flutter, the Dart main() function, control flow statements, and the definition and calling of functions. It also explains the Column and Row widgets, Dart data types, and object-oriented programming principles in Dart, such as classes, objects, encapsulation, inheritance, and polymorphism. Additionally, it addresses app structure and navigation in Flutter.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views18 pages

Unit 3 ADAD

The document covers various aspects of Flutter and Dart programming, including the importance of Flutter, the Dart main() function, control flow statements, and the definition and calling of functions. It also explains the Column and Row widgets, Dart data types, and object-oriented programming principles in Dart, such as classes, objects, encapsulation, inheritance, and polymorphism. Additionally, it addresses app structure and navigation in Flutter.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

Q.1) Explain the importance of Flutter.

Q.2) Explain Dart main() function & Dart Variables.


Q.3) Write Control Flow Statement in Dart.
Q.4) Define a Function as well as calling of a function in Dart programming.
Q.5) Explain Column and Row Widget of Flutter.
Q.6) Recall Dart Data Types.
Q.7 )Explain Object Oriented programming in Dart.

Object-oriented programming (OOP) in Dart is a paradigm that revolves around the


concept of "objects," which are instances of "classes." Dart, being an object-oriented
language, provides features that support the core principles of OOP: encapsulation,
inheritance, and polymorphism.

Here's a breakdown of OOP concepts in Dart:

1. Classes and Objects:

● Classes:
○ A class is a blueprint or template for creating objects. It defines the
properties (fields) and behaviors (methods) that objects of that class will
have.
○ In Dart, you define a class using the class keyword.

Example:
Dart
class Car {
String make;
String model;
int year;

void startEngine() {
print('Engine started');
}
}


● Objects:
○ An object is an instance of a class. It represents a specific entity with the
properties and behaviors defined by its class.
○ You create objects using the new keyword (though it's optional in modern
Dart).

Example:
Dart
void main() {
var myCar = Car(); // Creates an object of the Car class
myCar.make = 'Toyota';
myCar.model = 'Camry';
myCar.year = 2023;
myCar.startEngine();
}

2. Encapsulation:

● Encapsulation is the principle of bundling data (fields) and methods that operate
on that data within a single unit (a class).
● It also involves controlling access to the internal state of an object, often using
access modifiers.
● In Dart:
○ By default, members (fields and methods) are public.
○ To make a member private, prefix its name with an underscore (_). Private
members are accessible only within the library where they are declared.
○ Getters and setters are often used to control access to private fields.
Q.8) Explain App Structure and Navigation in Flutter.

You might also like