This is a fully fledged Sudoku game written in Dart using Flutter.
It can be exported to Android, iOS, Fuchsia, Windows, Linux, MacOS, PWA or a Web App.
Can be played online in the browser. See Play Online
Can be installed as a Progressive Web App on any platform. See Use Progressive Web Apps
Can be installed as an Android app. See Downloads
For Exporting to Android:
Android Studio 3.0+ / IntelliJ IDEA 2017.1+ with Flutter Plugin and Dart Plugin (recommeded)
Android SDK from Android Studio or IntelliJ IDEA (API Level 30 recommended)
Java SE JDK (v8 recommended)
Set ANDROID_HOME and ANDROID_SDK_ROOT variables
Add JDK to PATH
For Exporting to Web:
Set current working directory to sudoku
Run these commands:
flutter config --enable-web
For Exporting to Windows:
Set current working directory to sudoku
Run these commands:
flutter config --enable-windows-desktop
Clone this repository
Set current working directory to sudoku
Run these commands:
flutter pub get
flutter pub upgrade
flutter pub outdated
flutter doctor
to check fo any issues (Optional)Steps for exporting to a PWA or Web App
Set current working directory to sudoku
Run flutter build web --release
This will compile the program and store the files in the sudoku/build/web
directory
You can run a simple http server in this directory to run your app in the browser
dhttpd is a Dart package for running a simple http server
Steps for exporting to Windows
Set current working directory to sudoku
Run flutter build windows --release
This will compile the program and store the files in the sudoku/build/windows/runner/Release
directory
It will export a release build that can be run directly
Steps for exporting to Android
Set current working directory to sudoku
To export as an Android app run:
flutter build apk
to build a fat APK for all ABIs
OR
flutter build apk --target-platform android-arm,android-arm64,android-x64 --split-per-abi
to build multiple APKs for every ABI
This will export a release build of the apk file signed with debug keys which can be installed on an Android phone or emulator
The APK file/s will be saved in sudoku/build/app/outputs/flutter-apk
Minimum Android Version Required : Android 4.1.x Jellybean (API Level 16)
Uses a combination of a Sudoku generation and solving algorithm to create a unique game
Generates a New Game when you start the app
Clicking a box displays a dialog with buttons 1-9 to input in the box
Clickable buttons will initially have no number and will turn red after the first click
After completely solving the grid, if the solution is correct it will alert you that you successfully solved the Sudoku
The numbers in all the clickable buttons will turn blue if the solution is correct (This will also happen if you click Show Solution)
4 different difficulty levels to choose from :
New Game
Restart Game
Show Solution
Dark and Light theme
Material Design
flutter_animated_dialog is used for animated alert dialogs
shared_preferences is used for saving preferences locally
splashscreen is used for the splashscreen
url_launcher is used for hyperlinks
Referred Algorithms:
Sudoku Generation Algorithm in Java
Sudoku Generation and Solving Algorithm in Python
Untested on iOS, MacOS, Linux and Fuchsia. Additional chnages might be required to work correctly
If you face any issue or have suggestions then feel free to open an issue on GitHub
Main Screen while solved with dark theme:
Main Screen while solving with light theme:
Choose Number Alert:
Game Over Alert Box:
Options:
Author: VarunS2002
The Demo/Documentation: View The Demo/Documentation
Download Link: Download The Source Code
Official Website: https://github.com/VarunS2002/Flutter-Sudoku
License: GPL-3.0
#dart #flutter #game-development