Bhoot Er Dunia

Bhoot Er Dunia

Share

He matched his vision of the ghost world through this show. Bhoot Er Dunia.

A weekly ghost storytelling program run by a popular ghost storyteller, where he shares ghost experiences, stories, tales and myths with himself and other people.

26/09/2024

How do I create and use classes and objects in Dart?

In Dart, creating and using classes and objects follows a similar structure to other object-oriented languages. Here’s a basic overview:
1. Creating a Class
A class is a blueprint for creating objects. It defines properties (variables) and methods (functions) that the objects created from the class will have.
Here’s an example of a simple class:

class Person {

String name;
int age;
Person(this.name, this.age);

void displayInfo() {
print('Name: $name, Age: $age');
}
}

In this class:
name and age are properties (also called fields or attributes).
The constructor Person(this.name, this.age) initializes the properties when the object is created.
displayInfo is a method that displays the person's name and age.
2. Creating an Object
Once you’ve defined a class, you can create objects from it. Objects are instances of the class and have access to the class’s properties and methods.

void main() {

Person person1 = Person('John Doe', 25);
print(person1.name);
person1.displayInfo();
}

3. Private Properties and Methods
In Dart, you can make properties and methods private by prefixing them with an underscore (_).

class Car {

String _model;

Car(this._model);
String getModel() {
return _model;
}
}

4. Getters and Setters
Getters and setters allow controlled access to class properties. Dart supports automatic getters and setters, but you can also define them explicitly.

class Rectangle {
double _width;
double _height;

Rectangle(this._width, this._height);

double get area => _width * _height;

set width(double value) {
_width = value;
}

set height(double value) {
_height = value;
}
}

5. Inheritance
In Dart, a class can inherit properties and methods from another class using the extends keyword.
dart
class Animal {
void makeSound() {
print('Animal makes a sound');
}
}

class Dog extends Animal {

void makeSound() {
print('Dog barks');
}
}

void main() {
Dog dog = Dog();
dog.makeSound(); // Output: Dog barks
}

6. Abstract Classes and Interfaces
An abstract class is a class that cannot be instantiated. You use it as a base class that other classes inherit from. It can contain abstract methods (methods without implementation).
abstract class Shape {
double getArea();
}

class Circle extends Shape {
double radius;

Circle(this.radius);


double getArea() => 3.14 * radius * radius;
}

void main() {
Circle circle = Circle(5);
print(circle.getArea()); // Output: 78.5
}

Summary
Class: A blueprint for creating objects.
Object: An instance of a class.
Constructor: A special method to initialize objects.
Methods: Functions inside a class.
Getters and Setters: Control how you access and set property values.
Inheritance: Reusing and extending functionality from another class.
Abstract Classes: Classes with unimplemented methods, serving as a template for subclasses.
You can use these building blocks to create more complex applications in Dart.

Hire Me: https://www.fiverr.com/s/Gzyjzoz
Behance Portfolio: https://www.behance.net/susmoydutta
---------------------
Linkedin Profile: https://www.linkedin.com/in/susmoy-dutta/
------------------
-edge

Photos from Bhoot Er Dunia's post 26/09/2024

I will create responsive mobile app develope with flutter firebase

---------------------------
Are You Looking for an Amazing Flutter App Developer? This is the Right Place!
Hello there!
If you need to create hybrid apps with Flutter, I am here to help you build amazing Flutter UIs and responsive mobile apps. My focus is on delivering user-friendly interfaces, complete with features like splash screens and more. As an expert Flutter developer, I can turn your ideas into a functional and beautiful app.
What Services Are Included?
Splash Screen Creation: I will design an engaging splash screen for your Flutter app to make a great first impression.
Animated Login and Logout Screens: Get smooth and animated login/logout screens that enhance the user experience.
Responsive Flutter Apps: I create apps that are responsive, ensuring they look great on any device.
Intuitive Interfaces: I can build a sleek and intuitive interface for your Flutter app, making it easy to use.
After-Sale Service: I provide ongoing support to ensure your app runs smoothly after launch.
Security Features: I can implement security measures to protect your app and its users.

