Dart is an open-source programming language developed by Google. Flutter is a toolkit for building app interfaces with Dart. When you build a Flutter app, you write Dart both to describe what appears on the screen and to decide what happens when someone uses it. You can also use Dart on its own to write a script, a command-line tool or a server.
Picture a player placing a second queen in the same row of a puzzle. You want the app to show “Keep just one queen in this row.” Who decides those words should appear? Where do the letters on the screen come from? Following that one move makes the relationship between Dart and Flutter easier to see.
What does a programming language give you?
Imagine playing the puzzle on paper with a friend. The rulebook says each row should contain one queen. Your friend can look across a row, count the queens and tell you what to change. A computer needs those steps spelled out. Dart gives you a way to name the count, compare it with a number and choose a message.
Dart has types, which describe the kinds of values your program uses. A count such as 2 is an int, short for integer. The message you show the player is a String, or text. If a function asks for an integer and you give it the word 'two', Dart’s analyzer can flag the mistake while you write.
You may also hear Dart described as object-oriented. For a larger puzzle, you could define a Board class that keeps track of the squares and knows how to count the queens in a row. For one small rule, a function is enough.
One puzzle rule in plain Dart
The function below takes the number of queens in one row and returns the hint the player should see. You can paste the whole example into a new Dart snippet in DartPad and select Run.
String rowHint(int queenCount) {
if (queenCount == 0) {
return 'Place a queen in this row.';
}
if (queenCount == 1) {
return 'This row has one queen.';
}
return 'Keep just one queen in this row.';
}
void main() {
print(rowHint(2));
}
With 2, the output is Keep just one queen in this row. Change it to 1 and run it again. The message now reads This row has one queen. You have tested a piece of app behavior before drawing a single square. The function checks only the row count. The game would check columns, colored regions and neighboring squares separately.
What does Flutter add to the same example?
The player needs to see the hint beside the board. Flutter provides a widget called Text for displaying words. Inside a Flutter screen, once the board has counted the queens in the selected row, the display can be as short as one line.
Text(rowHint(queensInRow))
Read the line from the inside out. queensInRow holds the count. Your rowHint function chooses the words. Flutter’s Text widget describes how those words appear as part of the screen. The entire line is Dart, including the part that uses Flutter.
Now imagine the player removes the extra queen. The tap handler updates the board and tells Flutter that the screen’s data has changed. When Flutter builds the hint again, the count is one and the player sees the new message. If you later move the hint below the board or give it larger type, the row rule can stay exactly as it is.
How can the same Dart code run on different devices?
A compiler translates source code into a form the target device can run. For a mobile or desktop release, Dart can compile to machine code ahead of time, usually shortened to AOT. For the web, Dart can compile to JavaScript or WebAssembly so a browser can run it.
That means the same row rule can serve an Android phone, an iPhone and a browser. The player’s experience still deserves a separate look on each target. A square that is easy to select with a mouse might be hard to tap with a thumb. A wider layout might have room for the hint beside the board, while a phone needs it underneath.
Where does hot reload fit in?
Suppose you have played halfway through a puzzle and the hint looks cramped on your phone. During a Flutter debug session, you can change the space around the hint and use hot reload. Flutter can rebuild the interface with the new spacing while keeping your current board on screen. That saves you from replaying ten moves just to check one change.
On mobile, Dart’s just-in-time compiler, or JIT, supports this development workflow. JIT describes how code is compiled while a program runs. Hot reload describes what the developer can do with a running app. A hot restart starts the app again and resets the state held in memory.
Can you use Dart without Flutter?
Yes. Imagine an editor preparing tomorrow’s daily puzzle. A Dart command-line tool could read the puzzle file, count each row and report a problem before publication. It could reuse the same checking logic as the mobile game. The editor gets the result in a terminal, while the player gets feedback on the board.
Dart can also run on a server, for example to deliver the daily puzzle. A Flutter app can just as well request that puzzle from an existing backend written in PHP, JavaScript or another language. The app and server need to agree on the data they exchange.
What does this look like in a published app?
In Queens Master, my Android puzzle game, players place one queen in each row, column and colored region, and two queens may never touch. The row hint above is a small teaching example inspired by those rules.
When I built Queens Master after Binero, the two games needed different rules, yet both needed settings, themes and translations. Those became part of their shared foundation. If I change a translated settings label, that work can benefit both games. A decision about where a queen may go belongs to Queens Master. The same distinction is useful even in a first app when deciding which code belongs to one feature and which code other screens can reuse.
Should you learn Dart or Flutter first?
If this is your first programming language, start with enough Dart to change the puzzle rule and predict the output. Then put the result on a Flutter screen. As a next exercise, make the hint update when a player taps a square. That gives you a reason to learn about state, the information a screen remembers between taps.
You can start in DartPad with just a browser. When you are ready to build locally, installing Flutter also gives you the Dart SDK, the set of tools for working with the language. The official Flutter learning pathway takes you from Dart fundamentals to building screens and handling input.
If you’re planning a first mobile release, pick one action your users must be able to complete. Sketch what they see, then write down the rule that decides what happens next. That small exercise gives us something concrete to scope and test together. Explore how I approach mobile MVP development.