Skip to main content

Posts

Showing posts from March, 2025

Flutter Developer Interview Questions & Answers

Flutter Developer Interview Questions & Answers Flutter Developer Interview Questions & Answers Preparing for a Flutter Developer interview? Here are some essential questions and their answers. 1. Flutter Basics & Dart Language What is Flutter, and why did you choose it for app development? Flutter is an open-source UI toolkit developed by Google for building natively compiled applications for mobile, web, and desktop from a single codebase. Difference between StatefulWidget and StatelessWidget class MyStatelessWidget extends StatelessWidget { @override Widget build(BuildContext context) { return Text("I never change!"); } } 2. State Management When would you use GetX over Provider or BLoC? - GetX: Best for small projects, minimal boilerplate. - Provider: Good for dependency injection. - BLoC: Best for large apps with structured state management. 3. Performance Op...

OOP in Dart - A Complete Guide

OOP in Dart - A Complete Guide Object-Oriented Programming (OOP) in Dart Dart is an object-oriented language that supports key OOP principles: Encapsulation Abstraction Inheritance Polymorphism 1. Encapsulation (Data Hiding) Encapsulation restricts direct access to object properties and provides controlled access via methods. class BankAccount { String _accountNumber; double _balance; BankAccount(this._accountNumber, this._balance); double get balance => _balance; void deposit(double amount) { if (amount > 0) { _balance += amount; print("Deposited: \$${amount}, New Balance: \$${_balance}"); } } void withdraw(double amount) { if (amount > 0 && amount 2. Abstraction (Hiding Implementation Details) abstract class Animal { void makeSound(); } class Dog extends Animal { @override void makeSound() { ...

Understanding Static Keyword in Flutter (Dart)

Understanding Static Keyword in Flutter (Dart) Understanding Static Keyword in Flutter (Dart) The static keyword in Flutter (Dart) is used to declare class-level variables and methods. This means that the member belongs to the class itself rather than an instance of the class. Key Features of static in Flutter (Dart) Class-Level Access: Static members can be accessed using the class name without creating an instance. Memory Optimization: Static members are stored once in memory and shared across all instances. Cannot Use this : Static members do not belong to an instance, so they cannot use this . Usage of static in Dart 1. Static Variables Static variables belong to the class rather than instances. class MyClass { static String appName = "Zamalyft"; } void main() { print(MyClass.appName); // Access without an inst...