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

Revolutionizing news with AI: How I built an automated news Podcast generator

Revolutionizing news with AI: How I built an automated news Podcast generator

I’ve always admired Ángel Martín’s approach to delivering news—straight to the point, no fluff, just the essentials. Inspired by that philosophy, I built an AI-powered news podcast generator focused on delivering concise, relevant news for my city, A Coruña. My goal was to create a system that keeps people informed without the need to sift through lengthy articles or multiple sources.

Read More
Building an AI-Powered newspaper article approval system with Human-in-the-Loop

Building an AI-Powered newspaper article approval system with Human-in-the-Loop

Audio of the post:

In the fast-paced world of digital journalism, editors face the daunting task of reviewing hundreds of article submissions daily. While AI can draft articles quickly, human oversight remains crucial for maintaining editorial standards, ensuring factual accuracy, and preserving journalistic integrity. This is where Human-in-the-Loop (HITL) middleware becomes invaluable.

Read More
How I fixed my coffee machine using a RAG System

How I fixed my coffee machine using a RAG System

When my coffee machine decided to quit on me, going through the manual was just painful and honestly, a waste of time. So, instead of giving up, I tried something different: I used a Retrieval-Augmented Generation (RAG) system with a Large Language Model (LLM) to figure it out.

Read More