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

Introducing AI-Powered Plant Analyzer! 🌱

Introducing AI-Powered Plant Analyzer! 🌱

I’ve developed an AI-powered plant analyzer that brings together cutting-edge tools from OpenAI Vision API and Tavily, with search capabilities to explore information on gardenia.net.

Read More
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
Create a podcast with zero human intervention

Create a podcast with zero human intervention

Have you heard the buzz about Google’s Notebook LM? This tool is a game-changer for anyone curious about leveraging AI to streamline research, supercharge content creation, and effortlessly organize insights. Whether you’re a researcher, content creator, or simply an AI enthusiast, Notebook LM brings unparalleled structure and depth to your data handling.

Read More