---------------------------
Hire Me: https://www.fiverr.com/s/vvo7YEe
------------------------
Behance Portfolio: https://www.behance.net/susmoydutta
---------------------
Linkedin Profile: https://www.linkedin.com/in/susmoy-dutta/
-edge

23/09/2024

How do I use generics in Dart to create a reusable data structure like a Stack?

Generics in Dart allow you to create reusable and type-safe data structures and functions. By defining a class or method with a type parameter, you can work with different data types without sacrificing type safety. For example, a generic Stack class can store elements of any type, such as integers, strings, or custom objects, while ensuring that only the specified type is used throughout the stack's operations. This not only makes your code more flexible and reusable but also helps prevent runtime errors by catching type mismatches at compile time. Using generics, you can build robust and versatile components that integrate seamlessly into various parts of your application.
Here's an example implementation of a generic Stack in Dart:

class Stack {
final List _stack = [];

void push(T value) {
_stack.add(value);
}
T pop() {
if (_stack.isEmpty) {
throw StateError('No elements in the stack');
}
return _stack.removeLast();
}

T peek() {
if (_stack.isEmpty) {
throw StateError('No elements in the stack');
}
return _stack.last;
}


bool get isEmpty => _stack.isEmpty;
int get length => _stack.length;
}

Usage Example:
void main() {
Stack intStack = Stack();
intStack.push(1);
intStack.push(2);
print(intStack.pop()); // Outputs: 2


Stack stringStack = Stack();
stringStack.push('hello');
stringStack.push('world');
print(stringStack.peek()); // Outputs: 'world'
}

Explanation:
Generic Type : The Stack class is defined with a generic type parameter T, allowing it to store elements of any type.
Internal List: The _stack list holds the stack elements.
Stack Operations: Methods like push, pop, peek, and isEmpty provide standard stack functionality.
Type Safety: Using generics ensures that the stack is type-safe and can be used with any data type.

Hire Me: https://www.fiverr.com/s/GzyjzyZ
-------
Behance Portfolio: https://www.behance.net/susmoydutta
---------------------
Linkedin Profile: https://www.linkedin.com/in/susmoy-dutta/
-----------
-edge

Photos from Bhoot Er Dunia's post 23/09/2024

I will create responsive flutter ui android and iOS apps with flutter

Are You Looking for an Amazing Flutter App Developer? This is the Right Place!
Hello there!
Do you need to create an Android or iOS app with Flutter? I specialize in building amazing Flutter UIs and responsive mobile apps that offer a seamless, user-friendly experience.
What Services Are Included?
Splash Screen Creation: I'll design an eye-catching splash screen for your app.
Animated Login and Logout Screens: Get an engaging, animated UI for login and logout to enhance user experience.
Responsive Flutter Apps: I ensure your app looks great and works smoothly on all devices.
Intuitive Interfaces: I build clean, attractive interfaces to make your app user-friendly.
After-Sale Support: I offer continued support to ensure your app runs smoothly post-launch.
Security: I implement security features to protect your app and user data.
---------------------------
Hire Me: https://www.fiverr.com/s/pdyLNwY
------------------------
Behance Portfolio: https://www.behance.net/susmoydutta
---------------------
Linkedin Profile: https://www.linkedin.com/in/susmoy-dutta/
-edge

susmoydutta03 | Profile | Fiverr 07/08/2022

susmoydutta03 | Profile | Fiverr Hello, Amazing People! I am a professional software engineer. I work with clients from all around the world to build iOS & Android apps and website designs.

Bhoot Er Dunia Ep:1. 28/12/2020

Bhoot Er Dunia Ep:1. Bhoot Er Dunia||একটি জনপ্রিয় ভূত গল্পকার দ্বারা পরিচালিত একটি সাপ্তাহিক ভুতের গল্প বলার প্রোগ্রাম, যেখানে তিনি নিজের এবং ...

Want your business to be the top-listed Gym/sports Facility in KOLKATA?

Click here to claim your Sponsored Listing.

Location

Address

Kolkata
700129