├── .gitignore ├── .idea ├── .name ├── misc.xml ├── modules.xml └── vcs.xml ├── .metadata ├── PlayStoreListingStrings ├── de.txt ├── es.txt ├── fr.txt ├── it.txt ├── ptBR.txt └── ru.txt ├── README.md ├── analysis_options.yaml ├── android ├── .gitignore ├── app │ ├── build.gradle │ ├── release │ │ └── output-metadata.json │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── kotlin │ │ │ └── za │ │ │ │ └── co │ │ │ │ └── lukestonehm │ │ │ │ └── logicaldefence │ │ │ │ └── logical_defence │ │ │ │ └── MainActivity.kt │ │ └── res │ │ │ ├── drawable-v21 │ │ │ └── launch_background.xml │ │ │ ├── drawable │ │ │ └── launch_background.xml │ │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.png │ │ │ └── launcher_icon.png │ │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.png │ │ │ └── launcher_icon.png │ │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ └── launcher_icon.png │ │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── launcher_icon.png │ │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── launcher_icon.png │ │ │ ├── values-de │ │ │ └── strings.xml │ │ │ ├── values-en-rUS │ │ │ └── strings.xml │ │ │ ├── values-eo │ │ │ └── strings.xml │ │ │ ├── values-es │ │ │ └── strings.xml │ │ │ ├── values-fr │ │ │ └── strings.xml │ │ │ ├── values-it │ │ │ └── strings.xml │ │ │ ├── values-night │ │ │ └── styles.xml │ │ │ ├── values-pl │ │ │ └── strings.xml │ │ │ ├── values-pt-rBR │ │ │ └── strings.xml │ │ │ ├── values-pt │ │ │ └── strings.xml │ │ │ └── values │ │ │ ├── colors.xml │ │ │ ├── strings.xml │ │ │ └── styles.xml │ │ └── profile │ │ └── AndroidManifest.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties └── settings.gradle ├── assets └── app-icon.png ├── fastlane └── metadata │ └── android │ ├── en-GB │ ├── full_description.txt │ ├── short_description.txt │ └── title.txt │ ├── en-US │ ├── full_description.txt │ ├── short_description.txt │ └── title.txt │ ├── eo │ ├── full_description.txt │ ├── short_description.txt │ └── title.txt │ └── pl │ ├── full_description.txt │ ├── short_description.txt │ └── title.txt ├── ios ├── .gitignore ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ └── Release.xcconfig ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings └── Runner │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon-App-1024x1024@1x.png │ │ ├── Icon-App-20x20@1x.png │ │ ├── Icon-App-20x20@2x.png │ │ ├── Icon-App-20x20@3x.png │ │ ├── Icon-App-29x29@1x.png │ │ ├── Icon-App-29x29@2x.png │ │ ├── Icon-App-29x29@3x.png │ │ ├── Icon-App-40x40@1x.png │ │ ├── Icon-App-40x40@2x.png │ │ ├── Icon-App-40x40@3x.png │ │ ├── Icon-App-60x60@2x.png │ │ ├── Icon-App-60x60@3x.png │ │ ├── Icon-App-76x76@1x.png │ │ ├── Icon-App-76x76@2x.png │ │ └── Icon-App-83.5x83.5@2x.png │ └── LaunchImage.imageset │ │ ├── Contents.json │ │ ├── LaunchImage.png │ │ ├── LaunchImage@2x.png │ │ ├── LaunchImage@3x.png │ │ └── README.md │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ └── Runner-Bridging-Header.h ├── lib ├── controllers │ ├── category.controller.dart │ ├── controllers.dart │ ├── language.controller.dart │ └── theme.controller.dart ├── main.dart ├── pages │ ├── about.page.dart │ ├── home.page.dart │ └── pages.dart ├── routes.dart ├── shared │ ├── app_translations.dart │ ├── fallacy_data_structure.dart │ └── shared.dart └── widgets │ ├── fallacy_card.widget.dart │ └── widgets.dart ├── linux ├── .gitignore ├── CMakeLists.txt ├── flutter │ ├── CMakeLists.txt │ ├── generated_plugin_registrant.cc │ ├── generated_plugin_registrant.h │ └── generated_plugins.cmake ├── main.cc ├── my_application.cc └── my_application.h ├── macos ├── .gitignore ├── Flutter │ ├── Flutter-Debug.xcconfig │ ├── Flutter-Release.xcconfig │ └── GeneratedPluginRegistrant.swift ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── Runner │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── app_icon_1024.png │ │ ├── app_icon_128.png │ │ ├── app_icon_16.png │ │ ├── app_icon_256.png │ │ ├── app_icon_32.png │ │ ├── app_icon_512.png │ │ └── app_icon_64.png │ ├── Base.lproj │ └── MainMenu.xib │ ├── Configs │ ├── AppInfo.xcconfig │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── Warnings.xcconfig │ ├── DebugProfile.entitlements │ ├── Info.plist │ ├── MainFlutterWindow.swift │ └── Release.entitlements ├── playstore_artwork ├── 1425089390_Brain-Games.png ├── app-icon.png ├── en-GB │ ├── Hotpot 0(1).png │ ├── Hotpot 0.png │ ├── Hotpot 1(1).png │ ├── Hotpot 1.png │ ├── Hotpot 2(1).png │ ├── Hotpot 2.png │ ├── Hotpot 3(1).png │ ├── Hotpot 3.png │ ├── Hotpot 4(1).png │ ├── Hotpot 4.png │ └── en_playstore_cover.png └── todo │ ├── de_screens │ ├── device-2015-05-23-134610.png │ ├── device-2015-05-23-134809.png │ ├── device-2015-05-23-134922.png │ └── device-2015-05-23-135241.png │ ├── en_screens │ ├── device-2015-02-27-231818.png │ ├── device-2015-02-27-231948.png │ ├── device-2015-02-27-233311.png │ └── device-2015-02-27-233322.png │ ├── es_screens │ ├── device-2015-03-10-192125.png │ ├── device-2015-03-10-192207.png │ ├── device-2015-03-10-192257.png │ └── device-2015-03-10-192315.png │ ├── fr_screens │ ├── device-2015-03-08-191756.png │ ├── device-2015-03-08-191917.png │ ├── device-2015-03-08-191953.png │ └── device-2015-03-08-192014.png │ └── it_screens │ ├── device-2015-03-10-191848.png │ ├── device-2015-03-10-191957.png │ ├── device-2015-03-10-192012.png │ └── device-2015-03-10-192033.png ├── privacy.md ├── pubspec.lock ├── pubspec.yaml ├── test └── widget_test.dart ├── web.Dockerfile ├── web ├── favicon.png ├── icons │ ├── Icon-192.png │ ├── Icon-512.png │ ├── Icon-maskable-192.png │ └── Icon-maskable-512.png ├── index.html └── manifest.json └── windows ├── .gitignore ├── CMakeLists.txt ├── flutter ├── CMakeLists.txt ├── generated_plugin_registrant.cc ├── generated_plugin_registrant.h └── generated_plugins.cmake └── runner ├── CMakeLists.txt ├── Runner.rc ├── flutter_window.cpp ├── flutter_window.h ├── main.cpp ├── resource.h ├── resources ├── app_icon.ico ├── app_icon_1024.ico ├── app_icon_128.ico ├── app_icon_256.ico ├── app_icon_32.ico ├── app_icon_512.ico └── app_icon_64.ico ├── runner.exe.manifest ├── utils.cpp ├── utils.h ├── win32_window.cpp └── win32_window.h /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | ### JetBrains template 3 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm 4 | 5 | *.iml 6 | 7 | ## Directory-based project format: 8 | .idea/ 9 | # if you remove the above rule, at least ignore the following: 10 | 11 | # User-specific stuff: 12 | # .idea/workspace.xml 13 | # .idea/tasks.xml 14 | # .idea/dictionaries 15 | 16 | # Sensitive or high-churn files: 17 | # .idea/dataSources.ids 18 | # .idea/dataSources.xml 19 | # .idea/sqlDataSources.xml 20 | # .idea/dynamic.xml 21 | # .idea/uiDesigner.xml 22 | 23 | # Gradle: 24 | # .idea/gradle.xml 25 | # .idea/libraries 26 | 27 | # Mongo Explorer plugin: 28 | # .idea/mongoSettings.xml 29 | 30 | ## File-based project format: 31 | *.ipr 32 | *.iws 33 | 34 | ## Plugin-specific files: 35 | 36 | # IntelliJ 37 | out/ 38 | 39 | # mpeltonen/sbt-idea plugin 40 | .idea_modules/ 41 | 42 | # JIRA plugin 43 | atlassian-ide-plugin.xml 44 | 45 | # Crashlytics plugin (for Android Studio and IntelliJ) 46 | com_crashlytics_export_strings.xml 47 | crashlytics.properties 48 | crashlytics-build.properties 49 | 50 | 51 | ### Android template 52 | # Built application files 53 | *.apk 54 | *.ap_ 55 | 56 | # Files for the Dalvik VM 57 | *.dex 58 | 59 | # Java class files 60 | *.class 61 | 62 | # Generated files 63 | bin/ 64 | gen/ 65 | 66 | # Gradle files 67 | .gradle/ 68 | build/ 69 | 70 | # Local configuration file (sdk path, etc) 71 | local.properties 72 | 73 | # Proguard folder generated by Eclipse 74 | proguard/ 75 | 76 | # Log Files 77 | *.log 78 | 79 | ### Dart template 80 | # See https://www.dartlang.org/guides/libraries/private-files 81 | 82 | # Files and directories created by pub 83 | .dart_tool/ 84 | .packages 85 | build/ 86 | # If you're building an application, you may want to check-in your pubspec.lock 87 | pubspec.lock 88 | 89 | # Directory created by dartdoc 90 | # If you don't generate documentation locally you can remove this line. 91 | doc/api/ 92 | 93 | # Avoid committing generated Javascript files: 94 | *.dart.js 95 | *.info.json # Produced by the --dump-info flag. 96 | *.js # When generated by dart2js. Don't specify *.js if your 97 | # project includes source files written in JavaScript. 98 | *.js_ 99 | *.js.deps 100 | *.js.map 101 | 102 | .flutter-plugins 103 | .flutter-plugins-dependencies 104 | 105 | # ignore built android app bundles & apks 106 | */app/*/*.aab -------------------------------------------------------------------------------- /.idea/.name: -------------------------------------------------------------------------------- 1 | logical_defence -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled. 5 | 6 | version: 7 | revision: 676cefaaff197f27424942307668886253e1ec35 8 | channel: stable 9 | 10 | project_type: app 11 | 12 | # Tracks metadata for the flutter migrate command 13 | migration: 14 | platforms: 15 | - platform: root 16 | create_revision: 676cefaaff197f27424942307668886253e1ec35 17 | base_revision: 676cefaaff197f27424942307668886253e1ec35 18 | - platform: android 19 | create_revision: 676cefaaff197f27424942307668886253e1ec35 20 | base_revision: 676cefaaff197f27424942307668886253e1ec35 21 | - platform: ios 22 | create_revision: 676cefaaff197f27424942307668886253e1ec35 23 | base_revision: 676cefaaff197f27424942307668886253e1ec35 24 | - platform: linux 25 | create_revision: 676cefaaff197f27424942307668886253e1ec35 26 | base_revision: 676cefaaff197f27424942307668886253e1ec35 27 | - platform: macos 28 | create_revision: 676cefaaff197f27424942307668886253e1ec35 29 | base_revision: 676cefaaff197f27424942307668886253e1ec35 30 | - platform: web 31 | create_revision: 676cefaaff197f27424942307668886253e1ec35 32 | base_revision: 676cefaaff197f27424942307668886253e1ec35 33 | - platform: windows 34 | create_revision: 676cefaaff197f27424942307668886253e1ec35 35 | base_revision: 676cefaaff197f27424942307668886253e1ec35 36 | 37 | # User provided section 38 | 39 | # List of Local paths (relative to this file) that should be 40 | # ignored by the migrate tool. 41 | # 42 | # Files that are not part of the templates will be ignored by default. 43 | unmanaged_files: 44 | - 'lib/main.dart' 45 | - 'ios/Runner.xcodeproj/project.pbxproj' 46 | -------------------------------------------------------------------------------- /PlayStoreListingStrings/de.txt: -------------------------------------------------------------------------------- 1 | Logische Selbstverteidigung 2 | 3 | Stähle dich, um deinen Verstand gegen die Sprache der Sophisten zu verteidigen. 4 | 5 | Mit dieser wunderschönen App kannst du dich auf den Kampf gegen die Sophisten dieser Welt vorbereiten. 6 | 7 | Denn Dummschwätzer (Sophisten) gibt es viele - von uns nur wenige. Jetzt haben wir ein weiteres Werkzeug der Vernuft. 8 | 9 | Mit der App kann man schnell Fehlschlüsse (Sophismen) nachschauen und irrationale Argumente einer Person entlarven. Hilf so eine rationalere Gesellschaft zu entwickeln. 10 | 11 | Ehrlichkeit ist die erste Tugend, also sei streng mit denen, die dich mit ihrer Rhetorik zu verwirren versuchen. 12 | Akzeptiere niemals einen Fehlschluss: Verteidige dich gegen Sophisten und teile Vernuft, sowie Klarheit mit deinen Verbündeten. 13 | 14 | Genug Gelaber: Diese App zeigt übersichtlich die schlimmsten und bekanntesten Fehlschlüsse an. 15 | 16 | 17 | Einige Funktionen: 18 | - Linksseitiges Menü mit Kategorien. 19 | - Share Funktion -> Teile einen Fehlschluss mit einem langen Fingerdruck. 20 | - Hübscher Infotext. 21 | - Einfache Sprachenauswahl. 22 | 23 | 24 | Diese App ist freie Software (GNU v2) und der Quellcode ist auf GitHub verfügbar. Du kannst das Projekt gerne forken :) 25 | GitHub Repository: https://github.com/LukeStonehm/LogicalDefence 26 | 27 | Kommentare und Hinweise sind gerne gesehen. Danke für den Download! 28 | -------------------------------------------------------------------------------- /PlayStoreListingStrings/es.txt: -------------------------------------------------------------------------------- 1 | Defensa lógica (Logical Defence) 2 | 3 | Vence a los sofistas del mundo contemporáneo con esta práctica aplicación. 4 | 5 | Ármate de valor y defiéndete de los trucos idiomáticos empleados por los sofistas del mundo contemporáneo. 6 | 7 | Ellos son muchos, nosotros pocos, pero con la aplicación de Defensa lógica ahora tenemos una herramienta adicional en el arsenal de toda persona racional. 8 | Utiliza la aplicación para encontrar de forma rápida las falacias lógicas que a menudo nos encontramos cuando debatimos contra lo irracional. 9 | Señala a aquellos que utilizan argumentos ilógicos y ayuda a construir una sociedad más racional. 10 | 11 | Ser honesto es lo primero, así que seamos certeros contra aquellos que emplean la lengua como forma de abuso mental. 12 | Nunca aceptes una falacia lógica, contrarresta sus ataques y extiende la lógica y la razón allá donde vayas. 13 | 14 | Bueno, basta de cháchara. Esta es una aplicación dedicada a mostrar la lista de falacias lógicas que asola la mente de cualquier racionalista. 15 | 16 | Características destacables: 17 | 18 | - El desplegable izquierdo lista las distintas categorías. 19 | - Función de compartir -> Mantén pulsada una falacia para compartirla con otros. 20 | - Bonita pantalla de 'Acerca de'. 21 | - Función de selección del idioma. 22 | 23 | Somos un proyecto de código abierto (GNU v2), con el código fuente alojado en GitHub, y aceptamos colaboraciones :) 24 | Repositorio de GitHub: https://github.com/LukeStonehm/LogicalDefence 25 | 26 | No olvides dejarnos un comentario con tus opiniones/sugerencias y... ¡Gracias por probarla! 27 | -------------------------------------------------------------------------------- /PlayStoreListingStrings/fr.txt: -------------------------------------------------------------------------------- 1 | Défense logique (Logical Defence) 2 | 3 | Préparez-vous à lutter contre les sophistes du monde avec cette belle application. 4 | 5 | Renforcez votre esprit critique, et commencez à défendre votre esprit contre les sophistes du monde. 6 | 7 | Ils sont nombreux, nous sommes peu, mais avec une Défense logique, nous avons maintenant un outil essentiel dans notre combat contre l'irrationalité. 8 | Utilisez cette application pour rechercher rapidement les sophismes auxquels nous sommes confrontés lorsque nous débattons contre l'irrationnel. 9 | Dénoncez ceux qui sont logiquement erronés et aidez à construire une société plus rationnelle. 10 | 11 | L'honnêteté est la première des vertus, donc soyons douloureusement honnête envers ceux qui tentent d'utiliser le langage comme une forme de violence psychologique. N'acceptez jamais un sophisme, attaquez l'attaquant, et diffusez l'esprit de logique et de raison auprès de ceux que vous aimez. 12 | 13 | Ok, assez claironné. C'est une application qui affiche une liste des erreurs logiques qui hantent l'esprit de tous les rationalistes. 14 | 15 | Ceci est un logiciel libre (GNU v2), et la source est hébergée sur GitHub; n'hésitez pas à me contacter. 16 | 17 | Dépôt GitHub: https://github.com/LukeStonehm/LogicalDefence 18 | 19 | N'hésitez pas à laisser vos commentaires / suggestions. Et si vous téléchargez… Merci! 20 | -------------------------------------------------------------------------------- /PlayStoreListingStrings/it.txt: -------------------------------------------------------------------------------- 1 | Difesa Logica (Logical Defence) 2 | 3 | Preparati a combattere contro i sofisti con quest'app meravigliosa. 4 | 5 | Rinforzati ed inizia a difendere la tua mente dal linguaggio usato contro di te dai sofisti in giro per il mondo. 6 | 7 | Loro sono molti, noi siamo pochi, ma con l'app Logical Defence, abbiamo un'altro strumento dalla parte della nostra razionalità. 8 | 9 | Usa questa app per trovare rapidamente le fallacie logiche che incontriamo quando dibattiamo contro l'irrazionale. 10 | 11 | Richiama coloro che non ragionano logicamente e aiuta a costruire una società più razionale. 12 | L'onestà è la prima virtù, quindi dovremmo essere dolorosamente onesti contro quelli che cercano di usare il linguaggio come una forma di abuso mentale. Non accettare mai una fallacia logica, attacca l'attaccante e diffondi la logica e la ragione a coloro che ami. 13 | 14 | Ok, basta farneticare. Questa app mostra una lista delle fallacie logiche che infestano tutte le menti dei razionalisti. 15 | 16 | Alcune delle funzionalità: 17 | 18 | - Menù a sinistra contenente le categorie. 19 | - Condivisione -> Tieni premuta una fallacia per condividerla. 20 | - Schermata delle informazioni carina. 21 | - Selezione della lingua. 22 | 23 | Questo è un progetto completamente libero (GNU v2), ed il codice sorgente si trova su GitHub, quindi sentiti libero di esplorare :) 24 | 25 | GitHub: https://github.com/LukeStonehm/LogicalDefence 26 | 27 | Per favore, lasciaci commenti o suggerimenti. Grazie per aver scelto la logica! 28 | -------------------------------------------------------------------------------- /PlayStoreListingStrings/ptBR.txt: -------------------------------------------------------------------------------- 1 | Defesa Lógica (Logical Defense) 2 | 3 | Prepare-se para lutar contra os sofistas do mundo com este belo aplicativo. 4 | 5 | Arme-se e proteja sua mente contra a linguagem utilizada pelos sofistas. 6 | 7 | Eles são muitos, nós somos poucos, mas com o aplicativo Defesa Lógica (Logical Defense) agora temos uma ferramenta extra para auxiliar nossa razão. 8 | Utilize este aplicativo para rapidamente encontrar as falácias lógicas que lidamos ao debater contra o irracional. 9 | Aconselhe aqueles que possuem falhas lógicas e ajude a construir uma sociedade mais racional. 10 | 11 | Honestidade é a primeira virtude, então sejamos bem honestos com aqueles que tentarem utilizar a linguagem como uma forma de abuso mental. Portanto, nunca aceite uma falácia lógica, mas contra-ataque, e espalhe a lógica e a razão com aqueles que você ama. 12 | 13 | Certo, chega de divagar. Este é um aplicativo que contém uma lista de falácias lógicas que assombram a mente de cada racionalista. 14 | 15 | Algumas características: 16 | 17 | - As categorias encontram-se à esquerda; 18 | - Função compartilhar -> Mantenha pressionada uma falácia para compartilhar; 19 | - Uma bela tela informativa; 20 | - Função de seleção de idioma. 21 | 22 | Este é um projeto totalmente livre (GNU v2), e o código está hospedado no Github e aceitamos colaborações :) 23 | Repositório GitHub: https://github.com/LukeStonehm/LogicalDefence 24 | 25 | Sinta-se à vontade para deixar comentários e sugestões. Obrigado por instalar o aplicativo! -------------------------------------------------------------------------------- /PlayStoreListingStrings/ru.txt: -------------------------------------------------------------------------------- 1 | Логическая защита 2 | 3 | Подготовьтесь к сражению с софистами со всего мира с этим прекрасным приложением. 4 | 5 | Мобилизуйтесь и начните защищать свой разум от слов, которые софисты используют против вас. 6 | 7 | Их много, нас мало, но с приложением "Логическая защита" у нас появляется новый инструмент в нашем арсенале рационального мышления. 8 | Воспользуйтесь этим приложением, чтобы быстро найти логические ошибки, с которыми мы сталкиваемся в дебатах против иррационального. 9 | Бросьте вызов тем, чья логика ошибочна и помогите построить более рациональное общество. 10 | 11 | Честность - это главная добродетель, так что мы будем до боли честными по отношению к тем, кто пытается использовать слова ради психологического насилия. Никогда не принимайте логических заблуждений, атакуйте нападающего и делитесь логикой и благоразумием с теми, кто вам дорог. 12 | 13 | Ладно, хватит болтать. Это приложение, которое показывает список логических ошибок, которые преследуют разум каждого рационально мыслящего человека. 14 | 15 | Некоторые свойства: 16 | 17 | - Левая панель, на которой расположены разделы. 18 | - Возможность поделиться -> Зажмите логическую ошибку, чтобы поделиться ею. 19 | - Симпатичный раздел "О приложении". 20 | - Возможность выбирать язык. 21 | 22 | Это приложение является проектом с открытым исходным кодом (GNU v2), а исходный код размещён на GitHub, так что не стесняйтесь принимать участие в разработке :) 23 | Репозиторий GitHub: https://github.com/LukeStonehm/LogicalDefence 24 | 25 | Не стесняйтесь оставлять ваши комментарии и предложения. Спасибо за загрузку! 26 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # LogicalDefence 2 | An open source Flutter app that displays a list of the logical fallacies that haunt every rationalists' world 3 | 4 | [Web Version](https://logical-defence.lukestonehm.co.za/#/) 5 | [![Download from Google Play](http://www.android.com/images/brand/android_app_on_play_large.png "Download from Google Play")](https://play.google.com/store/apps/details?id=za.co.lukestonehm.logicaldefence) 6 | [![Logical Defence on fdroid.org](https://camo.githubusercontent.com/7df0eafa4433fa4919a56f87c3d99cf81b68d01c/68747470733a2f2f662d64726f69642e6f72672f77696b692f696d616765732f632f63342f462d44726f69642d627574746f6e5f617661696c61626c652d6f6e2e706e67 "Download from fdroid.org")](https://f-droid.org/repository/browse/?fdid=za.co.lukestonehm.logicaldefence) 7 | 8 | ## How to get running? 9 | 10 | ```shell 11 | flutter pub get 12 | flutter run 13 | ``` 14 | 15 | ## Version 16 | 2.0.0 17 | 18 | ## License 19 | GNU GPL2+ 20 | 21 | ## Attributes 22 | Brain icon was found on Icon Finder - https://www.iconfinder.com/icons/190293/brain_games_icon (could not find the author's website) 23 | 24 | 25 | 2022 Version 2 UI / UX Designed by Siané Power - view her portfolio [here](https://www.behance.net/sianepower) -------------------------------------------------------------------------------- /analysis_options.yaml: -------------------------------------------------------------------------------- 1 | # This file configures the analyzer, which statically analyzes Dart code to 2 | # check for errors, warnings, and lints. 3 | # 4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled 5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be 6 | # invoked from the command line by running `flutter analyze`. 7 | 8 | # The following line activates a set of recommended lints for Flutter apps, 9 | # packages, and plugins designed to encourage good coding practices. 10 | include: package:flutter_lints/flutter.yaml 11 | 12 | linter: 13 | # The lint rules applied to this project can be customized in the 14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml` 15 | # included above or to enable additional rules. A list of all available lints 16 | # and their documentation is published at 17 | # https://dart-lang.github.io/linter/lints/index.html. 18 | # 19 | # Instead of disabling a lint rule for the entire project in the 20 | # section below, it can also be suppressed for a single line of code 21 | # or a specific dart file by using the `// ignore: name_of_lint` and 22 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file 23 | # producing the lint. 24 | rules: 25 | # avoid_print: false # Uncomment to disable the `avoid_print` rule 26 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule 27 | 28 | # Additional information about this file can be found at 29 | # https://dart.dev/guides/language/analysis-options 30 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | android { 29 | compileSdkVersion flutter.compileSdkVersion 30 | ndkVersion flutter.ndkVersion 31 | 32 | compileOptions { 33 | sourceCompatibility JavaVersion.VERSION_1_8 34 | targetCompatibility JavaVersion.VERSION_1_8 35 | } 36 | 37 | kotlinOptions { 38 | jvmTarget = '1.8' 39 | } 40 | 41 | sourceSets { 42 | main.java.srcDirs += 'src/main/kotlin' 43 | } 44 | 45 | defaultConfig { 46 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 47 | applicationId "za.co.lukestonehm.logicaldefence" 48 | // You can update the following values to match your application needs. 49 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. 50 | minSdkVersion flutter.minSdkVersion 51 | targetSdkVersion flutter.targetSdkVersion 52 | versionCode flutterVersionCode.toInteger() 53 | versionName flutterVersionName 54 | } 55 | 56 | buildTypes { 57 | release { 58 | // TODO: Add your own signing config for the release build. 59 | // Signing with the debug keys for now, so `flutter run --release` works. 60 | signingConfig signingConfigs.debug 61 | } 62 | } 63 | } 64 | 65 | flutter { 66 | source '../..' 67 | } 68 | 69 | dependencies { 70 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 71 | } 72 | -------------------------------------------------------------------------------- /android/app/release/output-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 3, 3 | "artifactType": { 4 | "type": "APK", 5 | "kind": "Directory" 6 | }, 7 | "applicationId": "za.co.lukestonehm.logicaldefence", 8 | "variantName": "release", 9 | "elements": [ 10 | { 11 | "type": "SINGLE", 12 | "filters": [], 13 | "attributes": [], 14 | "versionCode": 23, 15 | "versionName": "2.0.0", 16 | "outputFile": "app-release.apk" 17 | } 18 | ], 19 | "elementType": "File" 20 | } -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 15 | 19 | 23 | 24 | 25 | 26 | 27 | 28 | 30 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/za/co/lukestonehm/logicaldefence/logical_defence/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package za.co.lukestonehm.logicaldefence 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/launcher_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/android/app/src/main/res/mipmap-hdpi/launcher_icon.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/launcher_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/android/app/src/main/res/mipmap-mdpi/launcher_icon.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/launcher_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png -------------------------------------------------------------------------------- /android/app/src/main/res/values-de/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /android/app/src/main/res/values-en-rUS/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Logical Defense 4 | -------------------------------------------------------------------------------- /android/app/src/main/res/values-eo/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Logika Defendo 4 | -------------------------------------------------------------------------------- /android/app/src/main/res/values-es/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Defensa lógica 5 | -------------------------------------------------------------------------------- /android/app/src/main/res/values-fr/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Défense logique 4 | -------------------------------------------------------------------------------- /android/app/src/main/res/values-it/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Difesa Logica 4 | -------------------------------------------------------------------------------- /android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/main/res/values-pl/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Logiczna Obrona 4 | -------------------------------------------------------------------------------- /android/app/src/main/res/values-pt-rBR/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Defesa Lógica 4 | -------------------------------------------------------------------------------- /android/app/src/main/res/values-pt/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Defesa Lógica 4 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #212121 4 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Logical Defence 4 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.7.10' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:7.1.2' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | mavenCentral() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | tasks.register("clean", Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip 7 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /assets/app-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/assets/app-icon.png -------------------------------------------------------------------------------- /fastlane/metadata/android/en-GB/full_description.txt: -------------------------------------------------------------------------------- 1 | Prepare to battle against the sophists of the world with this beautiful app. 2 | 3 | Steel yourselves, and begin to defend your mind from the language used against you by the sophists of the world. 4 | 5 | They are many, we are few, but with the Logical Defence app, we now have an extra tool in our box of rationality. 6 | Use this app to quickly look-up the logical fallacies we face when debating against the irrational. 7 | Call out those who are logically flawed and help to build a more rational society. 8 | 9 | Honesty is the first virtue, so let's be painfully honest towards those who attempt to use language as a form of mental abuse. Never accept a logical fallacy, attack the attacker, and spread logic and reason to those you love. 10 | 11 | Ok, enough rambling. This is an app that displays a list of the logical fallacies that haunt every rationalists' mind. 12 | 13 | Some features: 14 | 15 | - Left drawer that houses categories. 16 | - Share function -> Long press a fallacy to share it. 17 | - Nice about screen. 18 | - Language selection function. 19 | 20 | This is a fully open-source project (GNU v2), and the source is hosted on GitHub so feel free to fork me :) 21 | 22 | Feel free to leave your comments/suggestions. Thank you for downloading! 23 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-GB/short_description.txt: -------------------------------------------------------------------------------- 1 | Encyclopedia of logical fallacies 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-GB/title.txt: -------------------------------------------------------------------------------- 1 | Logical Defence 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/full_description.txt: -------------------------------------------------------------------------------- 1 | Prepare to battle against the sophists of the world with this beautiful app. 2 | 3 | Steel yourselves, and begin to defend your mind from the language used against you by the sophists of the world. 4 | 5 | They are many, we are few, but with the Logical Defense app, we now have an extra tool in our box of rationality. 6 | Use this app to quickly look-up the logical fallacies we face when debating against the irrational. 7 | Call out those who are logically flawed and help to build a more rational society. 8 | 9 | Honesty is the first virtue, so let's be painfully honest towards those who attempt to use language as a form of mental abuse. Never accept a logical fallacy, attack the attacker, and spread logic and reason to those you love. 10 | 11 | Ok, enough rambling. This is an app that displays a list of the logical fallacies that haunt every rationalists' mind. 12 | 13 | Some features: 14 | 15 | - Left drawer that houses categories. 16 | - Share function -> Long press a fallacy to share it. 17 | - Nice about screen. 18 | - Language selection function. 19 | 20 | This is a fully open-source project (GNU v2), and the source is hosted on GitHub so feel free to fork me :) 21 | 22 | Feel free to leave your comments/suggestions. Thank you for downloading! 23 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/short_description.txt: -------------------------------------------------------------------------------- 1 | Encyclopedia of logical fallacies 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/title.txt: -------------------------------------------------------------------------------- 1 | Logical Defense 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/eo/full_description.txt: -------------------------------------------------------------------------------- 1 | Preparu al batalo kontraŭ logikaj trompuloj de la mondo kun tiu ĉi bela aplikaĵo. 2 | 3 | Armu vin kaj komencu defendi vian menson kontraŭ la lingvaĵo de sofistoj de la mondo. 4 | 5 | Ili multas, ni malmultas, sed kun la aplikaĵo Logika Defendo ni posedas alian ilon en nia raciujo. Uzu tiun ĉi aplikaĵon por rapide antaŭvidi renkontatajn logikajn trompojn dum disputi kun malraciuloj. Elvoku ĉiujn, kiuj logike eraras kaj helpu igi la socion pli racionalisma. 6 | 7 | Sincero estas la plej grava virto, do estu ekstreme sincera kontraŭ tiuj, kiuj provas uzi la lingvon kiel rimedon por mensa misuzo. Neniam konsentu kun logikaj trompoj, ataku la atakanton kaj dissemu logikon kaj racion al ĉiuj, kiujn vi estimas. 8 | 9 | Bone, sufiĉo da parolaĉo. Tio ĉi estas aplikaĵo, kiu montras liston de logikaj trompoj, kiuj trudas menson de ĉiu raciisto. 10 | 11 | Ĉefaj ebloj: 12 | - maldekstra panelo kun kategorioj; 13 | - kunhavigi - frapetadu trompon por kunhavigi ĝin; 14 | - klara enhavo; 15 | - eblo por ŝanĝi lingvon. 16 | 17 | Tiu ĉi projekto estas plene malfermkoda (GNU v2), kaj ĝia fontkodo estas gastigata ĉe GitHub, do bonvole idigu ĝin :) 18 | 19 | Bonvolu enmeti viajn opiniojn kaj proponojn. Dankon por elŝuti! 20 | -------------------------------------------------------------------------------- /fastlane/metadata/android/eo/short_description.txt: -------------------------------------------------------------------------------- 1 | Enciklopedio de logikaj sofismoj 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/eo/title.txt: -------------------------------------------------------------------------------- 1 | Logika Defendo 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/pl/full_description.txt: -------------------------------------------------------------------------------- 1 | Przygotuj się do bitwy przeciw sofizmom tego świata przy użyciu tej pięknej aplikacji. 2 | 3 | Uzbrój się i zacznij chronić swój umysł przed językiem używanym przeciw Tobie przez krętaczy tego świata. 4 | 5 | Ich jest wielu, nas jest mniej, ale aplikacja Logiczna Obrona jest podręcznym przewodnikiem w naszym świecie racjonalności. 6 | Użyj tej aplikacji, aby szybko podejrzeć logiczne sofizmaty podczas konfrontacji z nieracjonalnym. 7 | Wyzwij wszystkich gwałcicieli logiki i pomóż zbudować bardziej racjonalne społeczeństwo. 8 | 9 | Szczerość jest najważniejszą cnotą, więc bądźmy szczerzy aż do bólu przeciw tym, którzy próbują używać języka jako środka psychicznego nadużycia. Nigdy nie akceptuj logicznych sofizmatów, atakuj krętacza i szerz logikę i rozsądek tym, których szanujesz. 10 | 11 | Już koniec dyrdymałów. To apka wyświetla listę logicznych sofizmatów, które niepokoją umysł każdego racjonalisty. 12 | 13 | Główne funkcje: 14 | 15 | - Wysuwany pasek kategorii. 16 | - Opcja dzielenia się -> Naciśnij i przytrzymaj sofizmat, aby się nim podzielić. 17 | - Przejrzysta zawartość. 18 | - Możliwość wyboru języka. 19 | 20 | Ten projekt w pełni otwartoźródłowy (GNU v2), a kod źródłowy jest hostowany na GitHubie, więc w każdej chwili możesz stworzyć swoje własne odgałęzienie :) 21 | 22 | Możesz śmiało zostawić komentarz/sugestię. Dziękujemy za pobranie! 23 | -------------------------------------------------------------------------------- /fastlane/metadata/android/pl/short_description.txt: -------------------------------------------------------------------------------- 1 | Encyklopedia logicznych sofizmatów 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/pl/title.txt: -------------------------------------------------------------------------------- 1 | Logiczna Obrona 2 | -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | **/dgph 2 | *.mode1v3 3 | *.mode2v3 4 | *.moved-aside 5 | *.pbxuser 6 | *.perspectivev3 7 | **/*sync/ 8 | .sconsign.dblite 9 | .tags* 10 | **/.vagrant/ 11 | **/DerivedData/ 12 | Icon? 13 | **/Pods/ 14 | **/.symlinks/ 15 | profile 16 | xcuserdata 17 | **/.generated/ 18 | Flutter/App.framework 19 | Flutter/Flutter.framework 20 | Flutter/Flutter.podspec 21 | Flutter/Generated.xcconfig 22 | Flutter/ephemeral/ 23 | Flutter/app.flx 24 | Flutter/app.zip 25 | Flutter/flutter_assets/ 26 | Flutter/flutter_export_environment.sh 27 | ServiceDefinitions.json 28 | Runner/GeneratedPluginRegistrant.* 29 | 30 | # Exceptions to above rules. 31 | !default.mode1v3 32 | !default.mode2v3 33 | !default.pbxuser 34 | !default.perspectivev3 35 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 9.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 52 | 54 | 60 | 61 | 62 | 63 | 69 | 71 | 77 | 78 | 79 | 80 | 82 | 83 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | Logical Defence 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | Logical Defence 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(FLUTTER_BUILD_NUMBER) 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | UIViewControllerBasedStatusBarAppearance 45 | 46 | CADisableMinimumFrameDurationOnPhone 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /lib/controllers/category.controller.dart: -------------------------------------------------------------------------------- 1 | import 'package:get/get.dart'; 2 | 3 | class CategoryController extends GetxController { 4 | final selectedCategory = '0'.obs; 5 | } 6 | -------------------------------------------------------------------------------- /lib/controllers/controllers.dart: -------------------------------------------------------------------------------- 1 | export 'category.controller.dart'; 2 | export 'language.controller.dart'; 3 | export 'theme.controller.dart'; -------------------------------------------------------------------------------- /lib/controllers/language.controller.dart: -------------------------------------------------------------------------------- 1 | import 'dart:ui'; 2 | 3 | import 'package:get/get.dart'; 4 | import 'package:get_storage/get_storage.dart'; 5 | 6 | class LanguageController extends GetxController { 7 | final selectedLocale = ''.obs; 8 | 9 | final _getBox = GetStorage(); 10 | 11 | @override 12 | void onReady() { 13 | if (_getBox.hasData('selected_language')) { 14 | selectedLocale.value = _getBox.read('selected_language'); 15 | } else { 16 | selectedLocale.value = 17 | '${Get.deviceLocale?.languageCode}_${Get.deviceLocale?.countryCode}'; 18 | } 19 | super.onReady(); 20 | } 21 | 22 | changeLocale(String locale) async { 23 | final splitLocale = locale.split('_'); 24 | Get.updateLocale(Locale(splitLocale[0], splitLocale[1])); 25 | await _getBox.write('selected_language', locale); 26 | selectedLocale.value = locale; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /lib/controllers/theme.controller.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:get/get.dart'; 3 | import 'package:get_storage/get_storage.dart'; 4 | 5 | class ThemeController extends GetxController { 6 | static const themes = {0: 'system', 1: 'light', 2: 'dark'}; 7 | 8 | final selectedTheme = 0.obs; 9 | 10 | final _getBox = GetStorage(); 11 | 12 | @override 13 | void onReady() { 14 | if (_getBox.hasData('selected_theme')) { 15 | selectedTheme.value = _getBox.read('selected_theme'); 16 | } 17 | super.onReady(); 18 | } 19 | 20 | void changeTheme(int theme) { 21 | _getBox.write('selected_theme', theme); 22 | switch (theme) { 23 | case 0: 24 | Get.changeThemeMode(ThemeMode.system); 25 | break; 26 | case 1: 27 | Get.changeThemeMode(ThemeMode.light); 28 | break; 29 | case 2: 30 | Get.changeThemeMode(ThemeMode.dark); 31 | break; 32 | } 33 | selectedTheme.value = theme; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/services.dart'; 3 | import 'package:get/get.dart'; 4 | import 'package:get_storage/get_storage.dart'; 5 | import 'package:logical_defence/controllers/controllers.dart'; 6 | 7 | import 'routes.dart'; 8 | import 'shared/shared.dart'; 9 | 10 | void main() async { 11 | WidgetsFlutterBinding.ensureInitialized(); 12 | //set status bar transparent 13 | SystemChrome.setSystemUIOverlayStyle( 14 | const SystemUiOverlayStyle(statusBarColor: Colors.transparent)); 15 | 16 | //init Get stuff here 17 | await GetStorage.init(); 18 | 19 | //put Get controllers here 20 | Get.put(CategoryController()); 21 | Get.put(LanguageController()); 22 | Get.put(ThemeController()); 23 | 24 | final getBox = GetStorage(); 25 | 26 | Locale? locale = Get.deviceLocale; 27 | ThemeMode theme = ThemeMode.system; 28 | 29 | if (getBox.hasData('selected_language')) { 30 | final localeSplit = (getBox.read('selected_language') as String).split('_'); 31 | locale = Locale(localeSplit[0], localeSplit[1]); 32 | } 33 | 34 | if (getBox.hasData('selected_theme')) { 35 | switch (getBox.read('selected_theme')) { 36 | case 0: 37 | break; 38 | case 1: 39 | theme = ThemeMode.light; 40 | break; 41 | case 2: 42 | theme = ThemeMode.dark; 43 | break; 44 | } 45 | } 46 | 47 | runApp(MyApp( 48 | locale: locale, 49 | theme: theme, 50 | )); 51 | } 52 | 53 | class MyApp extends StatelessWidget { 54 | const MyApp({Key? key, required this.locale, required this.theme}) 55 | : super(key: key); 56 | 57 | final Locale? locale; 58 | final ThemeMode theme; 59 | 60 | @override 61 | Widget build(BuildContext context) { 62 | return GetMaterialApp( 63 | title: 'Logical Defence', 64 | translations: AppTranslations(), 65 | locale: locale, 66 | initialRoute: "/", 67 | getPages: AppRoutes.routes, 68 | themeMode: theme, 69 | theme: ThemeData.light().copyWith( 70 | primaryColor: Colors.deepOrange, 71 | colorScheme: const ColorScheme.light() 72 | .copyWith(primary: Colors.deepOrange, secondary: Colors.grey), 73 | scaffoldBackgroundColor: Colors.grey.shade300, 74 | cardTheme: const CardTheme().copyWith( 75 | color: Colors.grey.shade100, 76 | elevation: 0, 77 | shape: 78 | RoundedRectangleBorder(borderRadius: BorderRadius.circular(4)), 79 | ), 80 | popupMenuTheme: PopupMenuTheme.of(context).copyWith( 81 | color: Colors.grey.shade300, 82 | textStyle: TextStyle( 83 | color: Colors.grey.shade800, 84 | fontWeight: FontWeight.w600, 85 | fontSize: 16)), 86 | appBarTheme: const AppBarTheme().copyWith( 87 | elevation: 0, 88 | backgroundColor: Colors.grey.shade300, 89 | iconTheme: const IconThemeData().copyWith(color: Colors.black), 90 | titleTextStyle: const TextStyle().copyWith( 91 | color: Colors.grey.shade800, 92 | fontSize: 20, 93 | fontWeight: FontWeight.bold)), 94 | textTheme: const TextTheme().copyWith( 95 | headlineLarge: const TextStyle().copyWith( 96 | color: Colors.grey.shade800, fontWeight: FontWeight.bold), 97 | titleLarge: const TextStyle() 98 | .copyWith(fontSize: 24, color: Colors.deepOrange), 99 | labelSmall: 100 | const TextStyle().copyWith(color: Colors.grey.shade500), 101 | bodyMedium: const TextStyle() 102 | .copyWith(color: Colors.black, fontSize: 16)), 103 | drawerTheme: DrawerTheme.of(context).copyWith( 104 | backgroundColor: Colors.grey.shade300, 105 | ), 106 | listTileTheme: ListTileTheme.of(context) 107 | .copyWith(textColor: Colors.grey.shade800)), 108 | 109 | // dark theme 110 | darkTheme: ThemeData.dark().copyWith( 111 | primaryColor: Colors.deepOrange, 112 | colorScheme: const ColorScheme.dark() 113 | .copyWith(primary: Colors.deepOrange, secondary: Colors.white), 114 | scaffoldBackgroundColor: Colors.grey.shade900, 115 | cardTheme: const CardTheme().copyWith( 116 | elevation: 0, 117 | shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(4)), 118 | ), 119 | popupMenuTheme: PopupMenuTheme.of(context).copyWith( 120 | color: Colors.grey.shade800, 121 | textStyle: TextStyle( 122 | color: Colors.grey.shade50, 123 | fontWeight: FontWeight.normal, 124 | fontSize: 16)), 125 | appBarTheme: const AppBarTheme() 126 | .copyWith(elevation: 0, backgroundColor: Colors.grey.shade900), 127 | textTheme: const TextTheme().copyWith( 128 | headlineLarge: const TextStyle() 129 | .copyWith(color: Colors.white, fontWeight: FontWeight.bold), 130 | titleLarge: const TextStyle() 131 | .copyWith(fontSize: 24, color: Colors.deepOrange), 132 | labelSmall: const TextStyle().copyWith(color: Colors.grey.shade400), 133 | bodyMedium: 134 | const TextStyle().copyWith(color: Colors.white, fontSize: 16), 135 | titleMedium: Theme.of(context) 136 | .textTheme 137 | .titleMedium 138 | ?.copyWith(color: Colors.white)), 139 | ), 140 | ); 141 | } 142 | } 143 | -------------------------------------------------------------------------------- /lib/pages/about.page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:get/get.dart'; 3 | 4 | class AboutPage extends StatelessWidget { 5 | const AboutPage({Key? key}) : super(key: key); 6 | 7 | @override 8 | Widget build(BuildContext context) { 9 | return Scaffold( 10 | appBar: AppBar( 11 | title: Text('action_about'.tr), 12 | ), 13 | body: ListView(padding: const EdgeInsets.all(16), children: [ 14 | Text( 15 | 'app_name'.tr, 16 | textAlign: TextAlign.center, 17 | style: Theme.of(context).textTheme.headlineLarge?.copyWith( 18 | color: Colors.deepOrange 19 | ), 20 | ), 21 | Padding( 22 | padding: const EdgeInsets.only(top: 36, bottom: 36), 23 | child: Text( 24 | 'creator'.tr, 25 | textAlign: TextAlign.center, 26 | style: Theme.of(context).textTheme.bodyMedium, 27 | ), 28 | ), 29 | SelectableText( 30 | 'about_more'.tr, 31 | textAlign: TextAlign.center, 32 | style: Theme.of(context).textTheme.bodyMedium, 33 | ) 34 | ]), 35 | ); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /lib/pages/home.page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_share/flutter_share.dart'; 3 | import 'package:get/get.dart'; 4 | import 'package:logical_defence/controllers/controllers.dart'; 5 | import 'package:logical_defence/widgets/widgets.dart'; 6 | 7 | import '../shared/shared.dart'; 8 | 9 | class HomePage extends StatelessWidget { 10 | HomePage({Key? key}) : super(key: key); 11 | 12 | final CategoryController _categoryController = Get.find(); 13 | final LanguageController _languageController = Get.find(); 14 | final ThemeController _themeController = Get.find(); 15 | 16 | @override 17 | Widget build(BuildContext context) { 18 | return Scaffold( 19 | appBar: AppBar( 20 | title: Text( 21 | 'app_name'.tr, 22 | style: Theme.of(context).appBarTheme.titleTextStyle, 23 | overflow: TextOverflow.fade, 24 | ), 25 | actions: [ 26 | PopupMenuButton( 27 | tooltip: 'action_settings'.tr, 28 | onSelected: (value) => 29 | _onSettingsPressed(context, value as String), 30 | itemBuilder: (BuildContext popupMenuContext) { 31 | return {'action_language', 'action_theme', 'action_about'} 32 | .map((String choice) { 33 | return PopupMenuItem( 34 | value: choice, 35 | child: Text(choice.tr), 36 | ); 37 | }).toList(); 38 | }), 39 | ], 40 | ), 41 | drawer: Drawer( 42 | child: Obx( 43 | () => ListView( 44 | children: [ 45 | DrawerHeader( 46 | decoration: const BoxDecoration(color: Colors.deepOrange), 47 | child: Column( 48 | crossAxisAlignment: CrossAxisAlignment.start, 49 | children: [ 50 | Padding( 51 | padding: const EdgeInsets.only(top: 8.0, bottom: 8), 52 | child: Text( 53 | 'app_name'.tr, 54 | style: Theme.of(context) 55 | .textTheme 56 | .headlineMedium 57 | ?.copyWith(fontSize: 28, color: Colors.white), 58 | ), 59 | ), 60 | Text( 61 | 'subtitle'.tr, 62 | style: Theme.of(context) 63 | .textTheme 64 | .headlineSmall 65 | ?.copyWith(fontSize: 20, color: Colors.white), 66 | ), 67 | ], 68 | ), 69 | ), 70 | ..._renderDrawerCategories( 71 | _categoryController.selectedCategory.value) 72 | ], 73 | ), 74 | ), 75 | ), 76 | body: Align( 77 | alignment: Alignment.topCenter, 78 | child: SizedBox( 79 | width: 1000, 80 | child: Obx( 81 | () => ListView( 82 | padding: const EdgeInsets.only(bottom: 16), 83 | children: [ 84 | Padding( 85 | padding: const EdgeInsets.all(16.0).copyWith(right: 80), 86 | child: FittedBox( 87 | fit: BoxFit.fitWidth, 88 | child: Text( 89 | 'sections_${_categoryController.selectedCategory.value}' 90 | .tr, 91 | style: Theme.of(context).textTheme.headlineLarge, 92 | ), 93 | ), 94 | ), 95 | ..._renderCards(_categoryController.selectedCategory.value) 96 | ], 97 | ), 98 | ), 99 | ), 100 | ), 101 | ); 102 | } 103 | 104 | List _renderCards(String selectedCategory) { 105 | return FallacyDataStructure 106 | .fallaciesStructure['fallacies']!['titles']![selectedCategory]! 107 | .map((key, value) => MapEntry( 108 | key, 109 | FallacyCard( 110 | header: 'fallacies_titles_${selectedCategory}_$key'.tr, 111 | body: 'fallacies_descs_${selectedCategory}_$key'.tr, 112 | example: 'fallacies_examples_${selectedCategory}_$key'.tr, 113 | number: "${int.parse(key) + 1}", 114 | onLongPressed: () => _shareFallacy( 115 | 'fallacies_titles_${selectedCategory}_$key'.tr, 116 | 'fallacies_descs_${selectedCategory}_$key'.tr, 117 | 'fallacies_examples_${selectedCategory}_$key'.tr), 118 | ))) 119 | .values 120 | .toList(); 121 | } 122 | 123 | List _renderDrawerCategories(String selectedCategory) { 124 | return FallacyDataStructure.sectionsStructure['sections']! 125 | .map((key, value) => MapEntry( 126 | key, 127 | ListTile( 128 | title: Text( 129 | 'sections_$key'.tr, 130 | style: TextStyle( 131 | fontSize: 16, 132 | color: selectedCategory == key 133 | ? Colors.deepOrange 134 | : Get.isDarkMode 135 | ? Colors.grey.shade400 136 | : Colors.grey.shade800), 137 | ), 138 | onTap: () => _onCategoryPressed(key), 139 | ))) 140 | .values 141 | .toList(); 142 | } 143 | 144 | void _onCategoryPressed(String category) { 145 | _categoryController.selectedCategory.value = category; 146 | } 147 | 148 | void _onSettingsPressed(BuildContext context, String setting) { 149 | switch (setting) { 150 | case 'action_language': 151 | _showLanguageBottomSheet(context); 152 | break; 153 | case 'action_theme': 154 | _showThemeBottomSheet(context); 155 | break; 156 | case 'action_about': 157 | Get.toNamed('/about'); 158 | break; 159 | } 160 | } 161 | 162 | void _showLanguageBottomSheet(BuildContext context) { 163 | Get.bottomSheet(Container( 164 | decoration: BoxDecoration( 165 | color: Theme.of(context).scaffoldBackgroundColor, 166 | borderRadius: const BorderRadius.only( 167 | topLeft: Radius.circular(4), topRight: Radius.circular(4))), 168 | child: ListView( 169 | shrinkWrap: true, 170 | padding: const EdgeInsets.only(top: 16, bottom: 16), 171 | children: [ 172 | Padding( 173 | padding: const EdgeInsets.only( 174 | left: 16.0, right: 16.0, top: 16.0, bottom: 8), 175 | child: Text( 176 | 'language_dialog_title'.tr, 177 | style: Theme.of(context) 178 | .textTheme 179 | .headlineLarge 180 | ?.copyWith(fontSize: 24, fontWeight: FontWeight.normal), 181 | ), 182 | ), 183 | ...FallacyDataStructure.localeStructure['locales']!['names']! 184 | .map((key, value) => MapEntry( 185 | key, 186 | ListTile( 187 | leading: Obx( 188 | () => Radio( 189 | activeColor: Colors.deepOrange, 190 | value: key, 191 | groupValue: _languageController.selectedLocale.value, 192 | onChanged: (value) { 193 | _languageController.changeLocale(value as String); 194 | }, 195 | ), 196 | ), 197 | onTap: () => _languageController.changeLocale(key), 198 | title: Text('locale_name_$key'.tr), 199 | ))) 200 | .values 201 | .toList(), 202 | ], 203 | ), 204 | )); 205 | } 206 | 207 | void _showThemeBottomSheet(BuildContext context) { 208 | Get.bottomSheet(Container( 209 | decoration: BoxDecoration( 210 | color: Theme.of(context).scaffoldBackgroundColor, 211 | borderRadius: const BorderRadius.only( 212 | topLeft: Radius.circular(4), topRight: Radius.circular(4))), 213 | child: ListView( 214 | padding: const EdgeInsets.only(top: 16, bottom: 16), 215 | shrinkWrap: true, 216 | children: [ 217 | Padding( 218 | padding: const EdgeInsets.only( 219 | left: 16.0, right: 16.0, top: 16.0, bottom: 8), 220 | child: Text( 221 | 'action_theme'.tr, 222 | style: Theme.of(context) 223 | .textTheme 224 | .headlineLarge 225 | ?.copyWith(fontSize: 24, fontWeight: FontWeight.normal), 226 | ), 227 | ), 228 | ...ThemeController.themes 229 | .map((key, value) => MapEntry( 230 | key, 231 | ListTile( 232 | leading: Obx( 233 | () => Radio( 234 | activeColor: Colors.deepOrange, 235 | value: key, 236 | groupValue: _themeController.selectedTheme.value, 237 | onChanged: (value) { 238 | _themeController.changeTheme(value as int); 239 | }, 240 | ), 241 | ), 242 | onTap: () => _themeController.changeTheme(key), 243 | title: Text('theme_name_$key'.tr, 244 | style: Theme.of(context).textTheme.titleMedium), 245 | ))) 246 | .values 247 | .toList(), 248 | ], 249 | ), 250 | )); 251 | } 252 | 253 | _shareFallacy(String title, String desc, String example) async { 254 | final shareString = "$title\n\n$desc\n\n$example${'from'.tr}"; 255 | await FlutterShare.share( 256 | title: 'share'.tr, chooserTitle: 'share'.tr, text: shareString); 257 | } 258 | } 259 | -------------------------------------------------------------------------------- /lib/pages/pages.dart: -------------------------------------------------------------------------------- 1 | export 'home.page.dart'; 2 | export 'about.page.dart'; -------------------------------------------------------------------------------- /lib/routes.dart: -------------------------------------------------------------------------------- 1 | import 'package:get/get.dart'; 2 | 3 | import 'pages/pages.dart'; 4 | 5 | class AppRoutes { 6 | static final routes = [ 7 | GetPage(name: '/', page: () => HomePage()), 8 | GetPage(name: '/about', page: () => const AboutPage()), 9 | ]; 10 | } 11 | -------------------------------------------------------------------------------- /lib/shared/fallacy_data_structure.dart: -------------------------------------------------------------------------------- 1 | class FallacyDataStructure { 2 | static const Map>> localeStructure = { 3 | "locales": { 4 | "names": { 5 | "en_GB": true, 6 | "en_US": true, 7 | "de_DE": true, 8 | "eo_EO": true, 9 | "es_ES": true, 10 | "fr_FR": true, 11 | "it_IT": true, 12 | "pl_PL": true, 13 | "pt_PT": true, 14 | "pt_BR": true, 15 | "ru_RU": true, 16 | "nl": true, 17 | } 18 | } 19 | }; 20 | 21 | static const Map> sectionsStructure = { 22 | "sections": { 23 | "0": true, 24 | "1": true, 25 | "2": true, 26 | "3": true, 27 | "4": true, 28 | "5": true 29 | }, 30 | }; 31 | 32 | static const Map>>> 33 | fallaciesStructure = { 34 | "fallacies": { 35 | "titles": { 36 | "0": { 37 | "0": true, 38 | "1": true, 39 | "2": true, 40 | "3": true, 41 | "4": true, 42 | "5": true, 43 | "6": true, 44 | "7": true, 45 | "8": true, 46 | "9": true 47 | }, 48 | "1": { 49 | "0": true, 50 | "1": true, 51 | "2": true, 52 | "3": true, 53 | "4": true, 54 | "5": true, 55 | "6": true, 56 | "7": true 57 | }, 58 | "2": { 59 | "0": true, 60 | "1": true, 61 | "2": true, 62 | "3": true, 63 | "4": true, 64 | "5": true, 65 | "6": true, 66 | "7": true, 67 | "8": true, 68 | "9": true, 69 | "10": true, 70 | "11": true, 71 | "12": true 72 | }, 73 | "3": { 74 | "0": true, 75 | "1": true, 76 | "2": true, 77 | "3": true, 78 | "4": true, 79 | "5": true, 80 | "6": true 81 | }, 82 | "4": { 83 | "0": true, 84 | "1": true, 85 | "2": true, 86 | "3": true, 87 | "4": true, 88 | "5": true, 89 | "6": true, 90 | "7": true, 91 | "8": true, 92 | "9": true, 93 | "10": true 94 | }, 95 | "5": {"0": true, "1": true, "2": true, "3": true, "4": true, "5": true} 96 | }, 97 | "descs": { 98 | "0": { 99 | "0": true, 100 | "1": true, 101 | "2": true, 102 | "3": true, 103 | "4": true, 104 | "5": true, 105 | "6": true, 106 | "7": true, 107 | "8": true, 108 | "9": true 109 | }, 110 | "1": { 111 | "0": true, 112 | "1": true, 113 | "2": true, 114 | "3": true, 115 | "4": true, 116 | "5": true, 117 | "6": true, 118 | "7": true 119 | }, 120 | "2": { 121 | "0": true, 122 | "1": true, 123 | "2": true, 124 | "3": true, 125 | "4": true, 126 | "5": true, 127 | "6": true, 128 | "7": true, 129 | "8": true, 130 | "9": true, 131 | "10": true, 132 | "11": true, 133 | "12": true 134 | }, 135 | "3": { 136 | "0": true, 137 | "1": true, 138 | "2": true, 139 | "3": true, 140 | "4": true, 141 | "5": true, 142 | "6": true 143 | }, 144 | "4": { 145 | "0": true, 146 | "1": true, 147 | "2": true, 148 | "3": true, 149 | "4": true, 150 | "5": true, 151 | "6": true, 152 | "7": true, 153 | "8": true, 154 | "9": true, 155 | "10": true 156 | }, 157 | "5": {"0": true, "1": true, "2": true, "3": true, "4": true, "5": true} 158 | }, 159 | "examples": { 160 | "0": { 161 | "0": true, 162 | "1": true, 163 | "2": true, 164 | "3": true, 165 | "4": true, 166 | "5": true, 167 | "6": true, 168 | "7": true, 169 | "8": true, 170 | "9": true 171 | }, 172 | "1": { 173 | "0": true, 174 | "1": true, 175 | "2": true, 176 | "3": true, 177 | "4": true, 178 | "5": true, 179 | "6": true, 180 | "7": true 181 | }, 182 | "2": { 183 | "0": true, 184 | "1": true, 185 | "2": true, 186 | "3": true, 187 | "4": true, 188 | "5": true, 189 | "6": true, 190 | "7": true, 191 | "8": true, 192 | "9": true, 193 | "10": true, 194 | "11": true, 195 | "12": true 196 | }, 197 | "3": { 198 | "0": true, 199 | "1": true, 200 | "2": true, 201 | "3": true, 202 | "4": true, 203 | "5": true, 204 | "6": true 205 | }, 206 | "4": { 207 | "0": true, 208 | "1": true, 209 | "2": true, 210 | "3": true, 211 | "4": true, 212 | "5": true, 213 | "6": true, 214 | "7": true, 215 | "8": true, 216 | "9": true, 217 | "10": true 218 | }, 219 | "5": {"0": true, "1": true, "2": true, "3": true, "4": true, "5": true} 220 | } 221 | } 222 | }; 223 | } 224 | -------------------------------------------------------------------------------- /lib/shared/shared.dart: -------------------------------------------------------------------------------- 1 | export 'app_translations.dart'; 2 | export 'fallacy_data_structure.dart'; 3 | -------------------------------------------------------------------------------- /lib/widgets/fallacy_card.widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class FallacyCard extends StatelessWidget { 4 | const FallacyCard( 5 | {Key? key, 6 | required this.header, 7 | required this.body, 8 | required this.example, 9 | required this.number, 10 | required this.onLongPressed}) 11 | : super(key: key); 12 | 13 | final String header; 14 | final String body; 15 | final String example; 16 | final String number; 17 | 18 | final void Function() onLongPressed; 19 | 20 | // padding 21 | static const _columnPadding = EdgeInsets.all(8.0); 22 | static const _cardPadding = EdgeInsets.all(8.0); 23 | 24 | @override 25 | Widget build(BuildContext context) { 26 | return Padding( 27 | padding: 28 | const EdgeInsets.only(left: 8.0, right: 8.0, top: 4.0, bottom: 4.0), 29 | child: Card( 30 | child: InkWell( 31 | onLongPress: onLongPressed, 32 | child: Padding( 33 | padding: _columnPadding, 34 | child: Column( 35 | crossAxisAlignment: CrossAxisAlignment.start, 36 | children: [ 37 | Padding( 38 | padding: _cardPadding.copyWith(top: 8, bottom: 0), 39 | child: Text( 40 | number, 41 | style: Theme.of(context).textTheme.labelSmall, 42 | ), 43 | ), 44 | Padding( 45 | padding: _cardPadding.copyWith(top: 8, bottom: 0), 46 | child: Text( 47 | header, 48 | style: Theme.of(context).textTheme.titleLarge, 49 | ), 50 | ), 51 | Padding( 52 | padding: _cardPadding.copyWith(top: 0, bottom: 0), 53 | child: const Divider( 54 | thickness: 3, 55 | ), 56 | ), 57 | Padding( 58 | padding: _cardPadding, 59 | child: Text( 60 | body, 61 | style: Theme.of(context).textTheme.bodyMedium, 62 | ), 63 | ), 64 | Padding( 65 | padding: _cardPadding, 66 | child: Text(example, 67 | style: Theme.of(context).textTheme.bodyMedium?.copyWith( 68 | fontStyle: FontStyle.italic, 69 | fontWeight: FontWeight.bold)), 70 | ) 71 | ], 72 | ), 73 | ), 74 | ), 75 | ), 76 | ); 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /lib/widgets/widgets.dart: -------------------------------------------------------------------------------- 1 | export 'fallacy_card.widget.dart'; -------------------------------------------------------------------------------- /linux/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral 2 | -------------------------------------------------------------------------------- /linux/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Project-level configuration. 2 | cmake_minimum_required(VERSION 3.10) 3 | project(runner LANGUAGES CXX) 4 | 5 | # The name of the executable created for the application. Change this to change 6 | # the on-disk name of your application. 7 | set(BINARY_NAME "logical-defence") 8 | # The unique GTK application identifier for this application. See: 9 | # https://wiki.gnome.org/HowDoI/ChooseApplicationID 10 | set(APPLICATION_ID "za.co.lukestonehm.logicaldefence") 11 | 12 | # Explicitly opt in to modern CMake behaviors to avoid warnings with recent 13 | # versions of CMake. 14 | cmake_policy(SET CMP0063 NEW) 15 | 16 | # Load bundled libraries from the lib/ directory relative to the binary. 17 | set(CMAKE_INSTALL_RPATH "$ORIGIN/lib") 18 | 19 | # Root filesystem for cross-building. 20 | if(FLUTTER_TARGET_PLATFORM_SYSROOT) 21 | set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT}) 22 | set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT}) 23 | set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 24 | set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) 25 | set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 26 | set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 27 | endif() 28 | 29 | # Define build configuration options. 30 | if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) 31 | set(CMAKE_BUILD_TYPE "Debug" CACHE 32 | STRING "Flutter build mode" FORCE) 33 | set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS 34 | "Debug" "Profile" "Release") 35 | endif() 36 | 37 | # Compilation settings that should be applied to most targets. 38 | # 39 | # Be cautious about adding new options here, as plugins use this function by 40 | # default. In most cases, you should add new options to specific targets instead 41 | # of modifying this function. 42 | function(APPLY_STANDARD_SETTINGS TARGET) 43 | target_compile_features(${TARGET} PUBLIC cxx_std_14) 44 | target_compile_options(${TARGET} PRIVATE -Wall -Werror) 45 | target_compile_options(${TARGET} PRIVATE "$<$>:-O3>") 46 | target_compile_definitions(${TARGET} PRIVATE "$<$>:NDEBUG>") 47 | endfunction() 48 | 49 | # Flutter library and tool build rules. 50 | set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") 51 | add_subdirectory(${FLUTTER_MANAGED_DIR}) 52 | 53 | # System-level dependencies. 54 | find_package(PkgConfig REQUIRED) 55 | pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) 56 | 57 | add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}") 58 | 59 | # Define the application target. To change its name, change BINARY_NAME above, 60 | # not the value here, or `flutter run` will no longer work. 61 | # 62 | # Any new source files that you add to the application should be added here. 63 | add_executable(${BINARY_NAME} 64 | "main.cc" 65 | "my_application.cc" 66 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" 67 | ) 68 | 69 | # Apply the standard set of build settings. This can be removed for applications 70 | # that need different build settings. 71 | apply_standard_settings(${BINARY_NAME}) 72 | 73 | # Add dependency libraries. Add any application-specific dependencies here. 74 | target_link_libraries(${BINARY_NAME} PRIVATE flutter) 75 | target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK) 76 | 77 | # Run the Flutter tool portions of the build. This must not be removed. 78 | add_dependencies(${BINARY_NAME} flutter_assemble) 79 | 80 | # Only the install-generated bundle's copy of the executable will launch 81 | # correctly, since the resources must in the right relative locations. To avoid 82 | # people trying to run the unbundled copy, put it in a subdirectory instead of 83 | # the default top-level location. 84 | set_target_properties(${BINARY_NAME} 85 | PROPERTIES 86 | RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run" 87 | ) 88 | 89 | # Generated plugin build rules, which manage building the plugins and adding 90 | # them to the application. 91 | include(flutter/generated_plugins.cmake) 92 | 93 | 94 | # === Installation === 95 | # By default, "installing" just makes a relocatable bundle in the build 96 | # directory. 97 | set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle") 98 | if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) 99 | set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) 100 | endif() 101 | 102 | # Start with a clean build bundle directory every time. 103 | install(CODE " 104 | file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\") 105 | " COMPONENT Runtime) 106 | 107 | set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") 108 | set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib") 109 | 110 | install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" 111 | COMPONENT Runtime) 112 | 113 | install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" 114 | COMPONENT Runtime) 115 | 116 | install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 117 | COMPONENT Runtime) 118 | 119 | foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES}) 120 | install(FILES "${bundled_library}" 121 | DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 122 | COMPONENT Runtime) 123 | endforeach(bundled_library) 124 | 125 | # Fully re-copy the assets directory on each build to avoid having stale files 126 | # from a previous install. 127 | set(FLUTTER_ASSET_DIR_NAME "flutter_assets") 128 | install(CODE " 129 | file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") 130 | " COMPONENT Runtime) 131 | install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" 132 | DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) 133 | 134 | # Install the AOT library on non-Debug builds only. 135 | if(NOT CMAKE_BUILD_TYPE MATCHES "Debug") 136 | install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 137 | COMPONENT Runtime) 138 | endif() 139 | -------------------------------------------------------------------------------- /linux/flutter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file controls Flutter-level build steps. It should not be edited. 2 | cmake_minimum_required(VERSION 3.10) 3 | 4 | set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") 5 | 6 | # Configuration provided via flutter tool. 7 | include(${EPHEMERAL_DIR}/generated_config.cmake) 8 | 9 | # TODO: Move the rest of this into files in ephemeral. See 10 | # https://github.com/flutter/flutter/issues/57146. 11 | 12 | # Serves the same purpose as list(TRANSFORM ... PREPEND ...), 13 | # which isn't available in 3.10. 14 | function(list_prepend LIST_NAME PREFIX) 15 | set(NEW_LIST "") 16 | foreach(element ${${LIST_NAME}}) 17 | list(APPEND NEW_LIST "${PREFIX}${element}") 18 | endforeach(element) 19 | set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE) 20 | endfunction() 21 | 22 | # === Flutter Library === 23 | # System-level dependencies. 24 | find_package(PkgConfig REQUIRED) 25 | pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) 26 | pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0) 27 | pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0) 28 | 29 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so") 30 | 31 | # Published to parent scope for install step. 32 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) 33 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) 34 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) 35 | set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE) 36 | 37 | list(APPEND FLUTTER_LIBRARY_HEADERS 38 | "fl_basic_message_channel.h" 39 | "fl_binary_codec.h" 40 | "fl_binary_messenger.h" 41 | "fl_dart_project.h" 42 | "fl_engine.h" 43 | "fl_json_message_codec.h" 44 | "fl_json_method_codec.h" 45 | "fl_message_codec.h" 46 | "fl_method_call.h" 47 | "fl_method_channel.h" 48 | "fl_method_codec.h" 49 | "fl_method_response.h" 50 | "fl_plugin_registrar.h" 51 | "fl_plugin_registry.h" 52 | "fl_standard_message_codec.h" 53 | "fl_standard_method_codec.h" 54 | "fl_string_codec.h" 55 | "fl_value.h" 56 | "fl_view.h" 57 | "flutter_linux.h" 58 | ) 59 | list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/") 60 | add_library(flutter INTERFACE) 61 | target_include_directories(flutter INTERFACE 62 | "${EPHEMERAL_DIR}" 63 | ) 64 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}") 65 | target_link_libraries(flutter INTERFACE 66 | PkgConfig::GTK 67 | PkgConfig::GLIB 68 | PkgConfig::GIO 69 | ) 70 | add_dependencies(flutter flutter_assemble) 71 | 72 | # === Flutter tool backend === 73 | # _phony_ is a non-existent file to force this command to run every time, 74 | # since currently there's no way to get a full input/output list from the 75 | # flutter tool. 76 | add_custom_command( 77 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} 78 | ${CMAKE_CURRENT_BINARY_DIR}/_phony_ 79 | COMMAND ${CMAKE_COMMAND} -E env 80 | ${FLUTTER_TOOL_ENVIRONMENT} 81 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh" 82 | ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE} 83 | VERBATIM 84 | ) 85 | add_custom_target(flutter_assemble DEPENDS 86 | "${FLUTTER_LIBRARY}" 87 | ${FLUTTER_LIBRARY_HEADERS} 88 | ) 89 | -------------------------------------------------------------------------------- /linux/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #include "generated_plugin_registrant.h" 8 | 9 | 10 | void fl_register_plugins(FlPluginRegistry* registry) { 11 | } 12 | -------------------------------------------------------------------------------- /linux/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void fl_register_plugins(FlPluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /linux/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | ) 7 | 8 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 9 | ) 10 | 11 | set(PLUGIN_BUNDLED_LIBRARIES) 12 | 13 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 14 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) 15 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 16 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 18 | endforeach(plugin) 19 | 20 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 21 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) 22 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 23 | endforeach(ffi_plugin) 24 | -------------------------------------------------------------------------------- /linux/main.cc: -------------------------------------------------------------------------------- 1 | #include "my_application.h" 2 | 3 | int main(int argc, char** argv) { 4 | g_autoptr(MyApplication) app = my_application_new(); 5 | return g_application_run(G_APPLICATION(app), argc, argv); 6 | } 7 | -------------------------------------------------------------------------------- /linux/my_application.cc: -------------------------------------------------------------------------------- 1 | #include "my_application.h" 2 | 3 | #include 4 | #ifdef GDK_WINDOWING_X11 5 | #include 6 | #endif 7 | 8 | #include "flutter/generated_plugin_registrant.h" 9 | 10 | struct _MyApplication { 11 | GtkApplication parent_instance; 12 | char** dart_entrypoint_arguments; 13 | }; 14 | 15 | G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION) 16 | 17 | // Implements GApplication::activate. 18 | static void my_application_activate(GApplication* application) { 19 | MyApplication* self = MY_APPLICATION(application); 20 | GtkWindow* window = 21 | GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application))); 22 | 23 | // Use a header bar when running in GNOME as this is the common style used 24 | // by applications and is the setup most users will be using (e.g. Ubuntu 25 | // desktop). 26 | // If running on X and not using GNOME then just use a traditional title bar 27 | // in case the window manager does more exotic layout, e.g. tiling. 28 | // If running on Wayland assume the header bar will work (may need changing 29 | // if future cases occur). 30 | gboolean use_header_bar = TRUE; 31 | #ifdef GDK_WINDOWING_X11 32 | GdkScreen* screen = gtk_window_get_screen(window); 33 | if (GDK_IS_X11_SCREEN(screen)) { 34 | const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen); 35 | if (g_strcmp0(wm_name, "GNOME Shell") != 0) { 36 | use_header_bar = FALSE; 37 | } 38 | } 39 | #endif 40 | if (use_header_bar) { 41 | GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new()); 42 | gtk_widget_show(GTK_WIDGET(header_bar)); 43 | gtk_header_bar_set_title(header_bar, "Logical Defence"); 44 | gtk_header_bar_set_show_close_button(header_bar, TRUE); 45 | gtk_window_set_titlebar(window, GTK_WIDGET(header_bar)); 46 | } else { 47 | gtk_window_set_title(window, "Logical Defence"); 48 | } 49 | 50 | gtk_window_set_default_size(window, 1280, 720); 51 | gtk_widget_show(GTK_WIDGET(window)); 52 | 53 | g_autoptr(FlDartProject) project = fl_dart_project_new(); 54 | fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments); 55 | 56 | FlView* view = fl_view_new(project); 57 | gtk_widget_show(GTK_WIDGET(view)); 58 | gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view)); 59 | 60 | fl_register_plugins(FL_PLUGIN_REGISTRY(view)); 61 | 62 | gtk_widget_grab_focus(GTK_WIDGET(view)); 63 | } 64 | 65 | // Implements GApplication::local_command_line. 66 | static gboolean my_application_local_command_line(GApplication* application, gchar*** arguments, int* exit_status) { 67 | MyApplication* self = MY_APPLICATION(application); 68 | // Strip out the first argument as it is the binary name. 69 | self->dart_entrypoint_arguments = g_strdupv(*arguments + 1); 70 | 71 | g_autoptr(GError) error = nullptr; 72 | if (!g_application_register(application, nullptr, &error)) { 73 | g_warning("Failed to register: %s", error->message); 74 | *exit_status = 1; 75 | return TRUE; 76 | } 77 | 78 | g_application_activate(application); 79 | *exit_status = 0; 80 | 81 | return TRUE; 82 | } 83 | 84 | // Implements GObject::dispose. 85 | static void my_application_dispose(GObject* object) { 86 | MyApplication* self = MY_APPLICATION(object); 87 | g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev); 88 | G_OBJECT_CLASS(my_application_parent_class)->dispose(object); 89 | } 90 | 91 | static void my_application_class_init(MyApplicationClass* klass) { 92 | G_APPLICATION_CLASS(klass)->activate = my_application_activate; 93 | G_APPLICATION_CLASS(klass)->local_command_line = my_application_local_command_line; 94 | G_OBJECT_CLASS(klass)->dispose = my_application_dispose; 95 | } 96 | 97 | static void my_application_init(MyApplication* self) {} 98 | 99 | MyApplication* my_application_new() { 100 | return MY_APPLICATION(g_object_new(my_application_get_type(), 101 | "application-id", APPLICATION_ID, 102 | "flags", G_APPLICATION_NON_UNIQUE, 103 | nullptr)); 104 | } 105 | -------------------------------------------------------------------------------- /linux/my_application.h: -------------------------------------------------------------------------------- 1 | #ifndef FLUTTER_MY_APPLICATION_H_ 2 | #define FLUTTER_MY_APPLICATION_H_ 3 | 4 | #include 5 | 6 | G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION, 7 | GtkApplication) 8 | 9 | /** 10 | * my_application_new: 11 | * 12 | * Creates a new Flutter-based application. 13 | * 14 | * Returns: a new #MyApplication. 15 | */ 16 | MyApplication* my_application_new(); 17 | 18 | #endif // FLUTTER_MY_APPLICATION_H_ 19 | -------------------------------------------------------------------------------- /macos/.gitignore: -------------------------------------------------------------------------------- 1 | # Flutter-related 2 | **/Flutter/ephemeral/ 3 | **/Pods/ 4 | 5 | # Xcode-related 6 | **/dgph 7 | **/xcuserdata/ 8 | -------------------------------------------------------------------------------- /macos/Flutter/Flutter-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "ephemeral/Flutter-Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /macos/Flutter/Flutter-Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "ephemeral/Flutter-Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /macos/Flutter/GeneratedPluginRegistrant.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | import FlutterMacOS 6 | import Foundation 7 | 8 | import path_provider_foundation 9 | 10 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { 11 | PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) 12 | } 13 | -------------------------------------------------------------------------------- /macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 52 | 54 | 60 | 61 | 62 | 63 | 69 | 71 | 77 | 78 | 79 | 80 | 82 | 83 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /macos/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macos/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | @NSApplicationMain 5 | class AppDelegate: FlutterAppDelegate { 6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { 7 | return true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "16x16", 5 | "idiom" : "mac", 6 | "filename" : "app_icon_16.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "16x16", 11 | "idiom" : "mac", 12 | "filename" : "app_icon_32.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "32x32", 17 | "idiom" : "mac", 18 | "filename" : "app_icon_32.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "32x32", 23 | "idiom" : "mac", 24 | "filename" : "app_icon_64.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "128x128", 29 | "idiom" : "mac", 30 | "filename" : "app_icon_128.png", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "size" : "128x128", 35 | "idiom" : "mac", 36 | "filename" : "app_icon_256.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "256x256", 41 | "idiom" : "mac", 42 | "filename" : "app_icon_256.png", 43 | "scale" : "1x" 44 | }, 45 | { 46 | "size" : "256x256", 47 | "idiom" : "mac", 48 | "filename" : "app_icon_512.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "512x512", 53 | "idiom" : "mac", 54 | "filename" : "app_icon_512.png", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "size" : "512x512", 59 | "idiom" : "mac", 60 | "filename" : "app_icon_1024.png", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png -------------------------------------------------------------------------------- /macos/Runner/Configs/AppInfo.xcconfig: -------------------------------------------------------------------------------- 1 | // Application-level settings for the Runner target. 2 | // 3 | // This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the 4 | // future. If not, the values below would default to using the project name when this becomes a 5 | // 'flutter create' template. 6 | 7 | // The application's name. By default this is also the title of the Flutter window. 8 | PRODUCT_NAME = Logical Defence 9 | 10 | // The application's bundle identifier 11 | PRODUCT_BUNDLE_IDENTIFIER = za.co.lukestonehm.logicaldefence.logicalDefence 12 | 13 | // The copyright displayed in application information 14 | PRODUCT_COPYRIGHT = Copyright © 2022 za.co.lukestonehm.logicaldefence. All rights reserved. 15 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Debug.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Release.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Warnings.xcconfig: -------------------------------------------------------------------------------- 1 | WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings 2 | GCC_WARN_UNDECLARED_SELECTOR = YES 3 | CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES 4 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE 5 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES 6 | CLANG_WARN_PRAGMA_PACK = YES 7 | CLANG_WARN_STRICT_PROTOTYPES = YES 8 | CLANG_WARN_COMMA = YES 9 | GCC_WARN_STRICT_SELECTOR_MATCH = YES 10 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES 11 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES 12 | GCC_WARN_SHADOW = YES 13 | CLANG_WARN_UNREACHABLE_CODE = YES 14 | -------------------------------------------------------------------------------- /macos/Runner/DebugProfile.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.cs.allow-jit 8 | 9 | com.apple.security.network.server 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /macos/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | NSHumanReadableCopyright 26 | $(PRODUCT_COPYRIGHT) 27 | NSMainNibFile 28 | MainMenu 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /macos/Runner/MainFlutterWindow.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | class MainFlutterWindow: NSWindow { 5 | override func awakeFromNib() { 6 | let flutterViewController = FlutterViewController.init() 7 | let windowFrame = self.frame 8 | self.contentViewController = flutterViewController 9 | self.setFrame(windowFrame, display: true) 10 | 11 | RegisterGeneratedPlugins(registry: flutterViewController) 12 | 13 | super.awakeFromNib() 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /macos/Runner/Release.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /playstore_artwork/1425089390_Brain-Games.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/playstore_artwork/1425089390_Brain-Games.png -------------------------------------------------------------------------------- /playstore_artwork/app-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/playstore_artwork/app-icon.png -------------------------------------------------------------------------------- /playstore_artwork/en-GB/Hotpot 0(1).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/playstore_artwork/en-GB/Hotpot 0(1).png -------------------------------------------------------------------------------- /playstore_artwork/en-GB/Hotpot 0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/playstore_artwork/en-GB/Hotpot 0.png -------------------------------------------------------------------------------- /playstore_artwork/en-GB/Hotpot 1(1).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/playstore_artwork/en-GB/Hotpot 1(1).png -------------------------------------------------------------------------------- /playstore_artwork/en-GB/Hotpot 1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/playstore_artwork/en-GB/Hotpot 1.png -------------------------------------------------------------------------------- /playstore_artwork/en-GB/Hotpot 2(1).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/playstore_artwork/en-GB/Hotpot 2(1).png -------------------------------------------------------------------------------- /playstore_artwork/en-GB/Hotpot 2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/playstore_artwork/en-GB/Hotpot 2.png -------------------------------------------------------------------------------- /playstore_artwork/en-GB/Hotpot 3(1).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/playstore_artwork/en-GB/Hotpot 3(1).png -------------------------------------------------------------------------------- /playstore_artwork/en-GB/Hotpot 3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/playstore_artwork/en-GB/Hotpot 3.png -------------------------------------------------------------------------------- /playstore_artwork/en-GB/Hotpot 4(1).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/playstore_artwork/en-GB/Hotpot 4(1).png -------------------------------------------------------------------------------- /playstore_artwork/en-GB/Hotpot 4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/playstore_artwork/en-GB/Hotpot 4.png -------------------------------------------------------------------------------- /playstore_artwork/en-GB/en_playstore_cover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/playstore_artwork/en-GB/en_playstore_cover.png -------------------------------------------------------------------------------- /playstore_artwork/todo/de_screens/device-2015-05-23-134610.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/playstore_artwork/todo/de_screens/device-2015-05-23-134610.png -------------------------------------------------------------------------------- /playstore_artwork/todo/de_screens/device-2015-05-23-134809.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/playstore_artwork/todo/de_screens/device-2015-05-23-134809.png -------------------------------------------------------------------------------- /playstore_artwork/todo/de_screens/device-2015-05-23-134922.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/playstore_artwork/todo/de_screens/device-2015-05-23-134922.png -------------------------------------------------------------------------------- /playstore_artwork/todo/de_screens/device-2015-05-23-135241.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/playstore_artwork/todo/de_screens/device-2015-05-23-135241.png -------------------------------------------------------------------------------- /playstore_artwork/todo/en_screens/device-2015-02-27-231818.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/playstore_artwork/todo/en_screens/device-2015-02-27-231818.png -------------------------------------------------------------------------------- /playstore_artwork/todo/en_screens/device-2015-02-27-231948.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/playstore_artwork/todo/en_screens/device-2015-02-27-231948.png -------------------------------------------------------------------------------- /playstore_artwork/todo/en_screens/device-2015-02-27-233311.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/playstore_artwork/todo/en_screens/device-2015-02-27-233311.png -------------------------------------------------------------------------------- /playstore_artwork/todo/en_screens/device-2015-02-27-233322.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/playstore_artwork/todo/en_screens/device-2015-02-27-233322.png -------------------------------------------------------------------------------- /playstore_artwork/todo/es_screens/device-2015-03-10-192125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/playstore_artwork/todo/es_screens/device-2015-03-10-192125.png -------------------------------------------------------------------------------- /playstore_artwork/todo/es_screens/device-2015-03-10-192207.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/playstore_artwork/todo/es_screens/device-2015-03-10-192207.png -------------------------------------------------------------------------------- /playstore_artwork/todo/es_screens/device-2015-03-10-192257.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/playstore_artwork/todo/es_screens/device-2015-03-10-192257.png -------------------------------------------------------------------------------- /playstore_artwork/todo/es_screens/device-2015-03-10-192315.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/playstore_artwork/todo/es_screens/device-2015-03-10-192315.png -------------------------------------------------------------------------------- /playstore_artwork/todo/fr_screens/device-2015-03-08-191756.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/playstore_artwork/todo/fr_screens/device-2015-03-08-191756.png -------------------------------------------------------------------------------- /playstore_artwork/todo/fr_screens/device-2015-03-08-191917.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/playstore_artwork/todo/fr_screens/device-2015-03-08-191917.png -------------------------------------------------------------------------------- /playstore_artwork/todo/fr_screens/device-2015-03-08-191953.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/playstore_artwork/todo/fr_screens/device-2015-03-08-191953.png -------------------------------------------------------------------------------- /playstore_artwork/todo/fr_screens/device-2015-03-08-192014.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/playstore_artwork/todo/fr_screens/device-2015-03-08-192014.png -------------------------------------------------------------------------------- /playstore_artwork/todo/it_screens/device-2015-03-10-191848.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/playstore_artwork/todo/it_screens/device-2015-03-10-191848.png -------------------------------------------------------------------------------- /playstore_artwork/todo/it_screens/device-2015-03-10-191957.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/playstore_artwork/todo/it_screens/device-2015-03-10-191957.png -------------------------------------------------------------------------------- /playstore_artwork/todo/it_screens/device-2015-03-10-192012.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/playstore_artwork/todo/it_screens/device-2015-03-10-192012.png -------------------------------------------------------------------------------- /playstore_artwork/todo/it_screens/device-2015-03-10-192033.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/playstore_artwork/todo/it_screens/device-2015-03-10-192033.png -------------------------------------------------------------------------------- /privacy.md: -------------------------------------------------------------------------------- 1 | # Privacy Policy 2 | 3 | Last updated: July 30, 2022 4 | 5 | This Privacy Policy describes Our policies and procedures on the collection, use and disclosure of Your information when You use the Service and tells You about Your privacy rights and how the law protects You. 6 | 7 | We use Your Personal data to provide and improve the Service. By using the Service, You agree to the collection and use of information in accordance with this Privacy Policy. This Privacy Policy has been created with the help of the [TermsFeed Privacy Policy Generator](https://www.termsfeed.com/privacy-policy-generator/). 8 | 9 | # Interpretation and Definitions 10 | 11 | ## Interpretation 12 | 13 | The words of which the initial letter is capitalized have meanings defined under the following conditions. The following definitions shall have the same meaning regardless of whether they appear in singular or in plural. 14 | 15 | ## Definitions 16 | 17 | For the purposes of this Privacy Policy: 18 | 19 | - __Account__ means a unique account created for You to access our Service or parts of our Service. 20 | 21 | - __Affiliate__ means an entity that controls, is controlled by or is under common control with a party, where "control" means ownership of 50% or more of the shares, equity interest or other securities entitled to vote for election of directors or other managing authority. 22 | - __Application__ means the software program provided by the Company downloaded by You on any electronic device, named Logical Defence 23 | 24 | 25 | - __Company__ (referred to as either "the Company", "We", "Us" or "Our" in this Agreement) refers to Logical Defence. 26 | 27 | 28 | 29 | - __Country__ refers to: South Africa 30 | 31 | - __Device__ means any device that can access the Service such as a computer, a cellphone or a digital tablet. 32 | 33 | 34 | - __Personal Data__ is any information that relates to an identified or identifiable individual. 35 | 36 | 37 | 38 | 39 | - __Service__ refers to the Application. 40 | 41 | - __Service Provider__ means any natural or legal person who processes the data on behalf of the Company. It refers to third-party companies or individuals employed by the Company to facilitate the Service, to provide the Service on behalf of the Company, to perform services related to the Service or to assist the Company in analyzing how the Service is used. 42 | 43 | 44 | - __Usage Data__ refers to data collected automatically, either generated by the use of the Service or from the Service infrastructure itself (for example, the duration of a page visit). 45 | 46 | - __You__ means the individual accessing or using the Service, or the company, or other legal entity on behalf of which such individual is accessing or using the Service, as applicable. 47 | 48 | 49 | 50 | # Collecting and Using Your Personal Data 51 | 52 | ## Types of Data Collected 53 | 54 | ### Personal Data 55 | 56 | While using Our Service, We may ask You to provide Us with certain personally identifiable information that can be used to contact or identify You. Personally identifiable information may include, but is not limited to: 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | - Usage Data 65 | 66 | 67 | 68 | ### Usage Data 69 | 70 | Usage Data is collected automatically when using the Service. 71 | 72 | Usage Data may include information such as Your Device's Internet Protocol address (e.g. IP address), browser type, browser version, the pages of our Service that You visit, the time and date of Your visit, the time spent on those pages, unique device identifiers and other diagnostic data. 73 | 74 | When You access the Service by or through a mobile device, We may collect certain information automatically, including, but not limited to, the type of mobile device You use, Your mobile device unique ID, the IP address of Your mobile device, Your mobile operating system, the type of mobile Internet browser You use, unique device identifiers and other diagnostic data. 75 | 76 | We may also collect information that Your browser sends whenever You visit our Service or when You access the Service by or through a mobile device. 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | ## Use of Your Personal Data 87 | 88 | The Company may use Personal Data for the following purposes: 89 | 90 | - __To provide and maintain our Service__, including to monitor the usage of our Service. 91 | - __To manage Your Account:__ to manage Your registration as a user of the Service. The Personal Data You provide can give You access to different functionalities of the Service that are available to You as a registered user. 92 | - __For the performance of a contract:__ the development, compliance and undertaking of the purchase contract for the products, items or services You have purchased or of any other contract with Us through the Service. 93 | - __To contact You:__ To contact You by email, telephone calls, SMS, or other equivalent forms of electronic communication, such as a mobile application's push notifications regarding updates or informative communications related to the functionalities, products or contracted services, including the security updates, when necessary or reasonable for their implementation. 94 | - __To provide You__ with news, special offers and general information about other goods, services and events which we offer that are similar to those that you have already purchased or enquired about unless You have opted not to receive such information. 95 | - __To manage Your requests:__ To attend and manage Your requests to Us. 96 | 97 | - __For business transfers:__ We may use Your information to evaluate or conduct a merger, divestiture, restructuring, reorganization, dissolution, or other sale or transfer of some or all of Our assets, whether as a going concern or as part of bankruptcy, liquidation, or similar proceeding, in which Personal Data held by Us about our Service users is among the assets transferred. 98 | - __For other purposes__: We may use Your information for other purposes, such as data analysis, identifying usage trends, determining the effectiveness of our promotional campaigns and to evaluate and improve our Service, products, services, marketing and your experience. 99 | 100 | We may share Your personal information in the following situations: 101 | 102 | - __With Service Providers:__ We may share Your personal information with Service Providers to monitor and analyze the use of our Service, to contact You. 103 | - __For business transfers:__ We may share or transfer Your personal information in connection with, or during negotiations of, any merger, sale of Company assets, financing, or acquisition of all or a portion of Our business to another company. 104 | - __With Affiliates:__ We may share Your information with Our affiliates, in which case we will require those affiliates to honor this Privacy Policy. Affiliates include Our parent company and any other subsidiaries, joint venture partners or other companies that We control or that are under common control with Us. 105 | - __With business partners:__ We may share Your information with Our business partners to offer You certain products, services or promotions. 106 | - __With other users:__ when You share personal information or otherwise interact in the public areas with other users, such information may be viewed by all users and may be publicly distributed outside. 107 | - __With Your consent__: We may disclose Your personal information for any other purpose with Your consent. 108 | 109 | ## Retention of Your Personal Data 110 | 111 | The Company will retain Your Personal Data only for as long as is necessary for the purposes set out in this Privacy Policy. We will retain and use Your Personal Data to the extent necessary to comply with our legal obligations (for example, if we are required to retain your data to comply with applicable laws), resolve disputes, and enforce our legal agreements and policies. 112 | 113 | The Company will also retain Usage Data for internal analysis purposes. Usage Data is generally retained for a shorter period of time, except when this data is used to strengthen the security or to improve the functionality of Our Service, or We are legally obligated to retain this data for longer time periods. 114 | 115 | ## Transfer of Your Personal Data 116 | 117 | Your information, including Personal Data, is processed at the Company's operating offices and in any other places where the parties involved in the processing are located. It means that this information may be transferred to — and maintained on — computers located outside of Your state, province, country or other governmental jurisdiction where the data protection laws may differ than those from Your jurisdiction. 118 | 119 | Your consent to this Privacy Policy followed by Your submission of such information represents Your agreement to that transfer. 120 | 121 | The Company will take all steps reasonably necessary to ensure that Your data is treated securely and in accordance with this Privacy Policy and no transfer of Your Personal Data will take place to an organization or a country unless there are adequate controls in place including the security of Your data and other personal information. 122 | 123 | ## Disclosure of Your Personal Data 124 | 125 | ### Business Transactions 126 | 127 | If the Company is involved in a merger, acquisition or asset sale, Your Personal Data may be transferred. We will provide notice before Your Personal Data is transferred and becomes subject to a different Privacy Policy. 128 | 129 | ### Law enforcement 130 | 131 | Under certain circumstances, the Company may be required to disclose Your Personal Data if required to do so by law or in response to valid requests by public authorities (e.g. a court or a government agency). 132 | 133 | ### Other legal requirements 134 | 135 | The Company may disclose Your Personal Data in the good faith belief that such action is necessary to: 136 | 137 | - Comply with a legal obligation 138 | - Protect and defend the rights or property of the Company 139 | - Prevent or investigate possible wrongdoing in connection with the Service 140 | - Protect the personal safety of Users of the Service or the public 141 | - Protect against legal liability 142 | 143 | ## Security of Your Personal Data 144 | 145 | The security of Your Personal Data is important to Us, but remember that no method of transmission over the Internet, or method of electronic storage is 100% secure. While We strive to use commercially acceptable means to protect Your Personal Data, We cannot guarantee its absolute security. 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | # Children's Privacy 159 | 160 | Our Service does not address anyone under the age of 13. We do not knowingly collect personally identifiable information from anyone under the age of 13. If You are a parent or guardian and You are aware that Your child has provided Us with Personal Data, please contact Us. If We become aware that We have collected Personal Data from anyone under the age of 13 without verification of parental consent, We take steps to remove that information from Our servers. 161 | 162 | If We need to rely on consent as a legal basis for processing Your information and Your country requires consent from a parent, We may require Your parent's consent before We collect and use that information. 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | # Links to Other Websites 171 | 172 | Our Service may contain links to other websites that are not operated by Us. If You click on a third party link, You will be directed to that third party's site. We strongly advise You to review the Privacy Policy of every site You visit. 173 | 174 | We have no control over and assume no responsibility for the content, privacy policies or practices of any third party sites or services. 175 | 176 | # Changes to this Privacy Policy 177 | 178 | We may update Our Privacy Policy from time to time. We will notify You of any changes by posting the new Privacy Policy on this page. 179 | 180 | We will let You know via email and/or a prominent notice on Our Service, prior to the change becoming effective and update the "Last updated" date at the top of this Privacy Policy. 181 | 182 | You are advised to review this Privacy Policy periodically for any changes. Changes to this Privacy Policy are effective when they are posted on this page. 183 | 184 | # Contact Us 185 | 186 | If you have any questions about this Privacy Policy, You can contact us: 187 | 188 | 189 | - By email: hello@lukestonehm.co.za -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | archive: 5 | dependency: transitive 6 | description: 7 | name: archive 8 | sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d 9 | url: "https://pub.dev" 10 | source: hosted 11 | version: "3.6.1" 12 | args: 13 | dependency: transitive 14 | description: 15 | name: args 16 | sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a" 17 | url: "https://pub.dev" 18 | source: hosted 19 | version: "2.5.0" 20 | async: 21 | dependency: transitive 22 | description: 23 | name: async 24 | sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" 25 | url: "https://pub.dev" 26 | source: hosted 27 | version: "2.11.0" 28 | boolean_selector: 29 | dependency: transitive 30 | description: 31 | name: boolean_selector 32 | sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" 33 | url: "https://pub.dev" 34 | source: hosted 35 | version: "2.1.1" 36 | characters: 37 | dependency: transitive 38 | description: 39 | name: characters 40 | sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" 41 | url: "https://pub.dev" 42 | source: hosted 43 | version: "1.3.0" 44 | clock: 45 | dependency: transitive 46 | description: 47 | name: clock 48 | sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf 49 | url: "https://pub.dev" 50 | source: hosted 51 | version: "1.1.1" 52 | collection: 53 | dependency: transitive 54 | description: 55 | name: collection 56 | sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a 57 | url: "https://pub.dev" 58 | source: hosted 59 | version: "1.18.0" 60 | crypto: 61 | dependency: transitive 62 | description: 63 | name: crypto 64 | sha256: ec30d999af904f33454ba22ed9a86162b35e52b44ac4807d1d93c288041d7d27 65 | url: "https://pub.dev" 66 | source: hosted 67 | version: "3.0.5" 68 | cupertino_icons: 69 | dependency: "direct main" 70 | description: 71 | name: cupertino_icons 72 | sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 73 | url: "https://pub.dev" 74 | source: hosted 75 | version: "1.0.8" 76 | fake_async: 77 | dependency: transitive 78 | description: 79 | name: fake_async 80 | sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" 81 | url: "https://pub.dev" 82 | source: hosted 83 | version: "1.3.1" 84 | ffi: 85 | dependency: transitive 86 | description: 87 | name: ffi 88 | sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" 89 | url: "https://pub.dev" 90 | source: hosted 91 | version: "2.1.3" 92 | flutter: 93 | dependency: "direct main" 94 | description: flutter 95 | source: sdk 96 | version: "0.0.0" 97 | flutter_launcher_icons_maker: 98 | dependency: "direct dev" 99 | description: 100 | name: flutter_launcher_icons_maker 101 | sha256: fb1224fc47624229f0393709a2345513d391555c7064cf67b7f1889bd9324dee 102 | url: "https://pub.dev" 103 | source: hosted 104 | version: "0.10.2" 105 | flutter_lints: 106 | dependency: "direct dev" 107 | description: 108 | name: flutter_lints 109 | sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c" 110 | url: "https://pub.dev" 111 | source: hosted 112 | version: "4.0.0" 113 | flutter_share: 114 | dependency: "direct main" 115 | description: 116 | name: flutter_share 117 | sha256: ae12c1cea13b35926a109824ffac601531e40cb94ad53eeae58625eceb3eaaaa 118 | url: "https://pub.dev" 119 | source: hosted 120 | version: "2.0.0" 121 | flutter_test: 122 | dependency: "direct dev" 123 | description: flutter 124 | source: sdk 125 | version: "0.0.0" 126 | get: 127 | dependency: "direct main" 128 | description: 129 | name: get 130 | sha256: e4e7335ede17452b391ed3b2ede016545706c01a02292a6c97619705e7d2a85e 131 | url: "https://pub.dev" 132 | source: hosted 133 | version: "4.6.6" 134 | get_storage: 135 | dependency: "direct main" 136 | description: 137 | name: get_storage 138 | sha256: "39db1fffe779d0c22b3a744376e86febe4ade43bf65e06eab5af707dc84185a2" 139 | url: "https://pub.dev" 140 | source: hosted 141 | version: "2.1.1" 142 | image: 143 | dependency: transitive 144 | description: 145 | name: image 146 | sha256: "8e9d133755c3e84c73288363e6343157c383a0c6c56fc51afcc5d4d7180306d6" 147 | url: "https://pub.dev" 148 | source: hosted 149 | version: "3.3.0" 150 | leak_tracker: 151 | dependency: transitive 152 | description: 153 | name: leak_tracker 154 | sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" 155 | url: "https://pub.dev" 156 | source: hosted 157 | version: "10.0.5" 158 | leak_tracker_flutter_testing: 159 | dependency: transitive 160 | description: 161 | name: leak_tracker_flutter_testing 162 | sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" 163 | url: "https://pub.dev" 164 | source: hosted 165 | version: "3.0.5" 166 | leak_tracker_testing: 167 | dependency: transitive 168 | description: 169 | name: leak_tracker_testing 170 | sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" 171 | url: "https://pub.dev" 172 | source: hosted 173 | version: "3.0.1" 174 | lints: 175 | dependency: transitive 176 | description: 177 | name: lints 178 | sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235" 179 | url: "https://pub.dev" 180 | source: hosted 181 | version: "4.0.0" 182 | matcher: 183 | dependency: transitive 184 | description: 185 | name: matcher 186 | sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb 187 | url: "https://pub.dev" 188 | source: hosted 189 | version: "0.12.16+1" 190 | material_color_utilities: 191 | dependency: transitive 192 | description: 193 | name: material_color_utilities 194 | sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec 195 | url: "https://pub.dev" 196 | source: hosted 197 | version: "0.11.1" 198 | meta: 199 | dependency: transitive 200 | description: 201 | name: meta 202 | sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 203 | url: "https://pub.dev" 204 | source: hosted 205 | version: "1.15.0" 206 | path: 207 | dependency: transitive 208 | description: 209 | name: path 210 | sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" 211 | url: "https://pub.dev" 212 | source: hosted 213 | version: "1.9.0" 214 | path_provider: 215 | dependency: transitive 216 | description: 217 | name: path_provider 218 | sha256: fec0d61223fba3154d87759e3cc27fe2c8dc498f6386c6d6fc80d1afdd1bf378 219 | url: "https://pub.dev" 220 | source: hosted 221 | version: "2.1.4" 222 | path_provider_android: 223 | dependency: transitive 224 | description: 225 | name: path_provider_android 226 | sha256: "6f01f8e37ec30b07bc424b4deabac37cacb1bc7e2e515ad74486039918a37eb7" 227 | url: "https://pub.dev" 228 | source: hosted 229 | version: "2.2.10" 230 | path_provider_foundation: 231 | dependency: transitive 232 | description: 233 | name: path_provider_foundation 234 | sha256: f234384a3fdd67f989b4d54a5d73ca2a6c422fa55ae694381ae0f4375cd1ea16 235 | url: "https://pub.dev" 236 | source: hosted 237 | version: "2.4.0" 238 | path_provider_linux: 239 | dependency: transitive 240 | description: 241 | name: path_provider_linux 242 | sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 243 | url: "https://pub.dev" 244 | source: hosted 245 | version: "2.2.1" 246 | path_provider_platform_interface: 247 | dependency: transitive 248 | description: 249 | name: path_provider_platform_interface 250 | sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" 251 | url: "https://pub.dev" 252 | source: hosted 253 | version: "2.1.2" 254 | path_provider_windows: 255 | dependency: transitive 256 | description: 257 | name: path_provider_windows 258 | sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7 259 | url: "https://pub.dev" 260 | source: hosted 261 | version: "2.3.0" 262 | petitparser: 263 | dependency: transitive 264 | description: 265 | name: petitparser 266 | sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27 267 | url: "https://pub.dev" 268 | source: hosted 269 | version: "6.0.2" 270 | platform: 271 | dependency: transitive 272 | description: 273 | name: platform 274 | sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65" 275 | url: "https://pub.dev" 276 | source: hosted 277 | version: "3.1.5" 278 | plugin_platform_interface: 279 | dependency: transitive 280 | description: 281 | name: plugin_platform_interface 282 | sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" 283 | url: "https://pub.dev" 284 | source: hosted 285 | version: "2.1.8" 286 | sky_engine: 287 | dependency: transitive 288 | description: flutter 289 | source: sdk 290 | version: "0.0.99" 291 | source_span: 292 | dependency: transitive 293 | description: 294 | name: source_span 295 | sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" 296 | url: "https://pub.dev" 297 | source: hosted 298 | version: "1.10.0" 299 | stack_trace: 300 | dependency: transitive 301 | description: 302 | name: stack_trace 303 | sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" 304 | url: "https://pub.dev" 305 | source: hosted 306 | version: "1.11.1" 307 | stream_channel: 308 | dependency: transitive 309 | description: 310 | name: stream_channel 311 | sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 312 | url: "https://pub.dev" 313 | source: hosted 314 | version: "2.1.2" 315 | string_scanner: 316 | dependency: transitive 317 | description: 318 | name: string_scanner 319 | sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" 320 | url: "https://pub.dev" 321 | source: hosted 322 | version: "1.2.0" 323 | term_glyph: 324 | dependency: transitive 325 | description: 326 | name: term_glyph 327 | sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 328 | url: "https://pub.dev" 329 | source: hosted 330 | version: "1.2.1" 331 | test_api: 332 | dependency: transitive 333 | description: 334 | name: test_api 335 | sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" 336 | url: "https://pub.dev" 337 | source: hosted 338 | version: "0.7.2" 339 | typed_data: 340 | dependency: transitive 341 | description: 342 | name: typed_data 343 | sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c 344 | url: "https://pub.dev" 345 | source: hosted 346 | version: "1.3.2" 347 | vector_math: 348 | dependency: transitive 349 | description: 350 | name: vector_math 351 | sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" 352 | url: "https://pub.dev" 353 | source: hosted 354 | version: "2.1.4" 355 | vm_service: 356 | dependency: transitive 357 | description: 358 | name: vm_service 359 | sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" 360 | url: "https://pub.dev" 361 | source: hosted 362 | version: "14.2.5" 363 | xdg_directories: 364 | dependency: transitive 365 | description: 366 | name: xdg_directories 367 | sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d 368 | url: "https://pub.dev" 369 | source: hosted 370 | version: "1.0.4" 371 | xml: 372 | dependency: transitive 373 | description: 374 | name: xml 375 | sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226 376 | url: "https://pub.dev" 377 | source: hosted 378 | version: "6.5.0" 379 | yaml: 380 | dependency: transitive 381 | description: 382 | name: yaml 383 | sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" 384 | url: "https://pub.dev" 385 | source: hosted 386 | version: "3.1.2" 387 | sdks: 388 | dart: ">=3.4.0 <4.0.0" 389 | flutter: ">=3.22.0" 390 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: logical_defence 2 | description: An open source app that displays a list of the logical fallacies that haunt every rationalists world 3 | 4 | # The following line prevents the package from being accidentally published to 5 | # pub.dev using `flutter pub publish`. This is preferred for private packages. 6 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev 7 | 8 | # The following defines the version and build number for your application. 9 | # A version number is three numbers separated by dots, like 1.2.43 10 | # followed by an optional build number separated by a +. 11 | # Both the version and the builder number may be overridden in flutter 12 | # build by specifying --build-name and --build-number, respectively. 13 | # In Android, build-name is used as versionName while build-number used as versionCode. 14 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 15 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 16 | # Read more about iOS versioning at 17 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 18 | version: 2.0.1+25 19 | 20 | environment: 21 | sdk: ">=2.17.5 <3.0.0" 22 | 23 | # Dependencies specify other packages that your package needs in order to work. 24 | # To automatically upgrade your package dependencies to the latest versions 25 | # consider running `flutter pub upgrade --major-versions`. Alternatively, 26 | # dependencies can be manually updated by changing the version numbers below to 27 | # the latest version available on pub.dev. To see which dependencies have newer 28 | # versions available, run `flutter pub outdated`. 29 | dependencies: 30 | flutter: 31 | sdk: flutter 32 | 33 | 34 | # The following adds the Cupertino Icons font to your application. 35 | # Use with the CupertinoIcons class for iOS style icons. 36 | cupertino_icons: ^1.0.8 37 | get: ^4.6.6 38 | get_storage: ^2.1.1 39 | flutter_share: ^2.0.0 40 | 41 | dev_dependencies: 42 | flutter_test: 43 | sdk: flutter 44 | 45 | # The "flutter_lints" package below contains a set of recommended lints to 46 | # encourage good coding practices. The lint set provided by the package is 47 | # activated in the `analysis_options.yaml` file located at the root of your 48 | # package. See that file for information about deactivating specific lint 49 | # rules and activating additional ones. 50 | flutter_lints: ^4.0.0 51 | # flutter_launcher_name: ^0.0.1 52 | flutter_launcher_icons_maker: ^0.10.2 53 | 54 | flutter_launcher_name: 55 | name: "Logical Defence" 56 | 57 | flutter_icons: 58 | android: "launcher_icon" 59 | ios: true 60 | windows: true 61 | web: true 62 | macos: true 63 | linux: true 64 | image_path: "assets/app-icon.png" 65 | # For information on the generic Dart part of this file, see the 66 | # following page: https://dart.dev/tools/pub/pubspec 67 | 68 | # The following section is specific to Flutter packages. 69 | flutter: 70 | 71 | # The following line ensures that the Material Icons font is 72 | # included with your application, so that you can use the icons in 73 | # the material Icons class. 74 | uses-material-design: true 75 | 76 | # To add assets to your application, add an assets section, like this: 77 | # assets: 78 | # - images/a_dot_burr.jpeg 79 | # - images/a_dot_ham.jpeg 80 | 81 | # An image asset can refer to one or more resolution-specific "variants", see 82 | # https://flutter.dev/assets-and-images/#resolution-aware 83 | 84 | # For details regarding adding assets from package dependencies, see 85 | # https://flutter.dev/assets-and-images/#from-packages 86 | 87 | # To add custom fonts to your application, add a fonts section here, 88 | # in this "flutter" section. Each entry in this list should have a 89 | # "family" key with the font family name, and a "fonts" key with a 90 | # list giving the asset and other descriptors for the font. For 91 | # example: 92 | # fonts: 93 | # - family: Schyler 94 | # fonts: 95 | # - asset: fonts/Schyler-Regular.ttf 96 | # - asset: fonts/Schyler-Italic.ttf 97 | # style: italic 98 | # - family: Trajan Pro 99 | # fonts: 100 | # - asset: fonts/TrajanPro.ttf 101 | # - asset: fonts/TrajanPro_Bold.ttf 102 | # weight: 700 103 | # 104 | # For details regarding fonts from package dependencies, 105 | # see https://flutter.dev/custom-fonts/#from-packages 106 | -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility in the flutter_test package. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | import 'package:get/get.dart'; 11 | 12 | import 'package:logical_defence/main.dart'; 13 | 14 | void main() { 15 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 16 | // Build our app and trigger a frame. 17 | await tester.pumpWidget(MyApp(locale: Get.deviceLocale, theme: ThemeMode.system,)); 18 | 19 | // Verify that our counter starts at 0. 20 | expect(find.text('0'), findsOneWidget); 21 | expect(find.text('1'), findsNothing); 22 | 23 | // Tap the '+' icon and trigger a frame. 24 | await tester.tap(find.byIcon(Icons.add)); 25 | await tester.pump(); 26 | 27 | // Verify that our counter has incremented. 28 | expect(find.text('0'), findsNothing); 29 | expect(find.text('1'), findsOneWidget); 30 | }); 31 | } 32 | -------------------------------------------------------------------------------- /web.Dockerfile: -------------------------------------------------------------------------------- 1 | # super simple dockerfile that wraps the build output of `futter build web --release` 2 | 3 | FROM nginx:1.23-alpine 4 | 5 | COPY build/web /usr/share/nginx/html -------------------------------------------------------------------------------- /web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/web/favicon.png -------------------------------------------------------------------------------- /web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/web/icons/Icon-192.png -------------------------------------------------------------------------------- /web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/web/icons/Icon-512.png -------------------------------------------------------------------------------- /web/icons/Icon-maskable-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/web/icons/Icon-maskable-192.png -------------------------------------------------------------------------------- /web/icons/Icon-maskable-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/web/icons/Icon-maskable-512.png -------------------------------------------------------------------------------- /web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | Logical Defence 33 | 34 | 35 | 39 | 40 | 41 | 42 | 43 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Logical Defence", 3 | "short_name": "Logical Defence", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "An open source app that displays a list of the logical fallacies that haunt every rationalists world", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | }, 22 | { 23 | "src": "icons/Icon-maskable-192.png", 24 | "sizes": "192x192", 25 | "type": "image/png", 26 | "purpose": "maskable" 27 | }, 28 | { 29 | "src": "icons/Icon-maskable-512.png", 30 | "sizes": "512x512", 31 | "type": "image/png", 32 | "purpose": "maskable" 33 | } 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /windows/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral/ 2 | 3 | # Visual Studio user-specific files. 4 | *.suo 5 | *.user 6 | *.userosscache 7 | *.sln.docstates 8 | 9 | # Visual Studio build-related files. 10 | x64/ 11 | x86/ 12 | 13 | # Visual Studio cache files 14 | # files ending in .cache can be ignored 15 | *.[Cc]ache 16 | # but keep track of directories ending in .cache 17 | !*.[Cc]ache/ 18 | -------------------------------------------------------------------------------- /windows/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Project-level configuration. 2 | cmake_minimum_required(VERSION 3.14) 3 | project(logical_defence LANGUAGES CXX) 4 | 5 | # The name of the executable created for the application. Change this to change 6 | # the on-disk name of your application. 7 | set(BINARY_NAME "Logical Defence") 8 | 9 | # Explicitly opt in to modern CMake behaviors to avoid warnings with recent 10 | # versions of CMake. 11 | cmake_policy(SET CMP0063 NEW) 12 | 13 | # Define build configuration option. 14 | get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) 15 | if(IS_MULTICONFIG) 16 | set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release" 17 | CACHE STRING "" FORCE) 18 | else() 19 | if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) 20 | set(CMAKE_BUILD_TYPE "Debug" CACHE 21 | STRING "Flutter build mode" FORCE) 22 | set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS 23 | "Debug" "Profile" "Release") 24 | endif() 25 | endif() 26 | # Define settings for the Profile build mode. 27 | set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}") 28 | set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}") 29 | set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}") 30 | set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}") 31 | 32 | # Use Unicode for all projects. 33 | add_definitions(-DUNICODE -D_UNICODE) 34 | 35 | # Compilation settings that should be applied to most targets. 36 | # 37 | # Be cautious about adding new options here, as plugins use this function by 38 | # default. In most cases, you should add new options to specific targets instead 39 | # of modifying this function. 40 | function(APPLY_STANDARD_SETTINGS TARGET) 41 | target_compile_features(${TARGET} PUBLIC cxx_std_17) 42 | target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100") 43 | target_compile_options(${TARGET} PRIVATE /EHsc) 44 | target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0") 45 | target_compile_definitions(${TARGET} PRIVATE "$<$:_DEBUG>") 46 | endfunction() 47 | 48 | # Flutter library and tool build rules. 49 | set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") 50 | add_subdirectory(${FLUTTER_MANAGED_DIR}) 51 | 52 | # Application build; see runner/CMakeLists.txt. 53 | add_subdirectory("runner") 54 | 55 | # Generated plugin build rules, which manage building the plugins and adding 56 | # them to the application. 57 | include(flutter/generated_plugins.cmake) 58 | 59 | 60 | # === Installation === 61 | # Support files are copied into place next to the executable, so that it can 62 | # run in place. This is done instead of making a separate bundle (as on Linux) 63 | # so that building and running from within Visual Studio will work. 64 | set(BUILD_BUNDLE_DIR "$") 65 | # Make the "install" step default, as it's required to run. 66 | set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1) 67 | if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) 68 | set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) 69 | endif() 70 | 71 | set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") 72 | set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}") 73 | 74 | install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" 75 | COMPONENT Runtime) 76 | 77 | install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" 78 | COMPONENT Runtime) 79 | 80 | install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 81 | COMPONENT Runtime) 82 | 83 | if(PLUGIN_BUNDLED_LIBRARIES) 84 | install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" 85 | DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 86 | COMPONENT Runtime) 87 | endif() 88 | 89 | # Fully re-copy the assets directory on each build to avoid having stale files 90 | # from a previous install. 91 | set(FLUTTER_ASSET_DIR_NAME "flutter_assets") 92 | install(CODE " 93 | file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") 94 | " COMPONENT Runtime) 95 | install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" 96 | DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) 97 | 98 | # Install the AOT library on non-Debug builds only. 99 | install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" 100 | CONFIGURATIONS Profile;Release 101 | COMPONENT Runtime) 102 | -------------------------------------------------------------------------------- /windows/flutter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file controls Flutter-level build steps. It should not be edited. 2 | cmake_minimum_required(VERSION 3.14) 3 | 4 | set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") 5 | 6 | # Configuration provided via flutter tool. 7 | include(${EPHEMERAL_DIR}/generated_config.cmake) 8 | 9 | # TODO: Move the rest of this into files in ephemeral. See 10 | # https://github.com/flutter/flutter/issues/57146. 11 | set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper") 12 | 13 | # === Flutter Library === 14 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll") 15 | 16 | # Published to parent scope for install step. 17 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) 18 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) 19 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) 20 | set(AOT_LIBRARY "${PROJECT_DIR}/build/windows/app.so" PARENT_SCOPE) 21 | 22 | list(APPEND FLUTTER_LIBRARY_HEADERS 23 | "flutter_export.h" 24 | "flutter_windows.h" 25 | "flutter_messenger.h" 26 | "flutter_plugin_registrar.h" 27 | "flutter_texture_registrar.h" 28 | ) 29 | list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/") 30 | add_library(flutter INTERFACE) 31 | target_include_directories(flutter INTERFACE 32 | "${EPHEMERAL_DIR}" 33 | ) 34 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib") 35 | add_dependencies(flutter flutter_assemble) 36 | 37 | # === Wrapper === 38 | list(APPEND CPP_WRAPPER_SOURCES_CORE 39 | "core_implementations.cc" 40 | "standard_codec.cc" 41 | ) 42 | list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/") 43 | list(APPEND CPP_WRAPPER_SOURCES_PLUGIN 44 | "plugin_registrar.cc" 45 | ) 46 | list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/") 47 | list(APPEND CPP_WRAPPER_SOURCES_APP 48 | "flutter_engine.cc" 49 | "flutter_view_controller.cc" 50 | ) 51 | list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/") 52 | 53 | # Wrapper sources needed for a plugin. 54 | add_library(flutter_wrapper_plugin STATIC 55 | ${CPP_WRAPPER_SOURCES_CORE} 56 | ${CPP_WRAPPER_SOURCES_PLUGIN} 57 | ) 58 | apply_standard_settings(flutter_wrapper_plugin) 59 | set_target_properties(flutter_wrapper_plugin PROPERTIES 60 | POSITION_INDEPENDENT_CODE ON) 61 | set_target_properties(flutter_wrapper_plugin PROPERTIES 62 | CXX_VISIBILITY_PRESET hidden) 63 | target_link_libraries(flutter_wrapper_plugin PUBLIC flutter) 64 | target_include_directories(flutter_wrapper_plugin PUBLIC 65 | "${WRAPPER_ROOT}/include" 66 | ) 67 | add_dependencies(flutter_wrapper_plugin flutter_assemble) 68 | 69 | # Wrapper sources needed for the runner. 70 | add_library(flutter_wrapper_app STATIC 71 | ${CPP_WRAPPER_SOURCES_CORE} 72 | ${CPP_WRAPPER_SOURCES_APP} 73 | ) 74 | apply_standard_settings(flutter_wrapper_app) 75 | target_link_libraries(flutter_wrapper_app PUBLIC flutter) 76 | target_include_directories(flutter_wrapper_app PUBLIC 77 | "${WRAPPER_ROOT}/include" 78 | ) 79 | add_dependencies(flutter_wrapper_app flutter_assemble) 80 | 81 | # === Flutter tool backend === 82 | # _phony_ is a non-existent file to force this command to run every time, 83 | # since currently there's no way to get a full input/output list from the 84 | # flutter tool. 85 | set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_") 86 | set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE) 87 | add_custom_command( 88 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} 89 | ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN} 90 | ${CPP_WRAPPER_SOURCES_APP} 91 | ${PHONY_OUTPUT} 92 | COMMAND ${CMAKE_COMMAND} -E env 93 | ${FLUTTER_TOOL_ENVIRONMENT} 94 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" 95 | windows-x64 $ 96 | VERBATIM 97 | ) 98 | add_custom_target(flutter_assemble DEPENDS 99 | "${FLUTTER_LIBRARY}" 100 | ${FLUTTER_LIBRARY_HEADERS} 101 | ${CPP_WRAPPER_SOURCES_CORE} 102 | ${CPP_WRAPPER_SOURCES_PLUGIN} 103 | ${CPP_WRAPPER_SOURCES_APP} 104 | ) 105 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #include "generated_plugin_registrant.h" 8 | 9 | 10 | void RegisterPlugins(flutter::PluginRegistry* registry) { 11 | } 12 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void RegisterPlugins(flutter::PluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | ) 7 | 8 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 9 | ) 10 | 11 | set(PLUGIN_BUNDLED_LIBRARIES) 12 | 13 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 14 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) 15 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 16 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 18 | endforeach(plugin) 19 | 20 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 21 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) 22 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 23 | endforeach(ffi_plugin) 24 | -------------------------------------------------------------------------------- /windows/runner/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.14) 2 | project(runner LANGUAGES CXX) 3 | 4 | # Define the application target. To change its name, change BINARY_NAME in the 5 | # top-level CMakeLists.txt, not the value here, or `flutter run` will no longer 6 | # work. 7 | # 8 | # Any new source files that you add to the application should be added here. 9 | add_executable(${BINARY_NAME} WIN32 10 | "flutter_window.cpp" 11 | "main.cpp" 12 | "utils.cpp" 13 | "win32_window.cpp" 14 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" 15 | "Runner.rc" 16 | "runner.exe.manifest" 17 | ) 18 | 19 | # Apply the standard set of build settings. This can be removed for applications 20 | # that need different build settings. 21 | apply_standard_settings(${BINARY_NAME}) 22 | 23 | # Disable Windows macros that collide with C++ standard library functions. 24 | target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") 25 | 26 | # Add dependency libraries and include directories. Add any application-specific 27 | # dependencies here. 28 | target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) 29 | target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") 30 | 31 | # Run the Flutter tool portions of the build. This must not be removed. 32 | add_dependencies(${BINARY_NAME} flutter_assemble) 33 | -------------------------------------------------------------------------------- /windows/runner/Runner.rc: -------------------------------------------------------------------------------- 1 | // Microsoft Visual C++ generated resource script. 2 | // 3 | #pragma code_page(65001) 4 | #include "resource.h" 5 | 6 | #define APSTUDIO_READONLY_SYMBOLS 7 | ///////////////////////////////////////////////////////////////////////////// 8 | // 9 | // Generated from the TEXTINCLUDE 2 resource. 10 | // 11 | #include "winres.h" 12 | 13 | ///////////////////////////////////////////////////////////////////////////// 14 | #undef APSTUDIO_READONLY_SYMBOLS 15 | 16 | ///////////////////////////////////////////////////////////////////////////// 17 | // English (United States) resources 18 | 19 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) 20 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 21 | 22 | #ifdef APSTUDIO_INVOKED 23 | ///////////////////////////////////////////////////////////////////////////// 24 | // 25 | // TEXTINCLUDE 26 | // 27 | 28 | 1 TEXTINCLUDE 29 | BEGIN 30 | "resource.h\0" 31 | END 32 | 33 | 2 TEXTINCLUDE 34 | BEGIN 35 | "#include ""winres.h""\r\n" 36 | "\0" 37 | END 38 | 39 | 3 TEXTINCLUDE 40 | BEGIN 41 | "\r\n" 42 | "\0" 43 | END 44 | 45 | #endif // APSTUDIO_INVOKED 46 | 47 | 48 | ///////////////////////////////////////////////////////////////////////////// 49 | // 50 | // Icon 51 | // 52 | 53 | // Icon with lowest ID value placed first to ensure application icon 54 | // remains consistent on all systems. 55 | IDI_APP_ICON ICON "resources\\app_icon.ico" 56 | 57 | 58 | ///////////////////////////////////////////////////////////////////////////// 59 | // 60 | // Version 61 | // 62 | 63 | #ifdef FLUTTER_BUILD_NUMBER 64 | #define VERSION_AS_NUMBER FLUTTER_BUILD_NUMBER 65 | #else 66 | #define VERSION_AS_NUMBER 1,0,0 67 | #endif 68 | 69 | #ifdef FLUTTER_BUILD_NAME 70 | #define VERSION_AS_STRING #FLUTTER_BUILD_NAME 71 | #else 72 | #define VERSION_AS_STRING "1.0.0" 73 | #endif 74 | 75 | VS_VERSION_INFO VERSIONINFO 76 | FILEVERSION VERSION_AS_NUMBER 77 | PRODUCTVERSION VERSION_AS_NUMBER 78 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 79 | #ifdef _DEBUG 80 | FILEFLAGS VS_FF_DEBUG 81 | #else 82 | FILEFLAGS 0x0L 83 | #endif 84 | FILEOS VOS__WINDOWS32 85 | FILETYPE VFT_APP 86 | FILESUBTYPE 0x0L 87 | BEGIN 88 | BLOCK "StringFileInfo" 89 | BEGIN 90 | BLOCK "040904e4" 91 | BEGIN 92 | VALUE "CompanyName", "za.co.lukestonehm.logicaldefence" "\0" 93 | VALUE "FileDescription", "Logical Defence" "\0" 94 | VALUE "FileVersion", VERSION_AS_STRING "\0" 95 | VALUE "InternalName", "Logical Defence" "\0" 96 | VALUE "LegalCopyright", "Copyright (C) 2022 za.co.lukestonehm.logicaldefence. All rights reserved." "\0" 97 | VALUE "OriginalFilename", "logical_defence.exe" "\0" 98 | VALUE "ProductName", "Logical Defence" "\0" 99 | VALUE "ProductVersion", VERSION_AS_STRING "\0" 100 | END 101 | END 102 | BLOCK "VarFileInfo" 103 | BEGIN 104 | VALUE "Translation", 0x409, 1252 105 | END 106 | END 107 | 108 | #endif // English (United States) resources 109 | ///////////////////////////////////////////////////////////////////////////// 110 | 111 | 112 | 113 | #ifndef APSTUDIO_INVOKED 114 | ///////////////////////////////////////////////////////////////////////////// 115 | // 116 | // Generated from the TEXTINCLUDE 3 resource. 117 | // 118 | 119 | 120 | ///////////////////////////////////////////////////////////////////////////// 121 | #endif // not APSTUDIO_INVOKED 122 | -------------------------------------------------------------------------------- /windows/runner/flutter_window.cpp: -------------------------------------------------------------------------------- 1 | #include "flutter_window.h" 2 | 3 | #include 4 | 5 | #include "flutter/generated_plugin_registrant.h" 6 | 7 | FlutterWindow::FlutterWindow(const flutter::DartProject& project) 8 | : project_(project) {} 9 | 10 | FlutterWindow::~FlutterWindow() {} 11 | 12 | bool FlutterWindow::OnCreate() { 13 | if (!Win32Window::OnCreate()) { 14 | return false; 15 | } 16 | 17 | RECT frame = GetClientArea(); 18 | 19 | // The size here must match the window dimensions to avoid unnecessary surface 20 | // creation / destruction in the startup path. 21 | flutter_controller_ = std::make_unique( 22 | frame.right - frame.left, frame.bottom - frame.top, project_); 23 | // Ensure that basic setup of the controller was successful. 24 | if (!flutter_controller_->engine() || !flutter_controller_->view()) { 25 | return false; 26 | } 27 | RegisterPlugins(flutter_controller_->engine()); 28 | SetChildContent(flutter_controller_->view()->GetNativeWindow()); 29 | return true; 30 | } 31 | 32 | void FlutterWindow::OnDestroy() { 33 | if (flutter_controller_) { 34 | flutter_controller_ = nullptr; 35 | } 36 | 37 | Win32Window::OnDestroy(); 38 | } 39 | 40 | LRESULT 41 | FlutterWindow::MessageHandler(HWND hwnd, UINT const message, 42 | WPARAM const wparam, 43 | LPARAM const lparam) noexcept { 44 | // Give Flutter, including plugins, an opportunity to handle window messages. 45 | if (flutter_controller_) { 46 | std::optional result = 47 | flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam, 48 | lparam); 49 | if (result) { 50 | return *result; 51 | } 52 | } 53 | 54 | switch (message) { 55 | case WM_FONTCHANGE: 56 | flutter_controller_->engine()->ReloadSystemFonts(); 57 | break; 58 | } 59 | 60 | return Win32Window::MessageHandler(hwnd, message, wparam, lparam); 61 | } 62 | -------------------------------------------------------------------------------- /windows/runner/flutter_window.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_FLUTTER_WINDOW_H_ 2 | #define RUNNER_FLUTTER_WINDOW_H_ 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | #include "win32_window.h" 10 | 11 | // A window that does nothing but host a Flutter view. 12 | class FlutterWindow : public Win32Window { 13 | public: 14 | // Creates a new FlutterWindow hosting a Flutter view running |project|. 15 | explicit FlutterWindow(const flutter::DartProject& project); 16 | virtual ~FlutterWindow(); 17 | 18 | protected: 19 | // Win32Window: 20 | bool OnCreate() override; 21 | void OnDestroy() override; 22 | LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, 23 | LPARAM const lparam) noexcept override; 24 | 25 | private: 26 | // The project to run. 27 | flutter::DartProject project_; 28 | 29 | // The Flutter instance hosted by this window. 30 | std::unique_ptr flutter_controller_; 31 | }; 32 | 33 | #endif // RUNNER_FLUTTER_WINDOW_H_ 34 | -------------------------------------------------------------------------------- /windows/runner/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "flutter_window.h" 6 | #include "utils.h" 7 | 8 | int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, 9 | _In_ wchar_t *command_line, _In_ int show_command) { 10 | // Attach to console when present (e.g., 'flutter run') or create a 11 | // new console when running with a debugger. 12 | if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { 13 | CreateAndAttachConsole(); 14 | } 15 | 16 | // Initialize COM, so that it is available for use in the library and/or 17 | // plugins. 18 | ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); 19 | 20 | flutter::DartProject project(L"data"); 21 | 22 | std::vector command_line_arguments = 23 | GetCommandLineArguments(); 24 | 25 | project.set_dart_entrypoint_arguments(std::move(command_line_arguments)); 26 | 27 | FlutterWindow window(project); 28 | Win32Window::Point origin(10, 10); 29 | Win32Window::Size size(1280, 720); 30 | if (!window.CreateAndShow(L"Logical Defence", origin, size)) { 31 | return EXIT_FAILURE; 32 | } 33 | window.SetQuitOnClose(true); 34 | 35 | ::MSG msg; 36 | while (::GetMessage(&msg, nullptr, 0, 0)) { 37 | ::TranslateMessage(&msg); 38 | ::DispatchMessage(&msg); 39 | } 40 | 41 | ::CoUninitialize(); 42 | return EXIT_SUCCESS; 43 | } 44 | -------------------------------------------------------------------------------- /windows/runner/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Runner.rc 4 | // 5 | #define IDI_APP_ICON 101 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 40001 13 | #define _APS_NEXT_CONTROL_VALUE 1001 14 | #define _APS_NEXT_SYMED_VALUE 101 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /windows/runner/resources/app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/windows/runner/resources/app_icon.ico -------------------------------------------------------------------------------- /windows/runner/resources/app_icon_1024.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/windows/runner/resources/app_icon_1024.ico -------------------------------------------------------------------------------- /windows/runner/resources/app_icon_128.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/windows/runner/resources/app_icon_128.ico -------------------------------------------------------------------------------- /windows/runner/resources/app_icon_256.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/windows/runner/resources/app_icon_256.ico -------------------------------------------------------------------------------- /windows/runner/resources/app_icon_32.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/windows/runner/resources/app_icon_32.ico -------------------------------------------------------------------------------- /windows/runner/resources/app_icon_512.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/windows/runner/resources/app_icon_512.ico -------------------------------------------------------------------------------- /windows/runner/resources/app_icon_64.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LukeStonehm/LogicalDefence/ad17b14c97c34bccbe3b3cc12f84cc009b21a468/windows/runner/resources/app_icon_64.ico -------------------------------------------------------------------------------- /windows/runner/runner.exe.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PerMonitorV2 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /windows/runner/utils.cpp: -------------------------------------------------------------------------------- 1 | #include "utils.h" 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #include 9 | 10 | void CreateAndAttachConsole() { 11 | if (::AllocConsole()) { 12 | FILE *unused; 13 | if (freopen_s(&unused, "CONOUT$", "w", stdout)) { 14 | _dup2(_fileno(stdout), 1); 15 | } 16 | if (freopen_s(&unused, "CONOUT$", "w", stderr)) { 17 | _dup2(_fileno(stdout), 2); 18 | } 19 | std::ios::sync_with_stdio(); 20 | FlutterDesktopResyncOutputStreams(); 21 | } 22 | } 23 | 24 | std::vector GetCommandLineArguments() { 25 | // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use. 26 | int argc; 27 | wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc); 28 | if (argv == nullptr) { 29 | return std::vector(); 30 | } 31 | 32 | std::vector command_line_arguments; 33 | 34 | // Skip the first argument as it's the binary name. 35 | for (int i = 1; i < argc; i++) { 36 | command_line_arguments.push_back(Utf8FromUtf16(argv[i])); 37 | } 38 | 39 | ::LocalFree(argv); 40 | 41 | return command_line_arguments; 42 | } 43 | 44 | std::string Utf8FromUtf16(const wchar_t* utf16_string) { 45 | if (utf16_string == nullptr) { 46 | return std::string(); 47 | } 48 | int target_length = ::WideCharToMultiByte( 49 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, 50 | -1, nullptr, 0, nullptr, nullptr); 51 | std::string utf8_string; 52 | if (target_length == 0 || target_length > utf8_string.max_size()) { 53 | return utf8_string; 54 | } 55 | utf8_string.resize(target_length); 56 | int converted_length = ::WideCharToMultiByte( 57 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, 58 | -1, utf8_string.data(), 59 | target_length, nullptr, nullptr); 60 | if (converted_length == 0) { 61 | return std::string(); 62 | } 63 | return utf8_string; 64 | } 65 | -------------------------------------------------------------------------------- /windows/runner/utils.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_UTILS_H_ 2 | #define RUNNER_UTILS_H_ 3 | 4 | #include 5 | #include 6 | 7 | // Creates a console for the process, and redirects stdout and stderr to 8 | // it for both the runner and the Flutter library. 9 | void CreateAndAttachConsole(); 10 | 11 | // Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string 12 | // encoded in UTF-8. Returns an empty std::string on failure. 13 | std::string Utf8FromUtf16(const wchar_t* utf16_string); 14 | 15 | // Gets the command line arguments passed in as a std::vector, 16 | // encoded in UTF-8. Returns an empty std::vector on failure. 17 | std::vector GetCommandLineArguments(); 18 | 19 | #endif // RUNNER_UTILS_H_ 20 | -------------------------------------------------------------------------------- /windows/runner/win32_window.cpp: -------------------------------------------------------------------------------- 1 | #include "win32_window.h" 2 | 3 | #include 4 | 5 | #include "resource.h" 6 | 7 | namespace { 8 | 9 | constexpr const wchar_t kWindowClassName[] = L"FLUTTER_RUNNER_WIN32_WINDOW"; 10 | 11 | // The number of Win32Window objects that currently exist. 12 | static int g_active_window_count = 0; 13 | 14 | using EnableNonClientDpiScaling = BOOL __stdcall(HWND hwnd); 15 | 16 | // Scale helper to convert logical scaler values to physical using passed in 17 | // scale factor 18 | int Scale(int source, double scale_factor) { 19 | return static_cast(source * scale_factor); 20 | } 21 | 22 | // Dynamically loads the |EnableNonClientDpiScaling| from the User32 module. 23 | // This API is only needed for PerMonitor V1 awareness mode. 24 | void EnableFullDpiSupportIfAvailable(HWND hwnd) { 25 | HMODULE user32_module = LoadLibraryA("User32.dll"); 26 | if (!user32_module) { 27 | return; 28 | } 29 | auto enable_non_client_dpi_scaling = 30 | reinterpret_cast( 31 | GetProcAddress(user32_module, "EnableNonClientDpiScaling")); 32 | if (enable_non_client_dpi_scaling != nullptr) { 33 | enable_non_client_dpi_scaling(hwnd); 34 | FreeLibrary(user32_module); 35 | } 36 | } 37 | 38 | } // namespace 39 | 40 | // Manages the Win32Window's window class registration. 41 | class WindowClassRegistrar { 42 | public: 43 | ~WindowClassRegistrar() = default; 44 | 45 | // Returns the singleton registar instance. 46 | static WindowClassRegistrar* GetInstance() { 47 | if (!instance_) { 48 | instance_ = new WindowClassRegistrar(); 49 | } 50 | return instance_; 51 | } 52 | 53 | // Returns the name of the window class, registering the class if it hasn't 54 | // previously been registered. 55 | const wchar_t* GetWindowClass(); 56 | 57 | // Unregisters the window class. Should only be called if there are no 58 | // instances of the window. 59 | void UnregisterWindowClass(); 60 | 61 | private: 62 | WindowClassRegistrar() = default; 63 | 64 | static WindowClassRegistrar* instance_; 65 | 66 | bool class_registered_ = false; 67 | }; 68 | 69 | WindowClassRegistrar* WindowClassRegistrar::instance_ = nullptr; 70 | 71 | const wchar_t* WindowClassRegistrar::GetWindowClass() { 72 | if (!class_registered_) { 73 | WNDCLASS window_class{}; 74 | window_class.hCursor = LoadCursor(nullptr, IDC_ARROW); 75 | window_class.lpszClassName = kWindowClassName; 76 | window_class.style = CS_HREDRAW | CS_VREDRAW; 77 | window_class.cbClsExtra = 0; 78 | window_class.cbWndExtra = 0; 79 | window_class.hInstance = GetModuleHandle(nullptr); 80 | window_class.hIcon = 81 | LoadIcon(window_class.hInstance, MAKEINTRESOURCE(IDI_APP_ICON)); 82 | window_class.hbrBackground = 0; 83 | window_class.lpszMenuName = nullptr; 84 | window_class.lpfnWndProc = Win32Window::WndProc; 85 | RegisterClass(&window_class); 86 | class_registered_ = true; 87 | } 88 | return kWindowClassName; 89 | } 90 | 91 | void WindowClassRegistrar::UnregisterWindowClass() { 92 | UnregisterClass(kWindowClassName, nullptr); 93 | class_registered_ = false; 94 | } 95 | 96 | Win32Window::Win32Window() { 97 | ++g_active_window_count; 98 | } 99 | 100 | Win32Window::~Win32Window() { 101 | --g_active_window_count; 102 | Destroy(); 103 | } 104 | 105 | bool Win32Window::CreateAndShow(const std::wstring& title, 106 | const Point& origin, 107 | const Size& size) { 108 | Destroy(); 109 | 110 | const wchar_t* window_class = 111 | WindowClassRegistrar::GetInstance()->GetWindowClass(); 112 | 113 | const POINT target_point = {static_cast(origin.x), 114 | static_cast(origin.y)}; 115 | HMONITOR monitor = MonitorFromPoint(target_point, MONITOR_DEFAULTTONEAREST); 116 | UINT dpi = FlutterDesktopGetDpiForMonitor(monitor); 117 | double scale_factor = dpi / 96.0; 118 | 119 | HWND window = CreateWindow( 120 | window_class, title.c_str(), WS_OVERLAPPEDWINDOW | WS_VISIBLE, 121 | Scale(origin.x, scale_factor), Scale(origin.y, scale_factor), 122 | Scale(size.width, scale_factor), Scale(size.height, scale_factor), 123 | nullptr, nullptr, GetModuleHandle(nullptr), this); 124 | 125 | if (!window) { 126 | return false; 127 | } 128 | 129 | return OnCreate(); 130 | } 131 | 132 | // static 133 | LRESULT CALLBACK Win32Window::WndProc(HWND const window, 134 | UINT const message, 135 | WPARAM const wparam, 136 | LPARAM const lparam) noexcept { 137 | if (message == WM_NCCREATE) { 138 | auto window_struct = reinterpret_cast(lparam); 139 | SetWindowLongPtr(window, GWLP_USERDATA, 140 | reinterpret_cast(window_struct->lpCreateParams)); 141 | 142 | auto that = static_cast(window_struct->lpCreateParams); 143 | EnableFullDpiSupportIfAvailable(window); 144 | that->window_handle_ = window; 145 | } else if (Win32Window* that = GetThisFromHandle(window)) { 146 | return that->MessageHandler(window, message, wparam, lparam); 147 | } 148 | 149 | return DefWindowProc(window, message, wparam, lparam); 150 | } 151 | 152 | LRESULT 153 | Win32Window::MessageHandler(HWND hwnd, 154 | UINT const message, 155 | WPARAM const wparam, 156 | LPARAM const lparam) noexcept { 157 | switch (message) { 158 | case WM_DESTROY: 159 | window_handle_ = nullptr; 160 | Destroy(); 161 | if (quit_on_close_) { 162 | PostQuitMessage(0); 163 | } 164 | return 0; 165 | 166 | case WM_DPICHANGED: { 167 | auto newRectSize = reinterpret_cast(lparam); 168 | LONG newWidth = newRectSize->right - newRectSize->left; 169 | LONG newHeight = newRectSize->bottom - newRectSize->top; 170 | 171 | SetWindowPos(hwnd, nullptr, newRectSize->left, newRectSize->top, newWidth, 172 | newHeight, SWP_NOZORDER | SWP_NOACTIVATE); 173 | 174 | return 0; 175 | } 176 | case WM_SIZE: { 177 | RECT rect = GetClientArea(); 178 | if (child_content_ != nullptr) { 179 | // Size and position the child window. 180 | MoveWindow(child_content_, rect.left, rect.top, rect.right - rect.left, 181 | rect.bottom - rect.top, TRUE); 182 | } 183 | return 0; 184 | } 185 | 186 | case WM_ACTIVATE: 187 | if (child_content_ != nullptr) { 188 | SetFocus(child_content_); 189 | } 190 | return 0; 191 | } 192 | 193 | return DefWindowProc(window_handle_, message, wparam, lparam); 194 | } 195 | 196 | void Win32Window::Destroy() { 197 | OnDestroy(); 198 | 199 | if (window_handle_) { 200 | DestroyWindow(window_handle_); 201 | window_handle_ = nullptr; 202 | } 203 | if (g_active_window_count == 0) { 204 | WindowClassRegistrar::GetInstance()->UnregisterWindowClass(); 205 | } 206 | } 207 | 208 | Win32Window* Win32Window::GetThisFromHandle(HWND const window) noexcept { 209 | return reinterpret_cast( 210 | GetWindowLongPtr(window, GWLP_USERDATA)); 211 | } 212 | 213 | void Win32Window::SetChildContent(HWND content) { 214 | child_content_ = content; 215 | SetParent(content, window_handle_); 216 | RECT frame = GetClientArea(); 217 | 218 | MoveWindow(content, frame.left, frame.top, frame.right - frame.left, 219 | frame.bottom - frame.top, true); 220 | 221 | SetFocus(child_content_); 222 | } 223 | 224 | RECT Win32Window::GetClientArea() { 225 | RECT frame; 226 | GetClientRect(window_handle_, &frame); 227 | return frame; 228 | } 229 | 230 | HWND Win32Window::GetHandle() { 231 | return window_handle_; 232 | } 233 | 234 | void Win32Window::SetQuitOnClose(bool quit_on_close) { 235 | quit_on_close_ = quit_on_close; 236 | } 237 | 238 | bool Win32Window::OnCreate() { 239 | // No-op; provided for subclasses. 240 | return true; 241 | } 242 | 243 | void Win32Window::OnDestroy() { 244 | // No-op; provided for subclasses. 245 | } 246 | -------------------------------------------------------------------------------- /windows/runner/win32_window.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_WIN32_WINDOW_H_ 2 | #define RUNNER_WIN32_WINDOW_H_ 3 | 4 | #include 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | // A class abstraction for a high DPI-aware Win32 Window. Intended to be 11 | // inherited from by classes that wish to specialize with custom 12 | // rendering and input handling 13 | class Win32Window { 14 | public: 15 | struct Point { 16 | unsigned int x; 17 | unsigned int y; 18 | Point(unsigned int x, unsigned int y) : x(x), y(y) {} 19 | }; 20 | 21 | struct Size { 22 | unsigned int width; 23 | unsigned int height; 24 | Size(unsigned int width, unsigned int height) 25 | : width(width), height(height) {} 26 | }; 27 | 28 | Win32Window(); 29 | virtual ~Win32Window(); 30 | 31 | // Creates and shows a win32 window with |title| and position and size using 32 | // |origin| and |size|. New windows are created on the default monitor. Window 33 | // sizes are specified to the OS in physical pixels, hence to ensure a 34 | // consistent size to will treat the width height passed in to this function 35 | // as logical pixels and scale to appropriate for the default monitor. Returns 36 | // true if the window was created successfully. 37 | bool CreateAndShow(const std::wstring& title, 38 | const Point& origin, 39 | const Size& size); 40 | 41 | // Release OS resources associated with window. 42 | void Destroy(); 43 | 44 | // Inserts |content| into the window tree. 45 | void SetChildContent(HWND content); 46 | 47 | // Returns the backing Window handle to enable clients to set icon and other 48 | // window properties. Returns nullptr if the window has been destroyed. 49 | HWND GetHandle(); 50 | 51 | // If true, closing this window will quit the application. 52 | void SetQuitOnClose(bool quit_on_close); 53 | 54 | // Return a RECT representing the bounds of the current client area. 55 | RECT GetClientArea(); 56 | 57 | protected: 58 | // Processes and route salient window messages for mouse handling, 59 | // size change and DPI. Delegates handling of these to member overloads that 60 | // inheriting classes can handle. 61 | virtual LRESULT MessageHandler(HWND window, 62 | UINT const message, 63 | WPARAM const wparam, 64 | LPARAM const lparam) noexcept; 65 | 66 | // Called when CreateAndShow is called, allowing subclass window-related 67 | // setup. Subclasses should return false if setup fails. 68 | virtual bool OnCreate(); 69 | 70 | // Called when Destroy is called. 71 | virtual void OnDestroy(); 72 | 73 | private: 74 | friend class WindowClassRegistrar; 75 | 76 | // OS callback called by message pump. Handles the WM_NCCREATE message which 77 | // is passed when the non-client area is being created and enables automatic 78 | // non-client DPI scaling so that the non-client area automatically 79 | // responsponds to changes in DPI. All other messages are handled by 80 | // MessageHandler. 81 | static LRESULT CALLBACK WndProc(HWND const window, 82 | UINT const message, 83 | WPARAM const wparam, 84 | LPARAM const lparam) noexcept; 85 | 86 | // Retrieves a class instance pointer for |window| 87 | static Win32Window* GetThisFromHandle(HWND const window) noexcept; 88 | 89 | bool quit_on_close_ = false; 90 | 91 | // window handle for top level window. 92 | HWND window_handle_ = nullptr; 93 | 94 | // window handle for hosted content. 95 | HWND child_content_ = nullptr; 96 | }; 97 | 98 | #endif // RUNNER_WIN32_WINDOW_H_ 99 | --------------------------------------------------------------------------------