diff --git a/android/gradle.properties b/android/gradle.properties index 4625914e502cf9d77465026f300e77409eee0d42..665a788976fb2089dd4081239421cf8ed502b6fa 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,5 +1,5 @@ org.gradle.jvmargs=-Xmx1536M android.useAndroidX=true android.enableJetifier=true -app.versionName=1.2.32 -app.versionCode=38 +app.versionName=1.2.33 +app.versionCode=39 diff --git a/fastlane/metadata/android/en-US/changelogs/39.txt b/fastlane/metadata/android/en-US/changelogs/39.txt new file mode 100644 index 0000000000000000000000000000000000000000..fe572b15642ea3470537529ff135c5a229f663de --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/39.txt @@ -0,0 +1 @@ +Improve/enlarge categories list. diff --git a/fastlane/metadata/android/fr-FR/changelogs/39.txt b/fastlane/metadata/android/fr-FR/changelogs/39.txt new file mode 100644 index 0000000000000000000000000000000000000000..77841654c8dbbb549313fb181b65f9f1ebac6190 --- /dev/null +++ b/fastlane/metadata/android/fr-FR/changelogs/39.txt @@ -0,0 +1 @@ +Améliorations/compléments sur liste de catégories. diff --git a/lib/data/fetch_data_helper.dart b/lib/data/fetch_data_helper.dart index f986c4cd7c401003730115609425492226db7a65..dc7964825955f90b546bf6ab813af29309f327fe 100644 --- a/lib/data/fetch_data_helper.dart +++ b/lib/data/fetch_data_helper.dart @@ -17,17 +17,22 @@ class FetchDataHelper { void init() { try { - final List<dynamic> rawCategories = GameData.data['categories'] as List<dynamic>; - for (var rawElement in rawCategories) { - final categoryCode = rawElement['code'].toString(); - final categoryText = rawElement['text-fr'].toString(); - final categoryEmoji = rawElement['emoji'].toString(); + final Map<String, dynamic> rawCategories = + GameData.data['categories'] as Map<String, dynamic>; + rawCategories.forEach((categoryCode, categoryRawData) { + final categoryText = categoryRawData['text'].toString(); + final rawEmojis = categoryRawData['emojis'] as List<dynamic>; + + final categoryEmojis = []; + for (var emoji in rawEmojis) { + categoryEmojis.add(emoji); + } _categories.add(Category( key: categoryCode, text: categoryText, - emoji: categoryEmoji, + emoji: categoryEmojis.first, )); - } + }); } catch (e) { printlog("$e"); } diff --git a/lib/data/game_data.dart b/lib/data/game_data.dart index 09c894760ec14b276350aca2ab25525fe23d31cf..814c2b75e3f84f4e53b1849c707e017236eb656d 100644 --- a/lib/data/game_data.dart +++ b/lib/data/game_data.dart @@ -1,306 +1,582 @@ class GameData { static const Map<String, dynamic> data = { - "categories": [ - { - "code": "Pays", - "text-fr": "Pays", - "emoji": "🗺️", - }, - { - "code": "Prénom fille", - "text-fr": "Prénom fille", - "emoji": "👧🏼", - }, - { - "code": "Prénom garçon", - "text-fr": "Prénom garçon", - "emoji": "👦🏼", - }, - { - "code": "Animal", - "text-fr": "Animal", - "emoji": "🐒", - }, - { - "code": "Métier", - "text-fr": "Métier", - "emoji": "👷", - }, - { - "code": "Villes", - "text-fr": "Villes", - "emoji": "🏙️", - }, - { - "code": "Dessin animé", - "text-fr": "Dessin animé", - "emoji": "", - }, - { - "code": "Film", - "text-fr": "Film", - "emoji": "🎥", - }, - { - "code": "Auteur de littérature", - "text-fr": "Auteur de littérature", - "emoji": "🧑🏫", - }, - { - "code": "Acteur ou actrice", - "text-fr": "Acteur ou actrice", - "emoji": "🎭", - }, - { - "code": "Chanteur ou chanteuse", - "text-fr": "Chanteur ou chanteuse", - "emoji": "🎤", - }, - { - "code": "Chose ou objet", - "text-fr": "Chose ou objet", - "emoji": "📦", - }, - { - "code": "Fruit ou légume", - "text-fr": "Fruit ou légume", - "emoji": "🍅", - }, - { - "code": "Couleur", - "text-fr": "Couleur", - "emoji": "🎨", - }, - { - "code": "Marque", - "text-fr": "Marque", - "emoji": "™️", - }, - { - "code": "Moyen de transport", - "text-fr": "Moyen de transport", - "emoji": "🚂", - }, - { - "code": "Outil", - "text-fr": "Outil", - "emoji": "🛠️", - }, - { - "code": "Capitale", - "text-fr": "Capitale", - "emoji": "", - }, - { - "code": "Instrument de musique", - "text-fr": "Instrument de musique", - "emoji": "🎸", - }, - { - "code": "Boisson", - "text-fr": "Boisson", - "emoji": "🥤", - }, - { - "code": "Fleur", - "text-fr": "Fleur", - "emoji": "💐", - }, - { - "code": "Plat", - "text-fr": "Plat", - "emoji": "🍲", - }, - { - "code": "Personnage historique", - "text-fr": "Personnage historique", - "emoji": "🤴", - }, - { - "code": "Vêtement", - "text-fr": "Vêtement", - "emoji": "👖", - }, - { - "code": "Minéral ou pierre précieuse", - "text-fr": "Minéral ou pierre précieuse", - "emoji": "💎", - }, - { - "code": "Étoile, planète ou constellation", - "text-fr": "Étoile, planète ou constellation", - "emoji": "🪐", - }, - { - "code": "Fleuve, cours d'eau ou océan", - "text-fr": "Fleuve, cours d'eau ou océan", - "emoji": "🌊", - }, - { - "code": "Partie du corps humain", - "text-fr": "Partie du corps humain", - "emoji": "🖐️", - }, - { - "code": "Oiseau", - "text-fr": "Oiseau", - "emoji": "🐦", - }, - { - "code": "Poisson", - "text-fr": "Poisson", - "emoji": "🐟", - }, - { - "code": "Qualité ou défaut", - "text-fr": "Qualité ou défaut", - "emoji": "🙃", - }, - { - "code": "Arbre", - "text-fr": "Arbre", - "emoji": "🌳", - }, - { - "code": "Bande dessinée", - "text-fr": "Bande dessinée", - "emoji": "🗯️", - }, - { - "code": "Département français", - "text-fr": "Département français", - "emoji": "", - }, - { - "code": "Insecte", - "text-fr": "Insecte", - "emoji": "🐞", - }, - { - "code": "Dessert", - "text-fr": "Dessert", - "emoji": "🍰", - }, - { - "code": "Mammifère", - "text-fr": "Mammifère", - "emoji": "🐇", - }, - { - "code": "Épice", - "text-fr": "Épice", - "emoji": "🌶️", - }, - { - "code": "Héros de mythologie", - "text-fr": "Héros de mythologie", - "emoji": "🧙", - }, - { - "code": "Héros fictif", - "text-fr": "Héros fictif", - "emoji": "🦸", - }, - { - "code": "Fromage", - "text-fr": "Fromage", - "emoji": "🧀", - }, - { - "code": "Jeu", - "text-fr": "Jeu", - "emoji": "🎲", - }, - { - "code": "Élément de véhicules", - "text-fr": "Élément de véhicules", - "emoji": "🚗", - }, - { - "code": "Site internet", - "text-fr": "Site internet", - "emoji": "💻", - }, - { - "code": "Mot de plus de 8 lettres", - "text-fr": "Mot de plus de 8 lettres", - "emoji": "8️⃣", - }, - { - "code": "Cadeau de Noël", - "text-fr": "Cadeau de Noël", - "emoji": "🎁", - }, - { - "code": "Mot en anglais", - "text-fr": "Mot en anglais", - "emoji": "🇬🇧", - }, - { - "code": "Mot en espagnol", - "text-fr": "Mot en espagnol", - "emoji": "🇪🇸", - }, - { - "code": "Métier dont rêvent les enfants", - "text-fr": "Métier dont rêvent les enfants", - "emoji": "🧑⚕️", - }, - { - "code": "Chose qui se trouve dans une voiture", - "text-fr": "Chose qui se trouve dans une voiture", - "emoji": "🚙", - }, - { - "code": "Chose qui se trouve dans un camping", - "text-fr": "Chose qui se trouve dans un camping", - "emoji": "🏕️", - }, - { - "code": "Chose qui se trouve dans un cartable", - "text-fr": "Chose qui se trouve dans un cartable", - "emoji": "🎒", - }, - { - "code": "Chose qui se trouve dans une maison", - "text-fr": "Chose qui se trouve dans une maison", - "emoji": "🏠", - }, - { - "code": "Chose qui se trouve dans une forêt", - "text-fr": "Chose qui se trouve dans une forêt", - "emoji": "🌲", - }, - { - "code": "Chose qui se trouve dans la mer", - "text-fr": "Chose qui se trouve dans la mer", - "emoji": "🌊", - }, - { - "code": "Ville française", - "text-fr": "Ville française", - "emoji": "", - }, - { - "code": "Qui sent mauvais", - "text-fr": "Qui sent mauvais", - "emoji": "💩", - }, - { - "code": "Qui fait plaisir", - "text-fr": "Qui fait plaisir", - "emoji": "🥰", - }, - { - "code": "Mauvais pour la santé", - "text-fr": "Mauvais pour la santé", - "emoji": "☠️", - }, - { - "code": "Mauvais pour l'environement", - "text-fr": "Mauvais pour l'environement", - "emoji": "🏭", - }, - ] + "categories": { + "0b22bcbee14d4a271e06aba366f13685": { + "theme": "BASE", + "text": "Chose ou objet", + "tags": ["*"], + "emojis": ["📦"] + }, + "411b6e48f3f62f6d0a2f621945811c5a": { + "theme": "BASE", + "text": "Couleur", + "tags": ["*"], + "emojis": ["🎨"] + }, + "8dbc4f0142ace2221e0cee2e7e136773": { + "theme": "BASE", + "text": "Élément de véhicules", + "tags": ["*"], + "emojis": ["🚗"] + }, + "7c6267a89252e2a86c7b556d6ee9eed4": { + "theme": "BASE", + "text": "Fleur", + "tags": ["*"], + "emojis": ["💐"] + }, + "e5512d1ae2a2f7cf6cfe2c920045b64f": { + "theme": "BASE", + "text": "Moyen de transport", + "tags": ["*"], + "emojis": ["🚂"] + }, + "3daa9627db8176b1960aecc4c308f77f": { + "theme": "BASE", + "text": "Objet du quotidien", + "tags": ["*"], + "emojis": ["🥣"] + }, + "57402276e16b33ddd9608d2ecd2c2a78": { + "theme": "BASE", + "text": "Outil (de bricolage)", + "tags": ["*"], + "emojis": ["🛠️"] + }, + "1e6a85c6fab111dca1d0d92927bd5688": { + "theme": "BASE", + "text": "Qualité ou défaut", + "tags": ["*"], + "emojis": ["🙃"] + }, + "0094e189fc88b62c25efe16d82ccc649": { + "theme": "BASE", + "text": "Site internet", + "tags": ["*"], + "emojis": ["💻"] + }, + "c1c2df686456aca0b8b731ff0ff0e55d": { + "theme": "BASE", + "text": "Marque", + "tags": ["*"], + "emojis": ["™️"] + }, + "e7211f646b121c642d61b359f356215d": { + "theme": "BASE", + "text": "Vêtement", + "tags": ["*"], + "emojis": ["👖"] + }, + "1a6dab4b49fc4d0aadd636beff6147fb": { + "theme": "CARACTERISTIQUE", + "text": "Mauvais pour la santé", + "tags": ["*"], + "emojis": ["🤢"] + }, + "bba10106ffd5b8871fda534dab1ce370": { + "theme": "CARACTERISTIQUE", + "text": "Mauvais pour l'environement", + "tags": ["*"], + "emojis": ["🏭"] + }, + "2343e346c1daf53911b5f9bac55b0995": { + "theme": "CARACTERISTIQUE", + "text": "Quelque chose de pointu", + "tags": ["*"], + "emojis": ["📌"] + }, + "3a8da538fb29c9eeaa875cbefec3d6e1": { + "theme": "CARACTERISTIQUE", + "text": "Quelque chose de rond", + "tags": ["*"], + "emojis": ["⚽"] + }, + "682172213e6a2c36c21987ba0de89a76": { + "theme": "CARACTERISTIQUE", + "text": "Quelque chose de vieux", + "tags": ["*"], + "emojis": ["🏚️"] + }, + "87da4a342bf6b4b04c650c169d042160": { + "theme": "CARACTERISTIQUE", + "text": "Quelque chose qui coule", + "tags": ["*"], + "emojis": ["🪨"] + }, + "710d0bcfd792c882bac0d2b1df96adba": { + "theme": "CARACTERISTIQUE", + "text": "Quelque chose qui flotte", + "tags": ["*"], + "emojis": ["🪵"] + }, + "6f0347c47216eee873abaf2eee9b1bdf": { + "theme": "CARACTERISTIQUE", + "text": "Quelque chose qui vole", + "tags": ["*"], + "emojis": ["🪁"] + }, + "15b126df81118cb49d53ae890c9422cd": { + "theme": "CARACTERISTIQUE", + "text": "Qui fait peur", + "tags": ["*"], + "emojis": ["🙀"] + }, + "353244d5a0edc864bca0248f61bbf61f": { + "theme": "CARACTERISTIQUE", + "text": "Qui fait plaisir", + "tags": ["*"], + "emojis": ["🥰"] + }, + "d01573193aeae6bba92c404523b31314": { + "theme": "CARACTERISTIQUE", + "text": "Qui gratte", + "tags": ["*"], + "emojis": ["🪥"] + }, + "7ab3bcc870023bf84d9e31f649422b39": { + "theme": "CARACTERISTIQUE", + "text": "Qui n'est pas bon", + "tags": ["*"], + "emojis": ["🤮"] + }, + "6986abaceaa67997c71d608aeda22883": { + "theme": "CARACTERISTIQUE", + "text": "Qui sent mauvais", + "tags": ["*"], + "emojis": ["💩"] + }, + "073cfc7cbb1dc67d4558c57efda05668": { + "theme": "COULEUR", + "text": "Quelque chose de blanc", + "tags": ["*"], + "emojis": ["⬜"] + }, + "153523a555044ac1c8cc0cdda9c9e830": { + "theme": "COULEUR", + "text": "Quelque chose de bleu", + "tags": ["*"], + "emojis": ["🟦"] + }, + "9565bc0ff9bd2ac4353b56aa4e14dbcc": { + "theme": "COULEUR", + "text": "Quelque chose de jaune", + "tags": ["*"], + "emojis": ["🟨"] + }, + "bef258780165a9f30cbd635ac9e67c04": { + "theme": "COULEUR", + "text": "Quelque chose de rouge", + "tags": ["*"], + "emojis": ["🟥"] + }, + "e1841faafea47999bb8c8f63129e5a4c": { + "theme": "COULEUR", + "text": "Quelque chose de vert", + "tags": ["*"], + "emojis": ["🟩"] + }, + "2637a1ba20569131f55ef2f02e34745b": { + "theme": "CULTURE", + "text": "Acteur ou actrice", + "tags": ["*"], + "emojis": ["🎭"] + }, + "8fc2c3e7966f76969425ad6034beced8": { + "theme": "CULTURE", + "text": "Auteur de littérature", + "tags": ["*"], + "emojis": ["🧑🏫"] + }, + "e1c830f04fe8bcad898cb26ca542eb9a": { + "theme": "CULTURE", + "text": "Chanteur ou chanteuse", + "tags": ["*"], + "emojis": ["🎤"] + }, + "0e6964fc00d1e928120d08a760758057": { + "theme": "CULTURE", + "text": "Élément chimique", + "tags": ["*"], + "emojis": ["🧪"] + }, + "9bb6871acbd18f1bfc4c3aba3ed47033": { + "theme": "CULTURE", + "text": "Femme ou homme politique", + "tags": ["*"], + "emojis": ["🧑💼"] + }, + "e6e93a1cb7143124cb2da203bdb7fbf0": { + "theme": "CULTURE", + "text": "Film", + "tags": ["*"], + "emojis": ["🎥"] + }, + "a9b705bc593514fad9a5eab5427d1223": { + "theme": "CULTURE", + "text": "Héros de mythologie", + "tags": ["*"], + "emojis": ["🧞♂️"] + }, + "49c4b018aacf61075f58ed8d398d2ad9": { + "theme": "CULTURE", + "text": "Héros fictif", + "tags": ["*"], + "emojis": ["🦸"] + }, + "b84e4c7bc9cc9c5ec0ce691eb4b3d92b": { + "theme": "CULTURE", + "text": "Instrument de musique", + "tags": ["*"], + "emojis": ["🎸"] + }, + "030a2cda35509bf1a20da88dfd39d3e6": { + "theme": "CULTURE", + "text": "Jeu (de société)", + "tags": ["*"], + "emojis": ["🎲"] + }, + "8522ab027797ee51bb240723b9db9c8a": { + "theme": "CULTURE", + "text": "Métal", + "tags": ["*"], + "emojis": ["🖇️"] + }, + "33714cab576b9f84232c97bca6f7512a": { + "theme": "CULTURE", + "text": "Personnage de bande dessinée", + "tags": ["*"], + "emojis": ["🗯️"] + }, + "2151287317faaee4c18e80417f5a39cf": { + "theme": "CULTURE", + "text": "Personnage de dessin animé", + "tags": ["*"], + "emojis": ["🧜♀️"] + }, + "69146d0c1cfd909833a15f835c9c3916": { + "theme": "CULTURE", + "text": "Sport", + "tags": ["*"], + "emojis": ["🏅"] + }, + "7751f036804d33b28ea74a25b481f14e": { + "theme": "CULTURE", + "text": "Titre de livre", + "tags": ["*"], + "emojis": ["📘"] + }, + "33d08cd2613be7886b47296eda96c096": { + "theme": "DICTIONNAIRE", + "text": "Mot de plus de 8 lettres", + "tags": ["*"], + "emojis": ["8️⃣"] + }, + "f7cbd58d06982f902ecf8e5d559d1aee": { + "theme": "DICTIONNAIRE", + "text": "Mot de 4 lettres", + "tags": ["*"], + "emojis": ["🩻"] + }, + "0421d3a88fe6af3c95fe83aae7b0eb75": { + "theme": "GEOGRAPHIE", + "text": "Capitale", + "tags": ["*"], + "emojis": ["🗽"] + }, + "fb0573523fb9896af3cdf07dc8ffec36": { + "theme": "GEOGRAPHIE", + "text": "Département français", + "tags": ["*"], + "emojis": ["🇫🇷"] + }, + "4353f024f71dbc7ab329258e28b7cbdb": { + "theme": "GEOGRAPHIE", + "text": "Pays", + "tags": ["*"], + "emojis": ["🗺️"] + }, + "ae72d1e8f030223951aa72e563238674": { + "theme": "GEOGRAPHIE", + "text": "Ville", + "tags": ["*"], + "emojis": ["🏙️"] + }, + "839f7d50ac155a668e89bf2397c94e14": { + "theme": "GEOGRAPHIE", + "text": "Ville française", + "tags": ["*"], + "emojis": ["🇫🇷"] + }, + "38582ab90e57f7ebfa274c404c9d229f": { + "theme": "HUMAIN", + "text": "Métier", + "tags": ["*"], + "emojis": ["👷"] + }, + "774dab0b1b389961e552f1d023221b54": { + "theme": "HUMAIN", + "text": "Métier dont rêvent les enfants", + "tags": ["*"], + "emojis": ["🧑⚕️"] + }, + "0011593bec14f0385250adb8e130ba6c": { + "theme": "HUMAIN", + "text": "Partie du corps humain", + "tags": ["*"], + "emojis": ["🖐️"] + }, + "cda8dfc4f4bea88d980cac9b25e8a303": { + "theme": "HUMAIN", + "text": "Personnage historique", + "tags": ["*"], + "emojis": ["🤴"] + }, + "f464eeecbba4108a370232240ede38c5": { + "theme": "HUMAIN", + "text": "Prénom fille", + "tags": ["*"], + "emojis": ["👧🏼"] + }, + "0652b2299465b642452ee0a87191aaa1": { + "theme": "HUMAIN", + "text": "Prénom garçon", + "tags": ["*"], + "emojis": ["👦🏼"] + }, + "5a8a3e525551da2fde595be796932c07": { + "theme": "INSOLITE", + "text": "Bruit ou son", + "tags": ["*"], + "emojis": ["🔔"] + }, + "7856436970584c92a60523bdcd7a1371": { + "theme": "INSOLITE", + "text": "Cadeau de Noël ou d'anniversaire", + "tags": ["*"], + "emojis": ["🎁"] + }, + "47e6a5854bb1cbe7a8acf7cc52052cb1": { + "theme": "INSOLITE", + "text": "Cadeau nul", + "tags": ["*"], + "emojis": ["🎁"] + }, + "e82dbaa90f7c27df45bd0cfa47aea19a": { + "theme": "INSOLITE", + "text": "Injure originale", + "tags": ["*"], + "emojis": ["🖕"] + }, + "c22afed1477a8b43c1685b1c105aa62e": { + "theme": "INSOLITE", + "text": "Lieu incontournable", + "tags": ["*"], + "emojis": ["📍"] + }, + "3b014cd0032268414d042474232f4ae0": { + "theme": "INSOLITE", + "text": "Mot qui se termine en -ard", + "tags": ["*"], + "emojis": ["🗣️"] + }, + "d198a358a51b4e5682ff6997e875e9a0": { + "theme": "INSOLITE", + "text": "Mot qui se termine en -asse", + "tags": ["*"], + "emojis": ["🗣️"] + }, + "e19b809fe6a3de12bfe4a0ecf79855aa": { + "theme": "INSOLITE", + "text": "Mots qui riment avec ouille", + "tags": ["*"], + "emojis": ["🗣️"] + }, + "fe33ed5273b5348cfa449e49ef8d2383": { + "theme": "INSOLITE", + "text": "Objet insolite", + "tags": ["*"], + "emojis": ["🃏"] + }, + "2d8f23360134fb1498386fd27618d978": { + "theme": "INSOLITE", + "text": "On peut y planquer un corps", + "tags": ["*"], + "emojis": ["🪦"] + }, + "e6d6340bc92a2469998dcc7ddc1449d4": { + "theme": "INSOLITE", + "text": "Un gros mot", + "tags": ["*"], + "emojis": ["🤬"] + }, + "36e7748ac773bbe1b8b7d6a7eef75362": { + "theme": "INSOLITE", + "text": "Un truc moche", + "tags": ["*"], + "emojis": ["🥴"] + }, + "fdebc26184afa53da6d1f996a8bbf780": { + "theme": "LIEU", + "text": "À la plage", + "tags": ["*"], + "emojis": ["🏖️"] + }, + "87b930d71b3154e8ba5d8cf83d91d3ca": { + "theme": "LIEU", + "text": "Dans la mer", + "tags": ["*"], + "emojis": ["🌊"] + }, + "90ca0104660b01bdd58b694e187066b8": { + "theme": "LIEU", + "text": "Dans sa poche", + "tags": ["*"], + "emojis": ["👝"] + }, + "e2f6f6eb9c93cb6c64511ae674dabc0c": { + "theme": "LIEU", + "text": "Dans un camping", + "tags": ["*"], + "emojis": ["🏕️"] + }, + "f22d95afbd5d0db4d8a546ddb4d63fad": { + "theme": "LIEU", + "text": "Dans un cartable", + "tags": ["*"], + "emojis": ["🎒"] + }, + "010e8e426c11191dc5a8fbf439de6784": { + "theme": "LIEU", + "text": "Dans une forêt", + "tags": ["*"], + "emojis": ["🌲"] + }, + "e894a19da5d9e87b882b3551d4cccab6": { + "theme": "LIEU", + "text": "Dans une maison", + "tags": ["*"], + "emojis": ["🏠"] + }, + "12c64951be30a4b0b02df2099d51dfbb": { + "theme": "LIEU", + "text": "Dans une voiture", + "tags": ["*"], + "emojis": ["🚙"] + }, + "239f150afef0e4bca48148a1eb1c9419": { + "theme": "LIEU", + "text": "Dans un frigo", + "tags": ["*"], + "emojis": ["🧊"] + }, + "0e43f680ef179f16bc83cf191fa8b3ee": { + "theme": "LIEU", + "text": "Dans un sac à main", + "tags": ["*"], + "emojis": ["👜"] + }, + "e2f66a529e0c1c0eb607aece83899540": { + "theme": "MONDE", + "text": "Mot en anglais", + "tags": ["*"], + "emojis": ["🇬🇧"] + }, + "daa6fb5434acfef7c1918f14118eaa1e": { + "theme": "MONDE", + "text": "Mot en espagnol", + "tags": ["*"], + "emojis": ["🇪🇸"] + }, + "c0adb8b36a2c55a5a6b408aebb796e25": { + "theme": "NATURE", + "text": "Animal", + "tags": ["*"], + "emojis": ["🐒"] + }, + "06604f3c64bad81c7146b36b358f34e6": { + "theme": "NATURE", + "text": "Arbre", + "tags": ["*"], + "emojis": ["🌳"] + }, + "3fafbf004569d2859d1f98ceaeda0381": { + "theme": "NATURE", + "text": "Dans l’univers (étoile, planète, constellation, ...)", + "tags": ["*"], + "emojis": ["🪐"] + }, + "6e080db66b45daa1b9acdefd075ce06d": { + "theme": "NATURE", + "text": "Fleuve, rivière, lac, mer ou océan", + "tags": ["*"], + "emojis": ["🌊"] + }, + "922ef40fdc2bf07dba7b5eb4e392dca5": { + "theme": "NATURE", + "text": "Fruit ou légume", + "tags": ["*"], + "emojis": ["🍅"] + }, + "fa064927d7c28e02f8bbff993662ef6c": { + "theme": "NATURE", + "text": "Insecte", + "tags": ["*"], + "emojis": ["🐞"] + }, + "6d31fdbabd52ce77d14791e3b6bdba9f": { + "theme": "NATURE", + "text": "Mammifère", + "tags": ["*"], + "emojis": ["🐇"] + }, + "72fd000068794c5376ae64770239916f": { + "theme": "NATURE", + "text": "Minéral ou pierre précieuse", + "tags": ["*"], + "emojis": ["💎"] + }, + "2eb4e8d37b98f9b59e90604dfe37fd70": { + "theme": "NATURE", + "text": "Oiseau", + "tags": ["*"], + "emojis": ["🐦"] + }, + "b7e246847fffd2e2f6879154bd695dae": { + "theme": "NATURE", + "text": "Poisson", + "tags": ["*"], + "emojis": ["🐟"] + }, + "c1ec620d1225c53044199b43faadd2c7": { + "theme": "NOURRITURE", + "text": "Boisson", + "tags": ["*"], + "emojis": ["🥤"] + }, + "e074313e9c03900f72578b267f96f15f": { + "theme": "NOURRITURE", + "text": "Dessert", + "tags": ["*"], + "emojis": ["🍰"] + }, + "33382e9abddbcf023305489adef8740a": { + "theme": "NOURRITURE", + "text": "Épice / Herbe aromatique", + "tags": ["*"], + "emojis": ["🌶️"] + }, + "42e1524ebd7d9836c3cd8507a8306574": { + "theme": "NOURRITURE", + "text": "Fromage", + "tags": ["*"], + "emojis": ["🧀"] + }, + "8b44cba9e0879d6da17f99a972606485": { + "theme": "NOURRITURE", + "text": "Plat", + "tags": ["*"], + "emojis": ["🍲"] + } + } }; } diff --git a/lib/ui/widgets/game/widget_category.dart b/lib/ui/widgets/game/widget_category.dart index 0a0b858d258da5d0cd34fdc78097f758db3c750b..61d41ea077409f849eecdcb3b40f755290e05fb6 100644 --- a/lib/ui/widgets/game/widget_category.dart +++ b/lib/ui/widgets/game/widget_category.dart @@ -31,37 +31,40 @@ class WidgetCategory extends StatelessWidget { width: borderWidth, ), ), - child: Column( - children: [ - SizedBox( - height: 100, - child: TextButton( - onPressed: () { - final GameCubit gameCubit = BlocProvider.of<GameCubit>(context); - gameCubit.pickNewCategory(); - }, - child: Text( + child: SizedBox( + height: 180, + child: TextButton( + onPressed: () { + final GameCubit gameCubit = BlocProvider.of<GameCubit>(context); + gameCubit.pickNewCategory(); + }, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( currentGame.category.text, textAlign: TextAlign.center, style: const TextStyle( - fontSize: 30, + fontSize: 35, fontWeight: FontWeight.w600, color: Colors.black, + height: 1, ), ), - ), - ), - SizedBox.square( - dimension: 80, - child: Text( - currentGame.category.emoji, - textAlign: TextAlign.center, - style: const TextStyle( - fontSize: 50, + const SizedBox( + height: 12, + ), + Text( + currentGame.category.emoji, + textAlign: TextAlign.center, + style: const TextStyle( + fontSize: 50, + ), ), - ), + ], ), - ], + ), ), ); }, diff --git a/pubspec.lock b/pubspec.lock index b5a356dfeb8febcb7fbb85d3d013b567f3a279d2..bdba0ef12aaa5e28404023f4cff3d604ec53b942 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -61,10 +61,10 @@ packages: dependency: "direct main" description: name: easy_localization - sha256: "432698c31a488dd64c56d4759f20d04844baba5e9e4f2cb1abb9676257918b17" + sha256: fa59bcdbbb911a764aa6acf96bbb6fa7a5cf8234354fc45ec1a43a0349ef0201 url: "https://pub.dev" source: hosted - version: "3.0.6" + version: "3.0.7" easy_logger: dependency: transitive description: @@ -114,10 +114,10 @@ packages: dependency: "direct dev" description: name: flutter_lints - sha256: "9e8c3858111da373efc5aa341de011d9bd23e2c5c5e0c62bccf32438e192d7b1" + sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c" url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "4.0.0" flutter_localizations: dependency: transitive description: flutter @@ -172,10 +172,10 @@ packages: dependency: transitive description: name: lints - sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290 + sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235" url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "4.0.0" material_color_utilities: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 3b9c83f147708e27aa426e373cf87295ff5501ca..7a18da72002911db110db2edfaa75dedbb8afccc 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ description: A PetitBac game application. publish_to: "none" -version: 1.2.32+38 +version: 1.2.33+39 environment: sdk: "^3.0.0" @@ -22,7 +22,7 @@ dependencies: unicons: ^2.1.1 dev_dependencies: - flutter_lints: ^3.0.1 + flutter_lints: ^4.0.0 flutter: uses-material-design: true diff --git a/scripts/build_categories_list.sh b/scripts/build_categories_list.sh new file mode 100755 index 0000000000000000000000000000000000000000..8453c9eb8558486fcefbb08752e4b418d2bd9dc3 --- /dev/null +++ b/scripts/build_categories_list.sh @@ -0,0 +1,80 @@ +#!/usr/bin/env bash + +command -v jq >/dev/null 2>&1 || { echo >&2 "I require jq (json parser) but it's not installed. Aborting."; exit 1; } + +CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" +BASE_DIR="$(dirname "${CURRENT_DIR}")" + +# CSV source file for categories +SOURCE_CATEGORIES_CSV_FILE="${CURRENT_DIR}/categories.csv" + +# Temp json file +OUTPUT_CATEGORIES_JSON_FILE="${CURRENT_DIR}/categories.json" +touch "${OUTPUT_CATEGORIES_JSON_FILE}" + +echo "Sorting source csv file..." +cat "${SOURCE_CATEGORIES_CSV_FILE}" | sort | uniq >"${SOURCE_CATEGORIES_CSV_FILE}.tmp" +mv "${SOURCE_CATEGORIES_CSV_FILE}.tmp" "${SOURCE_CATEGORIES_CSV_FILE}" + +echo "Building categories json file..." +OUTPUT_CATEGORIES_JSON_FILE_TMP="${OUTPUT_CATEGORIES_JSON_FILE}.tmp" +echo "{" > "${OUTPUT_CATEGORIES_JSON_FILE_TMP}" +echo " \"categories\": {" >> "${OUTPUT_CATEGORIES_JSON_FILE_TMP}" +FIRST_WORD=1 +while read -r LINE; do + if [[ -n "${LINE}" ]]; then + echo "- ${LINE}" + + CATEGORY_THEME="$(echo "${LINE}" | cut -d';' -f1)" + CATEGORY_EMOJIS="$(echo "${LINE}" | cut -d';' -f2)" + CATEGORY_TEXT="$(echo "${LINE}" | cut -d';' -f3)" + CATEGORY_TAGS="$(echo "${LINE}" | cut -d';' -f4)" + + CATEGORY_CODE="$(echo "${CATEGORY_TEXT}" | md5sum | awk '{print $1;}')" + + if [[ ${FIRST_WORD} -eq 0 ]]; then + echo " ," >> "${OUTPUT_CATEGORIES_JSON_FILE_TMP}" + fi + + echo " \"${CATEGORY_CODE}\": {" >> "${OUTPUT_CATEGORIES_JSON_FILE_TMP}" + echo " \"theme\": \"${CATEGORY_THEME}\"," >> "${OUTPUT_CATEGORIES_JSON_FILE_TMP}" + echo " \"text\": \"${CATEGORY_TEXT}\"," >> "${OUTPUT_CATEGORIES_JSON_FILE_TMP}" + echo " \"tags\": [" >> "${OUTPUT_CATEGORIES_JSON_FILE_TMP}" + if [ ! -z "${CATEGORY_EMOJIS}" ]; then + echo " \"${CATEGORY_TAGS}\"" >> "${OUTPUT_CATEGORIES_JSON_FILE_TMP}" + fi + echo " ]," >> "${OUTPUT_CATEGORIES_JSON_FILE_TMP}" + echo " \"emojis\": [" >> "${OUTPUT_CATEGORIES_JSON_FILE_TMP}" + if [ ! -z "${CATEGORY_EMOJIS}" ]; then + echo " \"${CATEGORY_EMOJIS}\"" >> "${OUTPUT_CATEGORIES_JSON_FILE_TMP}" + fi + echo " ]" >> "${OUTPUT_CATEGORIES_JSON_FILE_TMP}" + echo " }" >> "${OUTPUT_CATEGORIES_JSON_FILE_TMP}" + + FIRST_WORD=0 + fi +done < <(cat "${SOURCE_CATEGORIES_CSV_FILE}") + +echo " }" >> "${OUTPUT_CATEGORIES_JSON_FILE_TMP}" +echo "}" >> "${OUTPUT_CATEGORIES_JSON_FILE_TMP}" + +echo "Formatting JSON data file..." + +cat "${OUTPUT_CATEGORIES_JSON_FILE_TMP}" | jq > "${OUTPUT_CATEGORIES_JSON_FILE}" +rm "${OUTPUT_CATEGORIES_JSON_FILE_TMP}" + +echo "Injecting json file in game_data.dart..." + +GAME_DATA_DART_FILE="${BASE_DIR}/lib/data/game_data.dart" +echo "class GameData {" >"${GAME_DATA_DART_FILE}" +echo " static const Map<String, dynamic> data = $(cat "${OUTPUT_CATEGORIES_JSON_FILE}");" >>"${GAME_DATA_DART_FILE}" +echo "}" >>"${GAME_DATA_DART_FILE}" + +echo "Formatting dart source code file..." + +dart format "${GAME_DATA_DART_FILE}" + +# Delete json temp file +rm "${OUTPUT_CATEGORIES_JSON_FILE}" + +echo "done." diff --git a/scripts/categories.csv b/scripts/categories.csv new file mode 100644 index 0000000000000000000000000000000000000000..51b793c33afc8e139c1c8883d775148169a9703b --- /dev/null +++ b/scripts/categories.csv @@ -0,0 +1,96 @@ +BASE;📦;Chose ou objet;* +BASE;🎨;Couleur;* +BASE;🚗;Élément de véhicules;* +BASE;💐;Fleur;* +BASE;🚂;Moyen de transport;* +BASE;🥣;Objet du quotidien;* +BASE;🛠️;Outil (de bricolage);* +BASE;🙃;Qualité ou défaut;* +BASE;💻;Site internet;* +BASE;™️;Marque;* +BASE;👖;Vêtement;* +CARACTERISTIQUE;🤢;Mauvais pour la santé;* +CARACTERISTIQUE;🏭;Mauvais pour l'environement;* +CARACTERISTIQUE;📌;Quelque chose de pointu;* +CARACTERISTIQUE;⚽;Quelque chose de rond;* +CARACTERISTIQUE;🏚️;Quelque chose de vieux;* +CARACTERISTIQUE;🪨;Quelque chose qui coule;* +CARACTERISTIQUE;🪵;Quelque chose qui flotte;* +CARACTERISTIQUE;🪁;Quelque chose qui vole;* +CARACTERISTIQUE;🙀;Qui fait peur;* +CARACTERISTIQUE;🥰;Qui fait plaisir;* +CARACTERISTIQUE;🪥;Qui gratte;* +CARACTERISTIQUE;🤮;Qui n'est pas bon;* +CARACTERISTIQUE;💩;Qui sent mauvais;* +COULEUR;⬜;Quelque chose de blanc;* +COULEUR;🟦;Quelque chose de bleu;* +COULEUR;🟨;Quelque chose de jaune;* +COULEUR;🟥;Quelque chose de rouge;* +COULEUR;🟩;Quelque chose de vert;* +CULTURE;🎭;Acteur ou actrice;* +CULTURE;🧑🏫;Auteur de littérature;* +CULTURE;🎤;Chanteur ou chanteuse;* +CULTURE;🧪;Élément chimique;* +CULTURE;🧑💼;Femme ou homme politique;* +CULTURE;🎥;Film;* +CULTURE;🧞♂️;Héros de mythologie;* +CULTURE;🦸;Héros fictif;* +CULTURE;🎸;Instrument de musique;* +CULTURE;🎲;Jeu (de société);* +CULTURE;🖇️;Métal;* +CULTURE;🗯️;Personnage de bande dessinée;* +CULTURE;🧜♀️;Personnage de dessin animé;* +CULTURE;🏅;Sport;* +CULTURE;📘;Titre de livre;* +DICTIONNAIRE;8️⃣;Mot de plus de 8 lettres;* +DICTIONNAIRE;🩻;Mot de 4 lettres;* +GEOGRAPHIE;🗽;Capitale;* +GEOGRAPHIE;🇫🇷;Département français;* +GEOGRAPHIE;🗺️;Pays;* +GEOGRAPHIE;🏙️;Ville;* +GEOGRAPHIE;🇫🇷;Ville française;* +HUMAIN;👷;Métier;* +HUMAIN;🧑⚕️;Métier dont rêvent les enfants;* +HUMAIN;🖐️;Partie du corps humain;* +HUMAIN;🤴;Personnage historique;* +HUMAIN;👧🏼;Prénom fille;* +HUMAIN;👦🏼;Prénom garçon;* +INSOLITE;🔔;Bruit ou son;* +INSOLITE;🎁;Cadeau de Noël ou d'anniversaire;* +INSOLITE;🎁;Cadeau nul;* +INSOLITE;🖕;Injure originale;* +INSOLITE;📍;Lieu incontournable;* +INSOLITE;🗣️;Mot qui se termine en -ard;* +INSOLITE;🗣️;Mot qui se termine en -asse;* +INSOLITE;🗣️;Mots qui riment avec ouille;* +INSOLITE;🃏;Objet insolite;* +INSOLITE;🪦;On peut y planquer un corps;* +INSOLITE;🤬;Un gros mot;* +INSOLITE;🥴;Un truc moche;* +LIEU;🏖️;À la plage;* +LIEU;🌊;Dans la mer;* +LIEU;👝;Dans sa poche;* +LIEU;🏕️;Dans un camping;* +LIEU;🎒;Dans un cartable;* +LIEU;🌲;Dans une forêt;* +LIEU;🏠;Dans une maison;* +LIEU;🚙;Dans une voiture;* +LIEU;🧊;Dans un frigo;* +LIEU;👜;Dans un sac à main;* +MONDE;🇬🇧;Mot en anglais;* +MONDE;🇪🇸;Mot en espagnol;* +NATURE;🐒;Animal;* +NATURE;🌳;Arbre;* +NATURE;🪐;Dans l’univers (étoile, planète, constellation, ...);* +NATURE;🌊;Fleuve, rivière, lac, mer ou océan;* +NATURE;🍅;Fruit ou légume;* +NATURE;🐞;Insecte;* +NATURE;🐇;Mammifère;* +NATURE;💎;Minéral ou pierre précieuse;* +NATURE;🐦;Oiseau;* +NATURE;🐟;Poisson;* +NOURRITURE;🥤;Boisson;* +NOURRITURE;🍰;Dessert;* +NOURRITURE;🌶️;Épice / Herbe aromatique;* +NOURRITURE;🧀;Fromage;* +NOURRITURE;🍲;Plat;*