How to build a Wordle with Flutter

How to build a Wordle with Flutter

Table of Contents

I saw last weekend some people sharing random squares on Twitter and I was thinking…

What is it?

My friend Camilo

After researching a bit, I found a post explaining that this is a game called Wordle and it is a super awesome game.

Kudos for the dev.

You have to guess one word per day.

The idea of Having to enter one word per day is like the old times in the internet. The developer behind Wordle is not trying to push our limits to play like addicts and thats super nice.

This “one time” thing smells like internet before algorithms and social networks.

And after playing a couple of days I was wondering:

Can I build something similar in a small amount of hours with Flutter?

I push my limits to create the clon of Wordle in less than 4 hours with the awesome Flutter dev tools.

Wordle with Flutter

The game

I have a matrix of 5x6 for the colours and the characters and every time the user inputs a character with the virtual keyboard I put the character in the correct place.

The matrix

When the user reaches the end of the row then the user can DELETE a character or click ENTER to verify the current word. If the user decides to press ENTER then I execute the algorithm to verify the input vs the solution with the following code(maybe not the best one but I was rushed to complete the task):

Game algorithm to verify the solution

The rest of the code is for building the UI.

In the following code we are building the top part of the UI with the boxes that the user needs to input the characters.

User input boxes

For the keyboard I rebuilt a bit a library called virtual_keyboard_multi_language.

Its a simple column with 3 rows with some custom decoration to show the appearance of the Wordle keyboard, some arrays with the values for each position and thats it!

Virtual keyboard

Values of each element of the rows

If you didn’t try the original game yet. Please do it: Wordle - A daily word game Guess the hidden word in 6 tries. A new puzzle is available each day. www.powerlanguage.co.uk

This is the source code of my small copy of the game: GitHub - ficiverson/wordle-flutter *You can’t perform that action at this time. You signed in with another tab or window. You signed out in another tab or…*github.com

I don’t want to copy the idea or have a commercial version of the game but I saw a guy that published into the app to Appstore the game without the permission of the original devs and that’s not nice.

Copy guy

All the credits of the idea for the **original authors. **Thanks :)

Related Posts

Risco Cero: Flutter tech to prevent STDs diseases and unintended pregnancy in young people

Risco Cero: Flutter tech to prevent STDs diseases and unintended pregnancy in young people

I want to explain how I helped two doctors (Ana and Elvira) and a teacher (Angel) to build an app to show some important information about STDs and how to prevent unintended pregnancy in young people (the app is in Galician and Spanish but we are open to update the content to English or any other language if someone can help us).

Read More
Guardrails for LLMs: ensuring secure and reliable AI systems for Loredo bank

Guardrails for LLMs: ensuring secure and reliable AI systems for Loredo bank

The rapid evolution of Large Language Models (LLMs) has unlocked transformative applications, from content generation to automated decision-making. However, deploying LLMs in real-world systems requires robust security and reliability mechanisms. This post explores essential guardrails, the role of Pydantic as an output parser, and security concerns in agentic AI approaches.

Read More
How I created AI-generated trivia questions

How I created AI-generated trivia questions

Just last week, an old teammate hit me with the question: “How can I use AI to generate random trivia questions?” At the same time, I was prepping a presentation for my colleagues at DEUS, so I thought—why not turn this into a real example? And boom! The result? An AI-powered trivia generator that effortlessly creates engaging, dynamic questions! What started as a simple inquiry became a full-blown project—challenge accepted, mission accomplished!

Read More