Skip to content
tezvyn:

Flutter & Dart

Flutter framework, Dart language, packages, Impeller

80 bites

Test yourself: Top 30 easy Flutter & Dart interview questionsMultiple choice, with the correct answer and why it is correct on every question. Free, no sign-in.

Easy everything in Flutter & Dart, page 3

easy2 min read

Unit Testing in Dart: Verify Your Logic in Isolation

A unit test is a microscope for your code. It checks a single function or class in isolation, ensuring it behaves correctly without worrying about the UI or network. Use it for business logic, not for testing rendered widgets or API calls.

easy2 min read

Dart's Platform Class: Querying the Host Environment

Think of Dart's Platform class as a runtime detective for your app. It answers "where am I running?" by checking the OS, environment variables, and more. Use it to show different UI on iOS vs. Android.

easy2 min read

Flutter: Requesting Runtime Permissions

Don't assume your app has access to the camera or contacts; you must ask the user for permission at runtime. This is required for features like photo uploads or location tracking. The common footgun is forgetting to declare permissions in native config files.

easy2 min read

Flutter Packages: Bridging Dart to Native Features

Think of packages as pre-built bridges to native device features. They let your Dart code access the camera or GPS without you writing the complex, platform-specific code.

easy2 min read

CurvedAnimation: Animate with Easing and Personality

CurvedAnimation makes animations feel natural by applying a timing curve to another animation. Instead of linear motion, widgets can ease-in or bounce. Footgun: Elastic curves can overshoot the standard 0.0-1.0 range, causing unexpected UI behavior.

easy2 min read

TweenAnimationBuilder: Animate Anything Implicitly

TweenAnimationBuilder animates any widget property without a complex AnimationController. Just give it a target value, duration, and curve. Use it for one-off animations where a full controller is overkill.

easy2 min read

AnimatedContainer: Simple UI Animations Without Controllers

AnimatedContainer is a 'fire-and-forget' animation widget. It automatically animates its own properties like size and color when they change. Use it for simple UI state changes, like a button that grows when tapped. It only animates itself, not its child.

easy2 min read

Reading and Writing Files in Dart

Treat files as either a single string for simple cases or a stream of data for large ones. Use dart:io for saving user settings or processing logs. The main footgun is using synchronous methods like readAsStringSync, which can freeze your app.

easy2 min read

path_provider: Find Platform-Specific File Paths

path_provider asks the OS for standard file paths instead of you guessing. Use it to find the correct documents, temp, or cache directories on any platform. The footgun: not all paths exist on all systems, so always check for null returns.

easy2 min read

shared_preferences for Simple On-Device Storage

shared_preferences is Flutter's go-to for simple on-device key-value storage, like a persistent dictionary for user settings. Use it to save a dark mode toggle or high score. Crucially, writes are not guaranteed, so don't use it for critical data.

easy2 min read

FutureBuilder: Handling Async UI in Flutter

FutureBuilder rebuilds UI based on an async operation's state, showing loading, error, or data. Use it for network requests or slow computations. Footgun: Never create the Future inside build; it will restart on every rebuild, causing an infinite loading…

easy2 min read

Manual JSON Serialization with fromJson/toJson

Manually map your Dart objects to JSON by writing your own fromJson and toJson methods. This is ideal for simple data models or quick prototypes where code generation is overkill.

easy2 min read

JSON in Dart: Using `dart:convert`

dart:convert is Dart's built-in translator for JSON. It turns Dart Maps into JSON strings (jsonEncode) for APIs and file storage, and parses JSON strings back into Maps (jsonDecode). The footgun: jsonDecode returns a generic Map, not your custom class.

easy2 min read

Dart's `http` Package: Simple Requests vs. Composable Clients

Dart's http package simplifies web requests. Use top-level functions like http.get() for one-off calls, or a Client for persistent connections. Forgetting to call client.close() is a common footgun that leaks resources.

easy2 min read

ValueNotifier: Notifies on Replacement, Not Mutation

ValueNotifier is a simple state holder that tells widgets to rebuild when its single value is replaced. It's great for immutable data like a boolean toggle or counter.

easy2 min read

Provider: Pass Data Down Your Widget Tree

Think of Provider as a delivery service for your app's data, passing it down the widget tree without sending it through every widget's constructor. It's a lightweight way to manage state. The footgun: never use .value to create a new object.

easy2 min read

Flutter Named Routes: Navigate with Strings, Not Widgets

Think of named routes as URL paths for your app's screens. Instead of building a screen widget on the spot, you just tell Flutter "go to '/profile'". This is ideal for centralizing navigation in large apps and for enabling deep linking.

easy2 min read

Imperative Navigation: Pushing and Popping Screens

Think of app screens as a stack of cards. You push a new screen onto the top to show it and pop it off to go back. It's ideal for linear flows like list-to-detail. The footgun: popping the last screen closes the app.

easy2 min read

MaterialPageRoute: The Page in Your Navigator Stack

Think of Navigator as a stack of screens. MaterialPageRoute wraps your new screen widget, defining its platform-specific transition (slide on iOS, zoom on Android). You use it with Navigator.push to show a new screen.

InkWell: Adding Material Splash Effects
easy2 min read

InkWell: Adding Material Splash Effects

InkWell adds a Material Design 'splash' effect to any widget on tap. Think of it as ink spreading inside the surface you touch. Use it to make non-interactive widgets like images respond to taps. The splash won't appear if an opaque widget is between it.

We are hiring for this. Every open role lists the topics its interview covers, so you can prepare for the real thing rather than guessing.

See open roles