Programming Languages
0/5 sections
0%

Dart

Dart is Google's client-optimized language powering Flutter combining familiar C-style syntax with sound null safety and async/await for fast native apps across mobile, web, and desktop.

1Dart Fundamentals

dart
void main() {
  String name = 'Sufi';
  int age = 30;
  double price = 9.99;
  bool active = true;
  final immutable = DateTime.now();
  const PI = 3.14159;

// Nullable types String? nullable = null; String safe = nullable ?? 'default'; print(nullable?.length);

// String interpolation print('Hello, $name! Age: $age'); print('Upper: ${name.toUpperCase()}');

// Collections var list = [1, 2, 3, 4, 5]; var map = {'key': 'value', 'name': 'Sufi'}; var extended = [...list, 6, 7]; // spread } ```

2Classes & Null Safety

dart
class User {
  final String id;
  String name;
  String? bio;

User({required this.id, required this.name, this.bio});

User.anonymous() : id = 'anon', name = 'Anonymous';

factory User.fromJson(Map json) { return User(id: json['id'] as String, name: json['name'] as String, bio: json['bio'] as String?); }

bool get hasProfile => bio != null && bio!.isNotEmpty; Map toJson() => {'id': id, 'name': name, 'bio': bio};

@override String toString() => 'User($name)'; }

mixin Loggable { void log(String message) => print('[LOG] $message'); }

class Service with Loggable { void doWork() { log('Working...'); } } ```

3Async & Streams

dart
Future<String> fetchUser(int id) async {
  await Future.delayed(Duration(milliseconds: 300));
  return 'User $id';
}

Future loadParallel() async { final results = await Future.wait([fetchUser(1), fetchUser(2), fetchUser(3)]); print(results); }

// Stream multiple async values Stream countDown(int from) async* { for (int i = from; i >= 0; i--) { await Future.delayed(Duration(seconds: 1)); yield i; } }

void listenToStream() { countDown(5).listen( (value) => print(value), onDone: () => print('Done!'), ); } ```

4Flutter Widgets

dart
import 'package:flutter/material.dart';

class UserCard extends StatelessWidget { final String name; final String email; final VoidCallback onTap;

const UserCard({super.key, required this.name, required this.email, required this.onTap});

@override Widget build(BuildContext context) { return Card( elevation: 4, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)), child: InkWell( onTap: onTap, borderRadius: BorderRadius.circular(12), child: Padding( padding: const EdgeInsets.all(16), child: Row(children: [ CircleAvatar(child: Text(name[0].toUpperCase())), const SizedBox(width: 12), Expanded(child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text(name, style: const TextStyle(fontWeight: FontWeight.bold)), Text(email, style: const TextStyle(color: Colors.grey)), ], )), const Icon(Icons.chevron_right), ]), ), ), ); } } ```

5State Management

dart
// ChangeNotifier
class CartNotifier extends ChangeNotifier {
  final List<CartItem> _items = [];
  List<CartItem> get items => List.unmodifiable(_items);
  double get total => _items.fold(0, (sum, item) => sum + item.price);

void addItem(CartItem item) { _items.add(item); notifyListeners(); } void removeItem(String id) { _items.removeWhere((i) => i.id == id); notifyListeners(); } }

// Riverpod final cartProvider = StateNotifierProvider((ref) => CartNotifier());

final userProvider = FutureProvider.family((ref, id) async { return ref.read(userRepositoryProvider).getUser(id); });

class CartScreen extends ConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { final cart = ref.watch(cartProvider); return ListView.builder( itemCount: cart.items.length, itemBuilder: (_, i) => ListTile(title: Text(cart.items[i].name)), ); } } ```

Explore the Full Portfolio

This is the complete portfolio of Sufi Khan Sulaiman, a technology leader specialising in B2B commerce and digital automation. Start from the Home page for the overview, then move through two decades of career experience across FLIR Systems, Lorex Technology, and 1c Platform, and the full catalogue of project case studies spanning headless commerce migrations, AI recommendation engines, and multi-channel fulfilment systems.

The skills and certifications page maps the technical and leadership capabilities behind the work, while the articles and the knowledge base break down the thinking into actionable frameworks. For hands-on learning, the tutorials and applications sections cover practical builds from front-end fundamentals to full-stack web apps.

For consulting engagement, the expertise page outlines service offerings, the ecommerce hub covers platform architecture and automation strategy, and the ecommerce guide (PDF) is a downloadable 55-page field manual. When you are ready to talk, the contact page is the direct line.