ACM LEARNING

Flutter and Dart essentials

Learn predictable state, asynchronous operations and safe model design.

Open coding playground Developer tools

Complete each lesson, attempt the exercise and compare with the worked answer.

Null safety

Dart distinguishes a non-nullable String from String?. Use a nullable type only when absence is meaningful. The null-coalescing operator provides a default; avoid force-unwrapping unless the invariant is proven.

Practice

Convert a nullable name to a non-null display label.

Review answer

final label = name ?? "Guest";

Sign in to sync progress

Async data loading

A Future represents a value that may arrive later. Use async/await and catch failures. Show loading, error and success separately. Do not block the UI while waiting for network or disk.

Practice

Write a pattern that awaits a repository call and handles failures.

Review answer

try { final data = await repository.load(); } catch (error) { /* emit error state */ }

Sign in to sync progress

State management

Keep input events, state transitions and UI rendering distinct. In BLoC or Cubit, emit an immutable state for each meaningful transition. Avoid triggering a fetch inside build repeatedly. Test state transitions independently.

Practice

Identify three states for a request.

Review answer

Loading, success with data, failure with error message.

Sign in to sync progress

All courses

How can we help?

Support centreProject enquiry

Project visual

Open original image ↗

ACM Assistant

Ask about our software, apps, services or support.

Automated assistance. Do not enter passwords, payment details or confidential information. AI mode may send your question to an external provider.

Contact our team

Tell us about your project