From 87cc5422751949bc858d135910b6c8f1079eaac5 Mon Sep 17 00:00:00 2001 From: MikeWallaceDev Date: Thu, 24 Feb 2022 20:22:02 -0500 Subject: [PATCH 01/15] refactor: change order of rules rules are now in order of a commit message and separated into sections. --- commitlint.config.js | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/commitlint.config.js b/commitlint.config.js index 91e40054f0..e6b276957c 100644 --- a/commitlint.config.js +++ b/commitlint.config.js @@ -1,20 +1,24 @@ // module.exports = {extends: ['@commitlint/config-conventional']} module.exports = { rules: { - 'type-enum': [2, 'always', ['chore', 'ci', 'docs', 'feat', 'fix', 'refactor', 'style', 'test']], - 'body-leading-blank': [1, 'always'], - 'body-max-line-length': [2, 'always', 100], - 'footer-leading-blank': [1, 'always'], - 'footer-max-line-length': [2, 'always', 100], 'header-max-length': [2, 'always', 100], + + 'type-enum': [2, 'always', ['chore', 'ci', 'docs', 'feat', 'fix', 'refactor', 'style', 'test']], + 'type-empty': [2, 'never'], + 'type-case': [2, 'always', 'lower-case'], + 'subject-case': [ 2, 'never', ['sentence-case', 'start-case', 'pascal-case', 'upper-case'], ], 'subject-empty': [2, 'never'], - 'type-empty': [2, 'never'], - 'type-case': [2, 'always', 'lower-case'], - 'body-case': [2, 'never', []] + + 'body-leading-blank': [1, 'always'], + 'body-max-line-length': [2, 'always', 100], + 'body-case': [2, 'never', []], + + 'footer-leading-blank': [1, 'always'], + 'footer-max-line-length': [2, 'always', 100] }, }; From be3141b08e08918b046aef3255d8e2cef751621b Mon Sep 17 00:00:00 2001 From: MikeWallaceDev Date: Thu, 24 Feb 2022 20:36:18 -0500 Subject: [PATCH 02/15] ci: improve commitlint configuration Added types: build, feature no longer checks subject's case now forces a leading blank before body (This is required by Github) Increased body length to 200 --- commitlint.config.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/commitlint.config.js b/commitlint.config.js index e6b276957c..c59a378e48 100644 --- a/commitlint.config.js +++ b/commitlint.config.js @@ -3,20 +3,20 @@ module.exports = { rules: { 'header-max-length': [2, 'always', 100], - 'type-enum': [2, 'always', ['chore', 'ci', 'docs', 'feat', 'fix', 'refactor', 'style', 'test']], + 'type-enum': [2, 'always', ['build', 'chore', 'ci', 'docs', 'feat', 'feature', 'fix', 'refactor', 'style', 'test']], 'type-empty': [2, 'never'], 'type-case': [2, 'always', 'lower-case'], + 'subject-empty': [2, 'never'], 'subject-case': [ - 2, + 0, 'never', ['sentence-case', 'start-case', 'pascal-case', 'upper-case'], ], - 'subject-empty': [2, 'never'], - 'body-leading-blank': [1, 'always'], - 'body-max-line-length': [2, 'always', 100], - 'body-case': [2, 'never', []], + 'body-leading-blank': [2, 'always'], + 'body-max-line-length': [2, 'always', 200], + 'body-case': [0, 'never', []], 'footer-leading-blank': [1, 'always'], 'footer-max-line-length': [2, 'always', 100] From f8f77db79b0854a903d4bce5ef2a86b174f0cd9e Mon Sep 17 00:00:00 2001 From: Mehdi Bertul Date: Fri, 25 Feb 2022 02:48:47 +0100 Subject: [PATCH 03/15] Fix the translation to fr-FR (Closes #369) (#371) * fix: rename fr.json to fr-FR.json * fix: the translation mistakes in fr-FR.json * fix: added french language to system Co-authored-by: MikeWallaceDev --- .../translations/{fr.json => fr-FR.json} | 74 +++++++++---------- .../lib/startup/tasks/app_widget.dart | 2 +- .../packages/flowy_infra/lib/language.dart | 9 ++- 3 files changed, 46 insertions(+), 39 deletions(-) rename frontend/app_flowy/assets/translations/{fr.json => fr-FR.json} (61%) diff --git a/frontend/app_flowy/assets/translations/fr.json b/frontend/app_flowy/assets/translations/fr-FR.json similarity index 61% rename from frontend/app_flowy/assets/translations/fr.json rename to frontend/app_flowy/assets/translations/fr-FR.json index 27c752d212..c05c9aba27 100644 --- a/frontend/app_flowy/assets/translations/fr.json +++ b/frontend/app_flowy/assets/translations/fr-FR.json @@ -1,44 +1,44 @@ { "appName": "AppFlowy", "defaultUsername": "Moi", - "welcomeText": "Bienvenue à @:appName", - "githubStarText": "Favorier sur GitHub", - "subscribeNewsletterText": "S'inscrire à la Bulletin", + "welcomeText": "Bienvenue sur @:appName", + "githubStarText": "Favoriser sur GitHub", + "subscribeNewsletterText": "S'inscrire à la Newsletter", "letsGoButtonText": "Allons-y", "title": "Titre", "signUp": { "buttonText": "S'inscrire", - "title": "Inscrivez-vous pour @:appName", + "title": "Inscrivez-vous sur @:appName", "getStartedText": "Commencer", - "emptyPasswordError": "Mot de passe ne peut pas être vide", - "repeatPasswordEmptyError": "Le mot de passe de répétition ne peut pas être vide", - "unmatchedPasswordError": "Le mot de passe de répétition n'est pas le même que le mot de passe", - "alreadyHaveAnAccount": "Vous avez déjà un compte?", + "emptyPasswordError": "Vous n'avez pas saisi votre mot de passe", + "repeatPasswordEmptyError": "Vous n'avez pas ressaisi votre mot de passe", + "unmatchedPasswordError": "Les deux mots de passe ne sont pas identiques", + "alreadyHaveAnAccount": "Avez-vous déjà un compte ?", "emailHint": "Email", "passwordHint": "Mot de passe", - "repeatPasswordHint": "Répéter le mot de passe" + "repeatPasswordHint": "Ressaisir votre mot de passe" }, "signIn": { "loginTitle": "Connexion à @:appName", "loginButtonText": "Connexion", "buttonText": "Se connecter", - "forgotPassword": "Mot de passe oublié?", + "forgotPassword": "Mot de passe oublié ?", "emailHint": "Email", "passwordHint": "Mot de passe", - "dontHaveAnAccount": "Don't have an account?", - "repeatPasswordEmptyError": "Le mot de passe de répétition ne peut pas être vide", - "unmatchedPasswordError": "Le mot de passe de répétition n'est pas le même que le mot de passe" + "dontHaveAnAccount": "Vous n'avez pas encore créé votre compte ?", + "repeatPasswordEmptyError": "Vous n'avez pas ressaisi votre mot de passe", + "unmatchedPasswordError": "Les deux mots de passe ne sont pas identiques" }, "workspace": { "create": "Créer un espace de travail", - "hint": "espace de travail", - "notFoundError": "L'espace de travail pas trouvé" + "hint": "Espace de travail", + "notFoundError": "Espace de travail introuvable" }, "shareAction": { "buttonText": "Partager", "workInProgress": "Bientôt disponible", "markdown": "Markdown", - "copyLink": "Copier Lien" + "copyLink": "Copier le lien" }, "disclosureAction": { "rename": "Renommer", @@ -49,16 +49,16 @@ "newPageText": "Nouvelle page", "trash": { "text": "Corbeille", - "restoreAll": "Restaurer Tout", - "deleteAll": "Supprimer Tout", + "restoreAll": "Restaurer tout", + "deleteAll": "Supprimer tout", "pageHeader": { "fileName": "Nom de fichier", - "lastModified": "Dernière Modification", + "lastModified": "Dernière modification", "created": "Créé" } }, "deletePagePrompt": { - "text": "Cette page est dans la corbeille", + "text": "Cette page a été supprimée, vous pouvez la retrouver dans la corbeille", "restore": "Restaurer la page", "deletePermanent": "Supprimer définitivement" }, @@ -68,8 +68,8 @@ "help": "Aide et Support", "debug": { "name": "Informations de Débogage", - "success": "Informations de débogage copiées dans le presse-papiers!", - "fail": "Impossible de copier informations de débogage dans le presse-papiers" + "success": "Informations de Débogage copiées dans le presse-papiers!", + "fail": "Impossible de copier les informations de Débogage dans le presse-papiers" } }, "menuAppHeader": { @@ -84,34 +84,34 @@ "italic": "Italique", "underline": "Souligner", "strike": "Barré", - "numList": "Liste Numérotée", - "bulletList": "Liste à Puces", - "checkList": "Liste de Contrôle", - "inlineCode": "Code en Ligne", - "quote": "Bloc Citation", + "numList": "Liste numérotée", + "bulletList": "Liste à puces", + "checkList": "To-Do List", + "inlineCode": "Code", + "quote": "Bloc de citation", "header": "En-tête", "highlight": "Surligner" }, "tooltip": { - "lightMode": "Passer en Mode Clair", - "darkMode": "Passer en Mode Sombre" + "lightMode": "Passer en mode clair", + "darkMode": "Passer en mode sombre" }, "contactsPage": { "title": "Contacts", - "whatsHappening": "Que se passe-t-il cette semaine?", + "whatsHappening": "Que se passe-t-il cette semaine ?", "addContact": "Ajouter un contact", "editContact": "Modifier le contact" }, "button": { "OK": "OK", "Cancel": "Annuler", - "signIn": "Se Connecter", - "signOut": "Se Déconnecter", - "complete": "Complêt", + "signIn": "Se connecter", + "signOut": "Se déconnecter", + "complete": "Achevé", "save": "Enregistrer" }, "label": { - "welcome": "Bienvenue!", + "welcome": "Bienvenue !", "firstName": "Prénom", "middleName": "Deuxième prénom", "lastName": "Nom", @@ -135,11 +135,11 @@ "menu": { "appearance": "Apparence", "language": "Langue", - "open": "Ouvrir les Paramètres" + "open": "Ouvrir les paramètres" }, "appearance": { - "lightLabel": "Mode Clair", - "darkLabel": "Mode Sombre" + "lightLabel": "Mode clair", + "darkLabel": "Mode sombre" } } } diff --git a/frontend/app_flowy/lib/startup/tasks/app_widget.dart b/frontend/app_flowy/lib/startup/tasks/app_widget.dart index a50e871795..8ce273eb7f 100644 --- a/frontend/app_flowy/lib/startup/tasks/app_widget.dart +++ b/frontend/app_flowy/lib/startup/tasks/app_widget.dart @@ -31,7 +31,7 @@ class InitAppWidgetTask extends LaunchTask { // In alphabetical order Locale('en'), Locale('es', 'VE'), - Locale('fr'), + Locale('fr', 'FR'), Locale('fr', 'CA'), Locale('it', 'IT'), Locale('ru', 'RU'), diff --git a/frontend/app_flowy/packages/flowy_infra/lib/language.dart b/frontend/app_flowy/packages/flowy_infra/lib/language.dart index 091151bc57..2e0122366a 100644 --- a/frontend/app_flowy/packages/flowy_infra/lib/language.dart +++ b/frontend/app_flowy/packages/flowy_infra/lib/language.dart @@ -14,7 +14,14 @@ String languageFromLocale(Locale locale) { case "es": return "Español"; case "fr": - return "Français"; + switch (locale.countryCode) { + case "CA" : + return "Français (CA)"; + case "FR" : + return "Français (FR)"; + default : + return locale.languageCode; + } case "it": return "Italiano"; case "ru": From 8bdcb43332bb872f9a3399d8f9507c81b130d99b Mon Sep 17 00:00:00 2001 From: MikeWallaceDev Date: Thu, 24 Feb 2022 21:22:27 -0500 Subject: [PATCH 04/15] fix: improve French Canadian translation --- .../app_flowy/assets/translations/fr-CA.json | 86 +++++++++---------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/frontend/app_flowy/assets/translations/fr-CA.json b/frontend/app_flowy/assets/translations/fr-CA.json index 7d7c51d22b..329576028b 100644 --- a/frontend/app_flowy/assets/translations/fr-CA.json +++ b/frontend/app_flowy/assets/translations/fr-CA.json @@ -1,75 +1,75 @@ { "appName": "AppFlowy", "defaultUsername": "Moi", - "welcomeText": "Bienvenu à @:appName", - "githubStarText": "Favorier sur GitHub", + "welcomeText": "Bienvenue sur @:appName", + "githubStarText": "Favoriser sur GitHub", "subscribeNewsletterText": "Abonnez-vous à notre courriel", "letsGoButtonText": "Allons-y", "title": "Titre", "signUp": { - "buttonText": "S'abonner", - "title": "S'abonner à @:appName", + "buttonText": "S'inscrire", + "title": "S'inscrire à @:appName", "getStartedText": "Commencer", - "emptyPasswordError": "Mot de passe ne doit pas être vide", + "emptyPasswordError": "Vous n'avez pas saisi votre mot de passe", "repeatPasswordEmptyError": "Mot de passe ne doit pas être vide", - "unmatchedPasswordError": "Les mots de pass ne concordent pas", + "unmatchedPasswordError": "Les deux mots de passe ne sont pas identiques", "alreadyHaveAnAccount": "Avez-vous déjà un compte?", "emailHint": "courriel", "passwordHint": "Mot de passe", - "repeatPasswordHint": "Resaisir le mot de passe" + "repeatPasswordHint": "Ressaisir votre mot de passe" }, "signIn": { - "loginTitle": "Se connecter à @:appName", + "loginTitle": "Connexion à @:appName", "loginButtonText": "Connexion", - "buttonText": "Connexion", + "buttonText": "Se connecter", "forgotPassword": "Mot de passe oublié?", "emailHint": "courriel", "passwordHint": "Mot de passe", "dontHaveAnAccount": "Vous n'avez pas de compte?", "repeatPasswordEmptyError": "Mot de passe ne doit pas être vide", - "unmatchedPasswordError": "Les mots de passe ne concordent pas" + "unmatchedPasswordError": "Les deux mots de passe ne sont pas identiques" }, "workspace": { - "create": "Créer une espace de travail", - "hint": "espace de travail", - "notFoundError": "Espace de travail non trouvé" + "create": "Créer un espace de travail", + "hint": "Espace de travail", + "notFoundError": "Espace de travail introuvable" }, "shareAction": { "buttonText": "Partager", "workInProgress": "Bientôt disponible", "markdown": "Markdown", - "copyLink": "Copier le liens" + "copyLink": "Copier le lien" }, "disclosureAction": { "rename": "Renommer", "delete": "Supprimer", "duplicate": "Dupliquer" }, - "blankPageTitle": "Page vide", + "blankPageTitle": "Page vierge", "newPageText": "Nouvelle page", "trash": { - "text": "Poubelle", + "text": "Corbeille", "restoreAll": "Tout récupérer", "deleteAll": "Tout supprimer", "pageHeader": { "fileName": "Nom de fichier", "lastModified": "Dernière modification", - "created": "Crée" + "created": "Créé" } }, "deletePagePrompt": { - "text": "Cette page est dans la poubelle", + "text": "Cette page est dans la corbeille", "restore": "Récupérer la page", - "deletePermanent": "Supprimer en permanence" + "deletePermanent": "Supprimer définitivement" }, "dialogCreatePageNameHint": "Nom de la page", "questionBubble": { - "whatsNew": "Quoi de neuf?", - "help": "Aide & Support Technique", + "whatsNew": "Nouveautés", + "help": "Aide et Support Technique", "debug": { - "name": "Info du système", + "name": "Infos du système", "success": "Info copié!", - "fail": "Incapable de copié l'info" + "fail": "Impossible de copier l'info" } }, "menuAppHeader": { @@ -79,67 +79,67 @@ }, "toolbar": { "undo": "Annuler", - "redo": "Refaire", + "redo": "Rétablir", "bold": "Gras", "italic": "Italique", - "underline": "Souligné", + "underline": "Souligner", "strike": "Barré", "numList": "Liste numérotée", "bulletList": "Liste à puces", "checkList": "Liste de contrôle", "inlineCode": "Code en ligne", "quote": "Citation", - "header": "en-tête", + "header": "En-tête", "highlight": "Surligner" }, "tooltip": { - "lightMode": "Aller en mode claire", - "darkMode": "Aller en mode foncé" + "lightMode": "Passer en mode clair", + "darkMode": "Passer en mode sombre" }, "contactsPage": { "title": "Contacts", "whatsHappening": "Quoi de neuf?", - "addContact": "Ajouter Contact", - "editContact": "Éditer Contact" + "addContact": "Ajouter un contact", + "editContact": "Modifier le contact" }, "button": { "OK": "OK", "Cancel": "Annuler", - "signIn": "Connecter", - "signOut": "Déconnecter", - "complete": "Complêt", + "signIn": "Se connecter", + "signOut": "Se déconnecter", + "complete": "Achevé", "save": "Sauvegarder" }, "label": { - "welcome": "Bienvenu!", + "welcome": "Bienvenue!", "firstName": "Prénom", - "middleName": "Nom", + "middleName": "Deuxième nom", "lastName": "Nom de famille", "stepX": "Étape {X}" }, "oAuth": { "err": { - "failedTitle": "Incapable de connecter à votre compte.", + "failedTitle": "Incapable de se connecter à votre compte.", "failedMsg": "SVP vous assurrez d'avoir complèté le processus d'enregistrement dans votre fureteur." }, "google": { "title": "S'identifier avec Google", "instruction1": "Pour importer vos contacts Google, vous devez autoriser cette application à l'aide de votre navigateur Web.", - "instruction2": "Copiez ce code dans votre presse-papiers en cliquant sur l'icône ou en sélectionnant le texte :", - "instruction3": "Accédez au lien suivant dans votre navigateur Web et saisissez le code ci-dessus :", - "instruction4": "Appuyez sur le bouton ci-dessous lorsque vous avez terminé votre inscription :" + "instruction2": "Copiez ce code dans votre presse-papiers en cliquant sur l'icône ou en sélectionnant le texte:", + "instruction3": "Accédez au lien suivant dans votre navigateur Web et saisissez le code ci-dessus:", + "instruction4": "Appuyez sur le bouton ci-dessous lorsque vous avez terminé votre inscription:" } }, "settings": { - "title": "Réglages", + "title": "Paramètres", "menu": { "appearance": "Apparence", "language": "Langue", - "open": "ouvrir les paramètres" + "open": "Ouvrir les paramètres" }, "appearance": { - "lightLabel": "Mode claire", - "darkLabel": "Mode foncé" + "lightLabel": "Mode clair", + "darkLabel": "Mode sombre" } } } From 926b1666dda189ad850fb717ba2c343373cb505b Mon Sep 17 00:00:00 2001 From: appflowy Date: Fri, 25 Feb 2022 11:37:14 +0800 Subject: [PATCH 05/15] ci: try to fix dart test --- .github/workflows/dart_test.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dart_test.yml b/.github/workflows/dart_test.yml index b6b633cdc1..370c0d6021 100644 --- a/.github/workflows/dart_test.yml +++ b/.github/workflows/dart_test.yml @@ -22,7 +22,9 @@ jobs: with: toolchain: stable - name: Deps Flutter - run: flutter packages pub get + run: | + flutter config --enable-linux-desktop + flutter doctor working-directory: frontend/app_flowy - name: Deps Rust working-directory: frontend @@ -34,15 +36,16 @@ jobs: - name: Code Generation working-directory: frontend/app_flowy run: | + flutter packages pub get flutter packages pub run easy_localization:generate -S ./assets/translations -f keys -O lib/generated -o locale_keys.g.dart flutter packages pub run build_runner build --delete-conflicting-outputs - name: Build FlowySDK working-directory: frontend run: | - flutter config --enable-linux-desktop cargo make --profile development-linux-x86 flowy-sdk-dev - name: Run bloc tests working-directory: frontend/app_flowy run: | + flutter pub get flutter test From cebf097fb256a03b5aa543bddde424b86fbdfba7 Mon Sep 17 00:00:00 2001 From: Aquitano / Thomas Breindl Date: Sun, 30 Jan 2022 12:24:52 +0100 Subject: [PATCH 06/15] Added german translations + added de_DE.json + registered german locale --- .../app_flowy/assets/translations/de_DE.json | 146 ++++++++++++++++++ .../lib/startup/tasks/app_widget.dart | 1 + frontend/app_flowy/pubspec.lock | 12 +- .../src/protobuf/model/mod.rs | 12 +- .../src/protobuf/model/mod.rs | 6 +- .../src/protobuf/model/mod.rs | 6 +- 6 files changed, 165 insertions(+), 18 deletions(-) create mode 100644 frontend/app_flowy/assets/translations/de_DE.json diff --git a/frontend/app_flowy/assets/translations/de_DE.json b/frontend/app_flowy/assets/translations/de_DE.json new file mode 100644 index 0000000000..a9f9bf6361 --- /dev/null +++ b/frontend/app_flowy/assets/translations/de_DE.json @@ -0,0 +1,146 @@ +{ + "appName": "AppFlowy", + "defaultUsername": "Ich", + "welcomeText": "Willkommen bei @:appName", + "githubStarText": "Star on GitHub", + "subscribeNewsletterText": "Abonniere den Newsletter", + "letsGoButtonText": "Lass Uns Anfangen", + "title": "Titel", + "signUp": { + "buttonText": "Registrieren", + "title": "Registriere dich bei @:appName", + "getStartedText": "Los geht's", + "emptyPasswordError": "Passwort darf nicht leer sein", + "repeatPasswordEmptyError": "Passwortwiederholung darf nicht leer sein", + "unmatchedPasswordError": "Passwörter stimmen nicht überein", + "alreadyHaveAnAccount": "Bereits registriert?", + "emailHint": "E-Mail", + "passwordHint": "Passwort", + "repeatPasswordHint": "Wiederhole Passwort" + }, + "signIn": { + "loginTitle": "Login to @:appName", + "loginButtonText": "Anmelden", + "buttonText": "Anmelden", + "forgotPassword": "Passwort vergessen?", + "emailHint": "E-Mail", + "passwordHint": "Passwort", + "dontHaveAnAccount": "Du besitzt noch kein Konto?", + "repeatPasswordEmptyError": "Passwortwiederholung darf nicht leer sein", + "unmatchedPasswordError": "Passwörter stimmen nicht überein" + }, + "workspace": { + "create": "Arbeitsbereich erstellen", + "hint": "Arbeitsbereich", + "notFoundError": "Arbeitsbereich nicht gefunden" + }, + "shareAction": { + "buttonText": "Teilen", + "workInProgress": "Demnächst verfügbar", + "markdown": "Markdown", + "copyLink": "Link kopieren" + }, + "disclosureAction": { + "rename": "Umbenennen", + "delete": "Löschen", + "duplicate": "Duplizieren" + }, + "blankPageTitle": "Leere Seite", + "newPageText": "Neue Seite", + "trash": { + "text": "Papierkorb", + "restoreAll": "Alles wiederherstellen", + "deleteAll": "Alles löschen", + "pageHeader": { + "fileName": "Dateiname", + "lastModified": "Letzte Änderung", + "created": "Erstellt" + } + }, + "deletePagePrompt": { + "text": "Diese Seite ist im Papierkorb", + "restore": "Seite wiederherstellen", + "deletePermanent": "Dauerhaft löschen" + }, + "dialogCreatePageNameHint": "Seitenname", + "questionBubble": { + "whatsNew": "Was gibt es Neues?", + "help": "Hilfe & Support", + "debug": { + "name": "Debug-Informationen", + "success": "Debug-Informationen in die Zwischenablage kopiert!", + "fail": "Debug-Informationen können nicht in die Zwischenablage kopiert werden" + } + }, + "menuAppHeader": { + "addPageTooltip": "Schnell eine Seite innerhalb hinzufügen", + "defaultNewPageName": "Unbenannt", + "renameDialog": "Umbenennen" + }, + "toolbar": { + "undo": "Rückgängig", + "redo": "Wiederherstellen", + "bold": "Fett", + "italic": "Kursiv", + "underline": "Unterstreichen", + "strike": "Durchstreichen", + "numList": "Nummerierte Liste", + "bulletList": "Aufzählung", + "checkList": "Checkliste", + "inlineCode": "Inline-Code", + "quote": "Zitat", + "header": "Überschrift", + "highlight": "Hervorhebung" + }, + "tooltip": { + "lightMode": "In den hellen Modus wechseln", + "darkMode": "In den dunklen Modus wechseln" + }, + "contactsPage": { + "title": "Kontakte", + "whatsHappening": "Was geschieht diese Woche?", + "addContact": "Kontakt hinzufügen", + "editContact": "Kontakt bearbeiten" + }, + "button": { + "OK": "OK", + "Cancel": "Abbrechen", + "signIn": "Anmelden", + "signOut": "Abmelden", + "complete": "Fertig", + "save": "Speichern" + }, + "label": { + "welcome": "Willkommen!", + "firstName": "Vorname", + "middleName": "Zweiter Vorname", + "lastName": "Nachname", + "stepX": "Schritt {X}" + }, + "oAuth": { + "err": { + "failedTitle": "Keine Verbindung zu Ihrem Konto möglich.", + "failedMsg": "Bitte vergewissern Sie sich, dass Sie den Anmeldevorgang in Ihrem Browser abgeschlossen haben." + }, + "google": { + "title": "GOOGLE ANMELDUNG", + "instruction1": "Um Ihre Google-Kontakte zu importieren, müssen Sie diese Anwendung über Ihren Webbrowser autorisieren.", + "instruction2": "Kopieren Sie diesen Code in Ihre Zwischenablage, indem Sie auf das Symbol klicken oder den Text auswählen:", + "instruction3": "Rufen Sie den folgenden Link in Ihrem Webbrowser auf, und geben Sie den obigen Code ein:", + "instruction4": "Drücken Sie auf die Knopf unten, wenn Sie die Anmeldung abgeschlossen haben:" + } + }, + "settings": { + "title": "Einstellungen", + "menu": { + "appearance": "Aussehen", + "language": "Sprache", + "open": "Einstellungen öffnen" + }, + "appearance": { + "lightLabel": "Heller Modus", + "darkLabel": "Dunkler Modus" + } + } + } + \ No newline at end of file diff --git a/frontend/app_flowy/lib/startup/tasks/app_widget.dart b/frontend/app_flowy/lib/startup/tasks/app_widget.dart index 8ce273eb7f..142c4cc30f 100644 --- a/frontend/app_flowy/lib/startup/tasks/app_widget.dart +++ b/frontend/app_flowy/lib/startup/tasks/app_widget.dart @@ -29,6 +29,7 @@ class InitAppWidgetTask extends LaunchTask { EasyLocalization( supportedLocales: const [ // In alphabetical order + Locale('de', 'DE'), Locale('en'), Locale('es', 'VE'), Locale('fr', 'FR'), diff --git a/frontend/app_flowy/pubspec.lock b/frontend/app_flowy/pubspec.lock index 18bc260d4f..92a9805570 100644 --- a/frontend/app_flowy/pubspec.lock +++ b/frontend/app_flowy/pubspec.lock @@ -645,7 +645,7 @@ packages: name: js url: "https://pub.dartlang.org" source: hosted - version: "0.6.4" + version: "0.6.3" json_annotation: dependency: transitive description: @@ -799,7 +799,7 @@ packages: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.1" + version: "1.8.0" path_drawing: dependency: transitive description: @@ -1133,21 +1133,21 @@ packages: name: test url: "https://pub.dartlang.org" source: hosted - version: "1.20.1" + version: "1.19.5" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.9" + version: "0.4.8" test_core: dependency: transitive description: name: test_core url: "https://pub.dartlang.org" source: hosted - version: "0.4.11" + version: "0.4.9" textstyle_extensions: dependency: transitive description: @@ -1354,5 +1354,5 @@ packages: source: hosted version: "8.0.0" sdks: - dart: ">=2.16.0-100.0.dev <3.0.0" + dart: ">=2.15.0-116.0.dev <3.0.0" flutter: ">=2.5.0" diff --git a/shared-lib/flowy-collaboration/src/protobuf/model/mod.rs b/shared-lib/flowy-collaboration/src/protobuf/model/mod.rs index 137466e63f..1a53424107 100644 --- a/shared-lib/flowy-collaboration/src/protobuf/model/mod.rs +++ b/shared-lib/flowy-collaboration/src/protobuf/model/mod.rs @@ -1,14 +1,14 @@ #![cfg_attr(rustfmt, rustfmt::skip)] // Auto-generated, do not edit -mod folder_info; -pub use folder_info::*; - -mod ws_data; -pub use ws_data::*; - mod revision; pub use revision::*; mod document_info; pub use document_info::*; + +mod ws_data; +pub use ws_data::*; + +mod folder_info; +pub use folder_info::*; diff --git a/shared-lib/flowy-folder-data-model/src/protobuf/model/mod.rs b/shared-lib/flowy-folder-data-model/src/protobuf/model/mod.rs index fae1a91d08..bb6ab26c2c 100644 --- a/shared-lib/flowy-folder-data-model/src/protobuf/model/mod.rs +++ b/shared-lib/flowy-folder-data-model/src/protobuf/model/mod.rs @@ -4,14 +4,14 @@ mod share; pub use share::*; +mod trash; +pub use trash::*; + mod app; pub use app::*; mod view; pub use view::*; -mod trash; -pub use trash::*; - mod workspace; pub use workspace::*; diff --git a/shared-lib/flowy-user-data-model/src/protobuf/model/mod.rs b/shared-lib/flowy-user-data-model/src/protobuf/model/mod.rs index e691c7e166..b9d261ebd8 100644 --- a/shared-lib/flowy-user-data-model/src/protobuf/model/mod.rs +++ b/shared-lib/flowy-user-data-model/src/protobuf/model/mod.rs @@ -4,11 +4,11 @@ mod errors; pub use errors::*; +mod user_setting; +pub use user_setting::*; + mod user_profile; pub use user_profile::*; mod auth; pub use auth::*; - -mod user_setting; -pub use user_setting::*; From 3eacf70eddfb9a6b74487e2af39d8b5234a5ca4c Mon Sep 17 00:00:00 2001 From: Aquitano <44656811+Aquitano@users.noreply.github.com> Date: Sun, 30 Jan 2022 16:14:50 +0100 Subject: [PATCH 07/15] Updated german translation changes were suggested by lguenth --- frontend/app_flowy/assets/translations/de_DE.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/app_flowy/assets/translations/de_DE.json b/frontend/app_flowy/assets/translations/de_DE.json index a9f9bf6361..5e1e5cd901 100644 --- a/frontend/app_flowy/assets/translations/de_DE.json +++ b/frontend/app_flowy/assets/translations/de_DE.json @@ -2,14 +2,14 @@ "appName": "AppFlowy", "defaultUsername": "Ich", "welcomeText": "Willkommen bei @:appName", - "githubStarText": "Star on GitHub", + "githubStarText": "GitHub Star vergeben", "subscribeNewsletterText": "Abonniere den Newsletter", - "letsGoButtonText": "Lass Uns Anfangen", + "letsGoButtonText": "Los geht's", "title": "Titel", "signUp": { "buttonText": "Registrieren", "title": "Registriere dich bei @:appName", - "getStartedText": "Los geht's", + "getStartedText": "Erste Schritte", "emptyPasswordError": "Passwort darf nicht leer sein", "repeatPasswordEmptyError": "Passwortwiederholung darf nicht leer sein", "unmatchedPasswordError": "Passwörter stimmen nicht überein", @@ -19,7 +19,7 @@ "repeatPasswordHint": "Wiederhole Passwort" }, "signIn": { - "loginTitle": "Login to @:appName", + "loginTitle": "Bei @:appName einloggen", "loginButtonText": "Anmelden", "buttonText": "Anmelden", "forgotPassword": "Passwort vergessen?", @@ -127,7 +127,7 @@ "instruction1": "Um Ihre Google-Kontakte zu importieren, müssen Sie diese Anwendung über Ihren Webbrowser autorisieren.", "instruction2": "Kopieren Sie diesen Code in Ihre Zwischenablage, indem Sie auf das Symbol klicken oder den Text auswählen:", "instruction3": "Rufen Sie den folgenden Link in Ihrem Webbrowser auf, und geben Sie den obigen Code ein:", - "instruction4": "Drücken Sie auf die Knopf unten, wenn Sie die Anmeldung abgeschlossen haben:" + "instruction4": "Klicken Sie unten auf die Schaltfläche, wenn Sie die Anmeldung abgeschlossen haben:" } }, "settings": { From 2d7d61bdaa5024f52538c62229914d3f2f89a127 Mon Sep 17 00:00:00 2001 From: Aquitano / Thomas Breindl Date: Thu, 3 Feb 2022 17:00:57 +0100 Subject: [PATCH 08/15] Renamed de_DE.json to de-DE.json --- frontend/app_flowy/assets/translations/{de_DE.json => de-DE.json} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename frontend/app_flowy/assets/translations/{de_DE.json => de-DE.json} (100%) diff --git a/frontend/app_flowy/assets/translations/de_DE.json b/frontend/app_flowy/assets/translations/de-DE.json similarity index 100% rename from frontend/app_flowy/assets/translations/de_DE.json rename to frontend/app_flowy/assets/translations/de-DE.json From d6770c6690abe7603f6770b5a966ff101d2c8112 Mon Sep 17 00:00:00 2001 From: appflowy Date: Sat, 26 Feb 2022 16:49:55 +0800 Subject: [PATCH 09/15] chore: delete freeze files --- .../application/doc/doc_bloc.freezed.dart | 1225 ----------------- .../application/menu/menu_bloc.freezed.dart | 1049 -------------- .../application/trash/trash_bloc.freezed.dart | 1129 --------------- .../application/view/view_bloc.freezed.dart | 1155 ---------------- .../workspace/welcome_bloc.freezed.dart | 890 ------------ 5 files changed, 5448 deletions(-) delete mode 100644 frontend/app_flowy/lib/workspace/application/doc/doc_bloc.freezed.dart delete mode 100644 frontend/app_flowy/lib/workspace/application/menu/menu_bloc.freezed.dart delete mode 100644 frontend/app_flowy/lib/workspace/application/trash/trash_bloc.freezed.dart delete mode 100644 frontend/app_flowy/lib/workspace/application/view/view_bloc.freezed.dart delete mode 100644 frontend/app_flowy/lib/workspace/application/workspace/welcome_bloc.freezed.dart diff --git a/frontend/app_flowy/lib/workspace/application/doc/doc_bloc.freezed.dart b/frontend/app_flowy/lib/workspace/application/doc/doc_bloc.freezed.dart deleted file mode 100644 index 80804e8836..0000000000 --- a/frontend/app_flowy/lib/workspace/application/doc/doc_bloc.freezed.dart +++ /dev/null @@ -1,1225 +0,0 @@ -// coverage:ignore-file -// GENERATED CODE - DO NOT MODIFY BY HAND -// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target - -part of 'doc_bloc.dart'; - -// ************************************************************************** -// FreezedGenerator -// ************************************************************************** - -T _$identity(T value) => value; - -final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more informations: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); - -/// @nodoc -class _$DocumentEventTearOff { - const _$DocumentEventTearOff(); - - Initial initial() { - return const Initial(); - } - - Deleted deleted() { - return const Deleted(); - } - - Restore restore() { - return const Restore(); - } - - RestorePage restorePage() { - return const RestorePage(); - } - - DeletePermanently deletePermanently() { - return const DeletePermanently(); - } -} - -/// @nodoc -const $DocumentEvent = _$DocumentEventTearOff(); - -/// @nodoc -mixin _$DocumentEvent { - @optionalTypeArgs - TResult when({ - required TResult Function() initial, - required TResult Function() deleted, - required TResult Function() restore, - required TResult Function() restorePage, - required TResult Function() deletePermanently, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? initial, - TResult Function()? deleted, - TResult Function()? restore, - TResult Function()? restorePage, - TResult Function()? deletePermanently, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? initial, - TResult Function()? deleted, - TResult Function()? restore, - TResult Function()? restorePage, - TResult Function()? deletePermanently, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(Initial value) initial, - required TResult Function(Deleted value) deleted, - required TResult Function(Restore value) restore, - required TResult Function(RestorePage value) restorePage, - required TResult Function(DeletePermanently value) deletePermanently, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(Initial value)? initial, - TResult Function(Deleted value)? deleted, - TResult Function(Restore value)? restore, - TResult Function(RestorePage value)? restorePage, - TResult Function(DeletePermanently value)? deletePermanently, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Initial value)? initial, - TResult Function(Deleted value)? deleted, - TResult Function(Restore value)? restore, - TResult Function(RestorePage value)? restorePage, - TResult Function(DeletePermanently value)? deletePermanently, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $DocumentEventCopyWith<$Res> { - factory $DocumentEventCopyWith( - DocumentEvent value, $Res Function(DocumentEvent) then) = - _$DocumentEventCopyWithImpl<$Res>; -} - -/// @nodoc -class _$DocumentEventCopyWithImpl<$Res> - implements $DocumentEventCopyWith<$Res> { - _$DocumentEventCopyWithImpl(this._value, this._then); - - final DocumentEvent _value; - // ignore: unused_field - final $Res Function(DocumentEvent) _then; -} - -/// @nodoc -abstract class $InitialCopyWith<$Res> { - factory $InitialCopyWith(Initial value, $Res Function(Initial) then) = - _$InitialCopyWithImpl<$Res>; -} - -/// @nodoc -class _$InitialCopyWithImpl<$Res> extends _$DocumentEventCopyWithImpl<$Res> - implements $InitialCopyWith<$Res> { - _$InitialCopyWithImpl(Initial _value, $Res Function(Initial) _then) - : super(_value, (v) => _then(v as Initial)); - - @override - Initial get _value => super._value as Initial; -} - -/// @nodoc - -class _$Initial implements Initial { - const _$Initial(); - - @override - String toString() { - return 'DocumentEvent.initial()'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || (other is Initial); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() initial, - required TResult Function() deleted, - required TResult Function() restore, - required TResult Function() restorePage, - required TResult Function() deletePermanently, - }) { - return initial(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? initial, - TResult Function()? deleted, - TResult Function()? restore, - TResult Function()? restorePage, - TResult Function()? deletePermanently, - }) { - return initial?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? initial, - TResult Function()? deleted, - TResult Function()? restore, - TResult Function()? restorePage, - TResult Function()? deletePermanently, - required TResult orElse(), - }) { - if (initial != null) { - return initial(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Initial value) initial, - required TResult Function(Deleted value) deleted, - required TResult Function(Restore value) restore, - required TResult Function(RestorePage value) restorePage, - required TResult Function(DeletePermanently value) deletePermanently, - }) { - return initial(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(Initial value)? initial, - TResult Function(Deleted value)? deleted, - TResult Function(Restore value)? restore, - TResult Function(RestorePage value)? restorePage, - TResult Function(DeletePermanently value)? deletePermanently, - }) { - return initial?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Initial value)? initial, - TResult Function(Deleted value)? deleted, - TResult Function(Restore value)? restore, - TResult Function(RestorePage value)? restorePage, - TResult Function(DeletePermanently value)? deletePermanently, - required TResult orElse(), - }) { - if (initial != null) { - return initial(this); - } - return orElse(); - } -} - -abstract class Initial implements DocumentEvent { - const factory Initial() = _$Initial; -} - -/// @nodoc -abstract class $DeletedCopyWith<$Res> { - factory $DeletedCopyWith(Deleted value, $Res Function(Deleted) then) = - _$DeletedCopyWithImpl<$Res>; -} - -/// @nodoc -class _$DeletedCopyWithImpl<$Res> extends _$DocumentEventCopyWithImpl<$Res> - implements $DeletedCopyWith<$Res> { - _$DeletedCopyWithImpl(Deleted _value, $Res Function(Deleted) _then) - : super(_value, (v) => _then(v as Deleted)); - - @override - Deleted get _value => super._value as Deleted; -} - -/// @nodoc - -class _$Deleted implements Deleted { - const _$Deleted(); - - @override - String toString() { - return 'DocumentEvent.deleted()'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || (other is Deleted); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() initial, - required TResult Function() deleted, - required TResult Function() restore, - required TResult Function() restorePage, - required TResult Function() deletePermanently, - }) { - return deleted(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? initial, - TResult Function()? deleted, - TResult Function()? restore, - TResult Function()? restorePage, - TResult Function()? deletePermanently, - }) { - return deleted?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? initial, - TResult Function()? deleted, - TResult Function()? restore, - TResult Function()? restorePage, - TResult Function()? deletePermanently, - required TResult orElse(), - }) { - if (deleted != null) { - return deleted(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Initial value) initial, - required TResult Function(Deleted value) deleted, - required TResult Function(Restore value) restore, - required TResult Function(RestorePage value) restorePage, - required TResult Function(DeletePermanently value) deletePermanently, - }) { - return deleted(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(Initial value)? initial, - TResult Function(Deleted value)? deleted, - TResult Function(Restore value)? restore, - TResult Function(RestorePage value)? restorePage, - TResult Function(DeletePermanently value)? deletePermanently, - }) { - return deleted?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Initial value)? initial, - TResult Function(Deleted value)? deleted, - TResult Function(Restore value)? restore, - TResult Function(RestorePage value)? restorePage, - TResult Function(DeletePermanently value)? deletePermanently, - required TResult orElse(), - }) { - if (deleted != null) { - return deleted(this); - } - return orElse(); - } -} - -abstract class Deleted implements DocumentEvent { - const factory Deleted() = _$Deleted; -} - -/// @nodoc -abstract class $RestoreCopyWith<$Res> { - factory $RestoreCopyWith(Restore value, $Res Function(Restore) then) = - _$RestoreCopyWithImpl<$Res>; -} - -/// @nodoc -class _$RestoreCopyWithImpl<$Res> extends _$DocumentEventCopyWithImpl<$Res> - implements $RestoreCopyWith<$Res> { - _$RestoreCopyWithImpl(Restore _value, $Res Function(Restore) _then) - : super(_value, (v) => _then(v as Restore)); - - @override - Restore get _value => super._value as Restore; -} - -/// @nodoc - -class _$Restore implements Restore { - const _$Restore(); - - @override - String toString() { - return 'DocumentEvent.restore()'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || (other is Restore); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() initial, - required TResult Function() deleted, - required TResult Function() restore, - required TResult Function() restorePage, - required TResult Function() deletePermanently, - }) { - return restore(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? initial, - TResult Function()? deleted, - TResult Function()? restore, - TResult Function()? restorePage, - TResult Function()? deletePermanently, - }) { - return restore?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? initial, - TResult Function()? deleted, - TResult Function()? restore, - TResult Function()? restorePage, - TResult Function()? deletePermanently, - required TResult orElse(), - }) { - if (restore != null) { - return restore(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Initial value) initial, - required TResult Function(Deleted value) deleted, - required TResult Function(Restore value) restore, - required TResult Function(RestorePage value) restorePage, - required TResult Function(DeletePermanently value) deletePermanently, - }) { - return restore(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(Initial value)? initial, - TResult Function(Deleted value)? deleted, - TResult Function(Restore value)? restore, - TResult Function(RestorePage value)? restorePage, - TResult Function(DeletePermanently value)? deletePermanently, - }) { - return restore?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Initial value)? initial, - TResult Function(Deleted value)? deleted, - TResult Function(Restore value)? restore, - TResult Function(RestorePage value)? restorePage, - TResult Function(DeletePermanently value)? deletePermanently, - required TResult orElse(), - }) { - if (restore != null) { - return restore(this); - } - return orElse(); - } -} - -abstract class Restore implements DocumentEvent { - const factory Restore() = _$Restore; -} - -/// @nodoc -abstract class $RestorePageCopyWith<$Res> { - factory $RestorePageCopyWith( - RestorePage value, $Res Function(RestorePage) then) = - _$RestorePageCopyWithImpl<$Res>; -} - -/// @nodoc -class _$RestorePageCopyWithImpl<$Res> extends _$DocumentEventCopyWithImpl<$Res> - implements $RestorePageCopyWith<$Res> { - _$RestorePageCopyWithImpl( - RestorePage _value, $Res Function(RestorePage) _then) - : super(_value, (v) => _then(v as RestorePage)); - - @override - RestorePage get _value => super._value as RestorePage; -} - -/// @nodoc - -class _$RestorePage implements RestorePage { - const _$RestorePage(); - - @override - String toString() { - return 'DocumentEvent.restorePage()'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || (other is RestorePage); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() initial, - required TResult Function() deleted, - required TResult Function() restore, - required TResult Function() restorePage, - required TResult Function() deletePermanently, - }) { - return restorePage(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? initial, - TResult Function()? deleted, - TResult Function()? restore, - TResult Function()? restorePage, - TResult Function()? deletePermanently, - }) { - return restorePage?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? initial, - TResult Function()? deleted, - TResult Function()? restore, - TResult Function()? restorePage, - TResult Function()? deletePermanently, - required TResult orElse(), - }) { - if (restorePage != null) { - return restorePage(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Initial value) initial, - required TResult Function(Deleted value) deleted, - required TResult Function(Restore value) restore, - required TResult Function(RestorePage value) restorePage, - required TResult Function(DeletePermanently value) deletePermanently, - }) { - return restorePage(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(Initial value)? initial, - TResult Function(Deleted value)? deleted, - TResult Function(Restore value)? restore, - TResult Function(RestorePage value)? restorePage, - TResult Function(DeletePermanently value)? deletePermanently, - }) { - return restorePage?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Initial value)? initial, - TResult Function(Deleted value)? deleted, - TResult Function(Restore value)? restore, - TResult Function(RestorePage value)? restorePage, - TResult Function(DeletePermanently value)? deletePermanently, - required TResult orElse(), - }) { - if (restorePage != null) { - return restorePage(this); - } - return orElse(); - } -} - -abstract class RestorePage implements DocumentEvent { - const factory RestorePage() = _$RestorePage; -} - -/// @nodoc -abstract class $DeletePermanentlyCopyWith<$Res> { - factory $DeletePermanentlyCopyWith( - DeletePermanently value, $Res Function(DeletePermanently) then) = - _$DeletePermanentlyCopyWithImpl<$Res>; -} - -/// @nodoc -class _$DeletePermanentlyCopyWithImpl<$Res> - extends _$DocumentEventCopyWithImpl<$Res> - implements $DeletePermanentlyCopyWith<$Res> { - _$DeletePermanentlyCopyWithImpl( - DeletePermanently _value, $Res Function(DeletePermanently) _then) - : super(_value, (v) => _then(v as DeletePermanently)); - - @override - DeletePermanently get _value => super._value as DeletePermanently; -} - -/// @nodoc - -class _$DeletePermanently implements DeletePermanently { - const _$DeletePermanently(); - - @override - String toString() { - return 'DocumentEvent.deletePermanently()'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || (other is DeletePermanently); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() initial, - required TResult Function() deleted, - required TResult Function() restore, - required TResult Function() restorePage, - required TResult Function() deletePermanently, - }) { - return deletePermanently(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? initial, - TResult Function()? deleted, - TResult Function()? restore, - TResult Function()? restorePage, - TResult Function()? deletePermanently, - }) { - return deletePermanently?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? initial, - TResult Function()? deleted, - TResult Function()? restore, - TResult Function()? restorePage, - TResult Function()? deletePermanently, - required TResult orElse(), - }) { - if (deletePermanently != null) { - return deletePermanently(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Initial value) initial, - required TResult Function(Deleted value) deleted, - required TResult Function(Restore value) restore, - required TResult Function(RestorePage value) restorePage, - required TResult Function(DeletePermanently value) deletePermanently, - }) { - return deletePermanently(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(Initial value)? initial, - TResult Function(Deleted value)? deleted, - TResult Function(Restore value)? restore, - TResult Function(RestorePage value)? restorePage, - TResult Function(DeletePermanently value)? deletePermanently, - }) { - return deletePermanently?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Initial value)? initial, - TResult Function(Deleted value)? deleted, - TResult Function(Restore value)? restore, - TResult Function(RestorePage value)? restorePage, - TResult Function(DeletePermanently value)? deletePermanently, - required TResult orElse(), - }) { - if (deletePermanently != null) { - return deletePermanently(this); - } - return orElse(); - } -} - -abstract class DeletePermanently implements DocumentEvent { - const factory DeletePermanently() = _$DeletePermanently; -} - -/// @nodoc -class _$DocumentStateTearOff { - const _$DocumentStateTearOff(); - - _DocumentState call( - {required DocumentLoadingState loadingState, - required bool isDeleted, - required bool forceClose}) { - return _DocumentState( - loadingState: loadingState, - isDeleted: isDeleted, - forceClose: forceClose, - ); - } -} - -/// @nodoc -const $DocumentState = _$DocumentStateTearOff(); - -/// @nodoc -mixin _$DocumentState { - DocumentLoadingState get loadingState => throw _privateConstructorUsedError; - bool get isDeleted => throw _privateConstructorUsedError; - bool get forceClose => throw _privateConstructorUsedError; - - @JsonKey(ignore: true) - $DocumentStateCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $DocumentStateCopyWith<$Res> { - factory $DocumentStateCopyWith( - DocumentState value, $Res Function(DocumentState) then) = - _$DocumentStateCopyWithImpl<$Res>; - $Res call( - {DocumentLoadingState loadingState, bool isDeleted, bool forceClose}); - - $DocumentLoadingStateCopyWith<$Res> get loadingState; -} - -/// @nodoc -class _$DocumentStateCopyWithImpl<$Res> - implements $DocumentStateCopyWith<$Res> { - _$DocumentStateCopyWithImpl(this._value, this._then); - - final DocumentState _value; - // ignore: unused_field - final $Res Function(DocumentState) _then; - - @override - $Res call({ - Object? loadingState = freezed, - Object? isDeleted = freezed, - Object? forceClose = freezed, - }) { - return _then(_value.copyWith( - loadingState: loadingState == freezed - ? _value.loadingState - : loadingState // ignore: cast_nullable_to_non_nullable - as DocumentLoadingState, - isDeleted: isDeleted == freezed - ? _value.isDeleted - : isDeleted // ignore: cast_nullable_to_non_nullable - as bool, - forceClose: forceClose == freezed - ? _value.forceClose - : forceClose // ignore: cast_nullable_to_non_nullable - as bool, - )); - } - - @override - $DocumentLoadingStateCopyWith<$Res> get loadingState { - return $DocumentLoadingStateCopyWith<$Res>(_value.loadingState, (value) { - return _then(_value.copyWith(loadingState: value)); - }); - } -} - -/// @nodoc -abstract class _$DocumentStateCopyWith<$Res> - implements $DocumentStateCopyWith<$Res> { - factory _$DocumentStateCopyWith( - _DocumentState value, $Res Function(_DocumentState) then) = - __$DocumentStateCopyWithImpl<$Res>; - @override - $Res call( - {DocumentLoadingState loadingState, bool isDeleted, bool forceClose}); - - @override - $DocumentLoadingStateCopyWith<$Res> get loadingState; -} - -/// @nodoc -class __$DocumentStateCopyWithImpl<$Res> - extends _$DocumentStateCopyWithImpl<$Res> - implements _$DocumentStateCopyWith<$Res> { - __$DocumentStateCopyWithImpl( - _DocumentState _value, $Res Function(_DocumentState) _then) - : super(_value, (v) => _then(v as _DocumentState)); - - @override - _DocumentState get _value => super._value as _DocumentState; - - @override - $Res call({ - Object? loadingState = freezed, - Object? isDeleted = freezed, - Object? forceClose = freezed, - }) { - return _then(_DocumentState( - loadingState: loadingState == freezed - ? _value.loadingState - : loadingState // ignore: cast_nullable_to_non_nullable - as DocumentLoadingState, - isDeleted: isDeleted == freezed - ? _value.isDeleted - : isDeleted // ignore: cast_nullable_to_non_nullable - as bool, - forceClose: forceClose == freezed - ? _value.forceClose - : forceClose // ignore: cast_nullable_to_non_nullable - as bool, - )); - } -} - -/// @nodoc - -class _$_DocumentState implements _DocumentState { - const _$_DocumentState( - {required this.loadingState, - required this.isDeleted, - required this.forceClose}); - - @override - final DocumentLoadingState loadingState; - @override - final bool isDeleted; - @override - final bool forceClose; - - @override - String toString() { - return 'DocumentState(loadingState: $loadingState, isDeleted: $isDeleted, forceClose: $forceClose)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other is _DocumentState && - (identical(other.loadingState, loadingState) || - const DeepCollectionEquality() - .equals(other.loadingState, loadingState)) && - (identical(other.isDeleted, isDeleted) || - const DeepCollectionEquality() - .equals(other.isDeleted, isDeleted)) && - (identical(other.forceClose, forceClose) || - const DeepCollectionEquality() - .equals(other.forceClose, forceClose))); - } - - @override - int get hashCode => - runtimeType.hashCode ^ - const DeepCollectionEquality().hash(loadingState) ^ - const DeepCollectionEquality().hash(isDeleted) ^ - const DeepCollectionEquality().hash(forceClose); - - @JsonKey(ignore: true) - @override - _$DocumentStateCopyWith<_DocumentState> get copyWith => - __$DocumentStateCopyWithImpl<_DocumentState>(this, _$identity); -} - -abstract class _DocumentState implements DocumentState { - const factory _DocumentState( - {required DocumentLoadingState loadingState, - required bool isDeleted, - required bool forceClose}) = _$_DocumentState; - - @override - DocumentLoadingState get loadingState => throw _privateConstructorUsedError; - @override - bool get isDeleted => throw _privateConstructorUsedError; - @override - bool get forceClose => throw _privateConstructorUsedError; - @override - @JsonKey(ignore: true) - _$DocumentStateCopyWith<_DocumentState> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -class _$DocumentLoadingStateTearOff { - const _$DocumentLoadingStateTearOff(); - - _Loading loading() { - return const _Loading(); - } - - _Finish finish(Either successOrFail) { - return _Finish( - successOrFail, - ); - } -} - -/// @nodoc -const $DocumentLoadingState = _$DocumentLoadingStateTearOff(); - -/// @nodoc -mixin _$DocumentLoadingState { - @optionalTypeArgs - TResult when({ - required TResult Function() loading, - required TResult Function(Either successOrFail) finish, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? loading, - TResult Function(Either successOrFail)? finish, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? loading, - TResult Function(Either successOrFail)? finish, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(_Loading value) loading, - required TResult Function(_Finish value) finish, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(_Loading value)? loading, - TResult Function(_Finish value)? finish, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(_Loading value)? loading, - TResult Function(_Finish value)? finish, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $DocumentLoadingStateCopyWith<$Res> { - factory $DocumentLoadingStateCopyWith(DocumentLoadingState value, - $Res Function(DocumentLoadingState) then) = - _$DocumentLoadingStateCopyWithImpl<$Res>; -} - -/// @nodoc -class _$DocumentLoadingStateCopyWithImpl<$Res> - implements $DocumentLoadingStateCopyWith<$Res> { - _$DocumentLoadingStateCopyWithImpl(this._value, this._then); - - final DocumentLoadingState _value; - // ignore: unused_field - final $Res Function(DocumentLoadingState) _then; -} - -/// @nodoc -abstract class _$LoadingCopyWith<$Res> { - factory _$LoadingCopyWith(_Loading value, $Res Function(_Loading) then) = - __$LoadingCopyWithImpl<$Res>; -} - -/// @nodoc -class __$LoadingCopyWithImpl<$Res> - extends _$DocumentLoadingStateCopyWithImpl<$Res> - implements _$LoadingCopyWith<$Res> { - __$LoadingCopyWithImpl(_Loading _value, $Res Function(_Loading) _then) - : super(_value, (v) => _then(v as _Loading)); - - @override - _Loading get _value => super._value as _Loading; -} - -/// @nodoc - -class _$_Loading implements _Loading { - const _$_Loading(); - - @override - String toString() { - return 'DocumentLoadingState.loading()'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || (other is _Loading); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() loading, - required TResult Function(Either successOrFail) finish, - }) { - return loading(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? loading, - TResult Function(Either successOrFail)? finish, - }) { - return loading?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? loading, - TResult Function(Either successOrFail)? finish, - required TResult orElse(), - }) { - if (loading != null) { - return loading(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(_Loading value) loading, - required TResult Function(_Finish value) finish, - }) { - return loading(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(_Loading value)? loading, - TResult Function(_Finish value)? finish, - }) { - return loading?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(_Loading value)? loading, - TResult Function(_Finish value)? finish, - required TResult orElse(), - }) { - if (loading != null) { - return loading(this); - } - return orElse(); - } -} - -abstract class _Loading implements DocumentLoadingState { - const factory _Loading() = _$_Loading; -} - -/// @nodoc -abstract class _$FinishCopyWith<$Res> { - factory _$FinishCopyWith(_Finish value, $Res Function(_Finish) then) = - __$FinishCopyWithImpl<$Res>; - $Res call({Either successOrFail}); -} - -/// @nodoc -class __$FinishCopyWithImpl<$Res> - extends _$DocumentLoadingStateCopyWithImpl<$Res> - implements _$FinishCopyWith<$Res> { - __$FinishCopyWithImpl(_Finish _value, $Res Function(_Finish) _then) - : super(_value, (v) => _then(v as _Finish)); - - @override - _Finish get _value => super._value as _Finish; - - @override - $Res call({ - Object? successOrFail = freezed, - }) { - return _then(_Finish( - successOrFail == freezed - ? _value.successOrFail - : successOrFail // ignore: cast_nullable_to_non_nullable - as Either, - )); - } -} - -/// @nodoc - -class _$_Finish implements _Finish { - const _$_Finish(this.successOrFail); - - @override - final Either successOrFail; - - @override - String toString() { - return 'DocumentLoadingState.finish(successOrFail: $successOrFail)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other is _Finish && - (identical(other.successOrFail, successOrFail) || - const DeepCollectionEquality() - .equals(other.successOrFail, successOrFail))); - } - - @override - int get hashCode => - runtimeType.hashCode ^ const DeepCollectionEquality().hash(successOrFail); - - @JsonKey(ignore: true) - @override - _$FinishCopyWith<_Finish> get copyWith => - __$FinishCopyWithImpl<_Finish>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() loading, - required TResult Function(Either successOrFail) finish, - }) { - return finish(successOrFail); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? loading, - TResult Function(Either successOrFail)? finish, - }) { - return finish?.call(successOrFail); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? loading, - TResult Function(Either successOrFail)? finish, - required TResult orElse(), - }) { - if (finish != null) { - return finish(successOrFail); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(_Loading value) loading, - required TResult Function(_Finish value) finish, - }) { - return finish(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(_Loading value)? loading, - TResult Function(_Finish value)? finish, - }) { - return finish?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(_Loading value)? loading, - TResult Function(_Finish value)? finish, - required TResult orElse(), - }) { - if (finish != null) { - return finish(this); - } - return orElse(); - } -} - -abstract class _Finish implements DocumentLoadingState { - const factory _Finish(Either successOrFail) = _$_Finish; - - Either get successOrFail => - throw _privateConstructorUsedError; - @JsonKey(ignore: true) - _$FinishCopyWith<_Finish> get copyWith => throw _privateConstructorUsedError; -} diff --git a/frontend/app_flowy/lib/workspace/application/menu/menu_bloc.freezed.dart b/frontend/app_flowy/lib/workspace/application/menu/menu_bloc.freezed.dart deleted file mode 100644 index 0eefbf12c8..0000000000 --- a/frontend/app_flowy/lib/workspace/application/menu/menu_bloc.freezed.dart +++ /dev/null @@ -1,1049 +0,0 @@ -// coverage:ignore-file -// GENERATED CODE - DO NOT MODIFY BY HAND -// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target - -part of 'menu_bloc.dart'; - -// ************************************************************************** -// FreezedGenerator -// ************************************************************************** - -T _$identity(T value) => value; - -final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more informations: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); - -/// @nodoc -class _$MenuEventTearOff { - const _$MenuEventTearOff(); - - _Initial initial() { - return const _Initial(); - } - - Collapse collapse() { - return const Collapse(); - } - - OpenPage openPage(HomeStackContext context) { - return OpenPage( - context, - ); - } - - CreateApp createApp(String name, {String? desc}) { - return CreateApp( - name, - desc: desc, - ); - } - - ReceiveApps didReceiveApps(Either, FlowyError> appsOrFail) { - return ReceiveApps( - appsOrFail, - ); - } -} - -/// @nodoc -const $MenuEvent = _$MenuEventTearOff(); - -/// @nodoc -mixin _$MenuEvent { - @optionalTypeArgs - TResult when({ - required TResult Function() initial, - required TResult Function() collapse, - required TResult Function(HomeStackContext context) - openPage, - required TResult Function(String name, String? desc) createApp, - required TResult Function(Either, FlowyError> appsOrFail) - didReceiveApps, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? initial, - TResult Function()? collapse, - TResult Function(HomeStackContext context)? openPage, - TResult Function(String name, String? desc)? createApp, - TResult Function(Either, FlowyError> appsOrFail)? didReceiveApps, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? initial, - TResult Function()? collapse, - TResult Function(HomeStackContext context)? openPage, - TResult Function(String name, String? desc)? createApp, - TResult Function(Either, FlowyError> appsOrFail)? didReceiveApps, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(_Initial value) initial, - required TResult Function(Collapse value) collapse, - required TResult Function(OpenPage value) openPage, - required TResult Function(CreateApp value) createApp, - required TResult Function(ReceiveApps value) didReceiveApps, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(_Initial value)? initial, - TResult Function(Collapse value)? collapse, - TResult Function(OpenPage value)? openPage, - TResult Function(CreateApp value)? createApp, - TResult Function(ReceiveApps value)? didReceiveApps, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(_Initial value)? initial, - TResult Function(Collapse value)? collapse, - TResult Function(OpenPage value)? openPage, - TResult Function(CreateApp value)? createApp, - TResult Function(ReceiveApps value)? didReceiveApps, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $MenuEventCopyWith<$Res> { - factory $MenuEventCopyWith(MenuEvent value, $Res Function(MenuEvent) then) = - _$MenuEventCopyWithImpl<$Res>; -} - -/// @nodoc -class _$MenuEventCopyWithImpl<$Res> implements $MenuEventCopyWith<$Res> { - _$MenuEventCopyWithImpl(this._value, this._then); - - final MenuEvent _value; - // ignore: unused_field - final $Res Function(MenuEvent) _then; -} - -/// @nodoc -abstract class _$InitialCopyWith<$Res> { - factory _$InitialCopyWith(_Initial value, $Res Function(_Initial) then) = - __$InitialCopyWithImpl<$Res>; -} - -/// @nodoc -class __$InitialCopyWithImpl<$Res> extends _$MenuEventCopyWithImpl<$Res> - implements _$InitialCopyWith<$Res> { - __$InitialCopyWithImpl(_Initial _value, $Res Function(_Initial) _then) - : super(_value, (v) => _then(v as _Initial)); - - @override - _Initial get _value => super._value as _Initial; -} - -/// @nodoc - -class _$_Initial implements _Initial { - const _$_Initial(); - - @override - String toString() { - return 'MenuEvent.initial()'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || (other is _Initial); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() initial, - required TResult Function() collapse, - required TResult Function(HomeStackContext context) - openPage, - required TResult Function(String name, String? desc) createApp, - required TResult Function(Either, FlowyError> appsOrFail) - didReceiveApps, - }) { - return initial(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? initial, - TResult Function()? collapse, - TResult Function(HomeStackContext context)? openPage, - TResult Function(String name, String? desc)? createApp, - TResult Function(Either, FlowyError> appsOrFail)? didReceiveApps, - }) { - return initial?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? initial, - TResult Function()? collapse, - TResult Function(HomeStackContext context)? openPage, - TResult Function(String name, String? desc)? createApp, - TResult Function(Either, FlowyError> appsOrFail)? didReceiveApps, - required TResult orElse(), - }) { - if (initial != null) { - return initial(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(_Initial value) initial, - required TResult Function(Collapse value) collapse, - required TResult Function(OpenPage value) openPage, - required TResult Function(CreateApp value) createApp, - required TResult Function(ReceiveApps value) didReceiveApps, - }) { - return initial(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(_Initial value)? initial, - TResult Function(Collapse value)? collapse, - TResult Function(OpenPage value)? openPage, - TResult Function(CreateApp value)? createApp, - TResult Function(ReceiveApps value)? didReceiveApps, - }) { - return initial?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(_Initial value)? initial, - TResult Function(Collapse value)? collapse, - TResult Function(OpenPage value)? openPage, - TResult Function(CreateApp value)? createApp, - TResult Function(ReceiveApps value)? didReceiveApps, - required TResult orElse(), - }) { - if (initial != null) { - return initial(this); - } - return orElse(); - } -} - -abstract class _Initial implements MenuEvent { - const factory _Initial() = _$_Initial; -} - -/// @nodoc -abstract class $CollapseCopyWith<$Res> { - factory $CollapseCopyWith(Collapse value, $Res Function(Collapse) then) = - _$CollapseCopyWithImpl<$Res>; -} - -/// @nodoc -class _$CollapseCopyWithImpl<$Res> extends _$MenuEventCopyWithImpl<$Res> - implements $CollapseCopyWith<$Res> { - _$CollapseCopyWithImpl(Collapse _value, $Res Function(Collapse) _then) - : super(_value, (v) => _then(v as Collapse)); - - @override - Collapse get _value => super._value as Collapse; -} - -/// @nodoc - -class _$Collapse implements Collapse { - const _$Collapse(); - - @override - String toString() { - return 'MenuEvent.collapse()'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || (other is Collapse); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() initial, - required TResult Function() collapse, - required TResult Function(HomeStackContext context) - openPage, - required TResult Function(String name, String? desc) createApp, - required TResult Function(Either, FlowyError> appsOrFail) - didReceiveApps, - }) { - return collapse(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? initial, - TResult Function()? collapse, - TResult Function(HomeStackContext context)? openPage, - TResult Function(String name, String? desc)? createApp, - TResult Function(Either, FlowyError> appsOrFail)? didReceiveApps, - }) { - return collapse?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? initial, - TResult Function()? collapse, - TResult Function(HomeStackContext context)? openPage, - TResult Function(String name, String? desc)? createApp, - TResult Function(Either, FlowyError> appsOrFail)? didReceiveApps, - required TResult orElse(), - }) { - if (collapse != null) { - return collapse(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(_Initial value) initial, - required TResult Function(Collapse value) collapse, - required TResult Function(OpenPage value) openPage, - required TResult Function(CreateApp value) createApp, - required TResult Function(ReceiveApps value) didReceiveApps, - }) { - return collapse(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(_Initial value)? initial, - TResult Function(Collapse value)? collapse, - TResult Function(OpenPage value)? openPage, - TResult Function(CreateApp value)? createApp, - TResult Function(ReceiveApps value)? didReceiveApps, - }) { - return collapse?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(_Initial value)? initial, - TResult Function(Collapse value)? collapse, - TResult Function(OpenPage value)? openPage, - TResult Function(CreateApp value)? createApp, - TResult Function(ReceiveApps value)? didReceiveApps, - required TResult orElse(), - }) { - if (collapse != null) { - return collapse(this); - } - return orElse(); - } -} - -abstract class Collapse implements MenuEvent { - const factory Collapse() = _$Collapse; -} - -/// @nodoc -abstract class $OpenPageCopyWith<$Res> { - factory $OpenPageCopyWith(OpenPage value, $Res Function(OpenPage) then) = - _$OpenPageCopyWithImpl<$Res>; - $Res call({HomeStackContext context}); -} - -/// @nodoc -class _$OpenPageCopyWithImpl<$Res> extends _$MenuEventCopyWithImpl<$Res> - implements $OpenPageCopyWith<$Res> { - _$OpenPageCopyWithImpl(OpenPage _value, $Res Function(OpenPage) _then) - : super(_value, (v) => _then(v as OpenPage)); - - @override - OpenPage get _value => super._value as OpenPage; - - @override - $Res call({ - Object? context = freezed, - }) { - return _then(OpenPage( - context == freezed - ? _value.context - : context // ignore: cast_nullable_to_non_nullable - as HomeStackContext, - )); - } -} - -/// @nodoc - -class _$OpenPage implements OpenPage { - const _$OpenPage(this.context); - - @override - final HomeStackContext context; - - @override - String toString() { - return 'MenuEvent.openPage(context: $context)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other is OpenPage && - (identical(other.context, context) || - const DeepCollectionEquality().equals(other.context, context))); - } - - @override - int get hashCode => - runtimeType.hashCode ^ const DeepCollectionEquality().hash(context); - - @JsonKey(ignore: true) - @override - $OpenPageCopyWith get copyWith => - _$OpenPageCopyWithImpl(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() initial, - required TResult Function() collapse, - required TResult Function(HomeStackContext context) - openPage, - required TResult Function(String name, String? desc) createApp, - required TResult Function(Either, FlowyError> appsOrFail) - didReceiveApps, - }) { - return openPage(context); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? initial, - TResult Function()? collapse, - TResult Function(HomeStackContext context)? openPage, - TResult Function(String name, String? desc)? createApp, - TResult Function(Either, FlowyError> appsOrFail)? didReceiveApps, - }) { - return openPage?.call(context); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? initial, - TResult Function()? collapse, - TResult Function(HomeStackContext context)? openPage, - TResult Function(String name, String? desc)? createApp, - TResult Function(Either, FlowyError> appsOrFail)? didReceiveApps, - required TResult orElse(), - }) { - if (openPage != null) { - return openPage(context); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(_Initial value) initial, - required TResult Function(Collapse value) collapse, - required TResult Function(OpenPage value) openPage, - required TResult Function(CreateApp value) createApp, - required TResult Function(ReceiveApps value) didReceiveApps, - }) { - return openPage(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(_Initial value)? initial, - TResult Function(Collapse value)? collapse, - TResult Function(OpenPage value)? openPage, - TResult Function(CreateApp value)? createApp, - TResult Function(ReceiveApps value)? didReceiveApps, - }) { - return openPage?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(_Initial value)? initial, - TResult Function(Collapse value)? collapse, - TResult Function(OpenPage value)? openPage, - TResult Function(CreateApp value)? createApp, - TResult Function(ReceiveApps value)? didReceiveApps, - required TResult orElse(), - }) { - if (openPage != null) { - return openPage(this); - } - return orElse(); - } -} - -abstract class OpenPage implements MenuEvent { - const factory OpenPage(HomeStackContext context) = - _$OpenPage; - - HomeStackContext get context => - throw _privateConstructorUsedError; - @JsonKey(ignore: true) - $OpenPageCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $CreateAppCopyWith<$Res> { - factory $CreateAppCopyWith(CreateApp value, $Res Function(CreateApp) then) = - _$CreateAppCopyWithImpl<$Res>; - $Res call({String name, String? desc}); -} - -/// @nodoc -class _$CreateAppCopyWithImpl<$Res> extends _$MenuEventCopyWithImpl<$Res> - implements $CreateAppCopyWith<$Res> { - _$CreateAppCopyWithImpl(CreateApp _value, $Res Function(CreateApp) _then) - : super(_value, (v) => _then(v as CreateApp)); - - @override - CreateApp get _value => super._value as CreateApp; - - @override - $Res call({ - Object? name = freezed, - Object? desc = freezed, - }) { - return _then(CreateApp( - name == freezed - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - desc: desc == freezed - ? _value.desc - : desc // ignore: cast_nullable_to_non_nullable - as String?, - )); - } -} - -/// @nodoc - -class _$CreateApp implements CreateApp { - const _$CreateApp(this.name, {this.desc}); - - @override - final String name; - @override - final String? desc; - - @override - String toString() { - return 'MenuEvent.createApp(name: $name, desc: $desc)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other is CreateApp && - (identical(other.name, name) || - const DeepCollectionEquality().equals(other.name, name)) && - (identical(other.desc, desc) || - const DeepCollectionEquality().equals(other.desc, desc))); - } - - @override - int get hashCode => - runtimeType.hashCode ^ - const DeepCollectionEquality().hash(name) ^ - const DeepCollectionEquality().hash(desc); - - @JsonKey(ignore: true) - @override - $CreateAppCopyWith get copyWith => - _$CreateAppCopyWithImpl(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() initial, - required TResult Function() collapse, - required TResult Function(HomeStackContext context) - openPage, - required TResult Function(String name, String? desc) createApp, - required TResult Function(Either, FlowyError> appsOrFail) - didReceiveApps, - }) { - return createApp(name, desc); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? initial, - TResult Function()? collapse, - TResult Function(HomeStackContext context)? openPage, - TResult Function(String name, String? desc)? createApp, - TResult Function(Either, FlowyError> appsOrFail)? didReceiveApps, - }) { - return createApp?.call(name, desc); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? initial, - TResult Function()? collapse, - TResult Function(HomeStackContext context)? openPage, - TResult Function(String name, String? desc)? createApp, - TResult Function(Either, FlowyError> appsOrFail)? didReceiveApps, - required TResult orElse(), - }) { - if (createApp != null) { - return createApp(name, desc); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(_Initial value) initial, - required TResult Function(Collapse value) collapse, - required TResult Function(OpenPage value) openPage, - required TResult Function(CreateApp value) createApp, - required TResult Function(ReceiveApps value) didReceiveApps, - }) { - return createApp(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(_Initial value)? initial, - TResult Function(Collapse value)? collapse, - TResult Function(OpenPage value)? openPage, - TResult Function(CreateApp value)? createApp, - TResult Function(ReceiveApps value)? didReceiveApps, - }) { - return createApp?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(_Initial value)? initial, - TResult Function(Collapse value)? collapse, - TResult Function(OpenPage value)? openPage, - TResult Function(CreateApp value)? createApp, - TResult Function(ReceiveApps value)? didReceiveApps, - required TResult orElse(), - }) { - if (createApp != null) { - return createApp(this); - } - return orElse(); - } -} - -abstract class CreateApp implements MenuEvent { - const factory CreateApp(String name, {String? desc}) = _$CreateApp; - - String get name => throw _privateConstructorUsedError; - String? get desc => throw _privateConstructorUsedError; - @JsonKey(ignore: true) - $CreateAppCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $ReceiveAppsCopyWith<$Res> { - factory $ReceiveAppsCopyWith( - ReceiveApps value, $Res Function(ReceiveApps) then) = - _$ReceiveAppsCopyWithImpl<$Res>; - $Res call({Either, FlowyError> appsOrFail}); -} - -/// @nodoc -class _$ReceiveAppsCopyWithImpl<$Res> extends _$MenuEventCopyWithImpl<$Res> - implements $ReceiveAppsCopyWith<$Res> { - _$ReceiveAppsCopyWithImpl( - ReceiveApps _value, $Res Function(ReceiveApps) _then) - : super(_value, (v) => _then(v as ReceiveApps)); - - @override - ReceiveApps get _value => super._value as ReceiveApps; - - @override - $Res call({ - Object? appsOrFail = freezed, - }) { - return _then(ReceiveApps( - appsOrFail == freezed - ? _value.appsOrFail - : appsOrFail // ignore: cast_nullable_to_non_nullable - as Either, FlowyError>, - )); - } -} - -/// @nodoc - -class _$ReceiveApps implements ReceiveApps { - const _$ReceiveApps(this.appsOrFail); - - @override - final Either, FlowyError> appsOrFail; - - @override - String toString() { - return 'MenuEvent.didReceiveApps(appsOrFail: $appsOrFail)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other is ReceiveApps && - (identical(other.appsOrFail, appsOrFail) || - const DeepCollectionEquality() - .equals(other.appsOrFail, appsOrFail))); - } - - @override - int get hashCode => - runtimeType.hashCode ^ const DeepCollectionEquality().hash(appsOrFail); - - @JsonKey(ignore: true) - @override - $ReceiveAppsCopyWith get copyWith => - _$ReceiveAppsCopyWithImpl(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() initial, - required TResult Function() collapse, - required TResult Function(HomeStackContext context) - openPage, - required TResult Function(String name, String? desc) createApp, - required TResult Function(Either, FlowyError> appsOrFail) - didReceiveApps, - }) { - return didReceiveApps(appsOrFail); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? initial, - TResult Function()? collapse, - TResult Function(HomeStackContext context)? openPage, - TResult Function(String name, String? desc)? createApp, - TResult Function(Either, FlowyError> appsOrFail)? didReceiveApps, - }) { - return didReceiveApps?.call(appsOrFail); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? initial, - TResult Function()? collapse, - TResult Function(HomeStackContext context)? openPage, - TResult Function(String name, String? desc)? createApp, - TResult Function(Either, FlowyError> appsOrFail)? didReceiveApps, - required TResult orElse(), - }) { - if (didReceiveApps != null) { - return didReceiveApps(appsOrFail); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(_Initial value) initial, - required TResult Function(Collapse value) collapse, - required TResult Function(OpenPage value) openPage, - required TResult Function(CreateApp value) createApp, - required TResult Function(ReceiveApps value) didReceiveApps, - }) { - return didReceiveApps(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(_Initial value)? initial, - TResult Function(Collapse value)? collapse, - TResult Function(OpenPage value)? openPage, - TResult Function(CreateApp value)? createApp, - TResult Function(ReceiveApps value)? didReceiveApps, - }) { - return didReceiveApps?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(_Initial value)? initial, - TResult Function(Collapse value)? collapse, - TResult Function(OpenPage value)? openPage, - TResult Function(CreateApp value)? createApp, - TResult Function(ReceiveApps value)? didReceiveApps, - required TResult orElse(), - }) { - if (didReceiveApps != null) { - return didReceiveApps(this); - } - return orElse(); - } -} - -abstract class ReceiveApps implements MenuEvent { - const factory ReceiveApps(Either, FlowyError> appsOrFail) = - _$ReceiveApps; - - Either, FlowyError> get appsOrFail => - throw _privateConstructorUsedError; - @JsonKey(ignore: true) - $ReceiveAppsCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -class _$MenuStateTearOff { - const _$MenuStateTearOff(); - - _MenuState call( - {required bool isCollapse, - required Option> apps, - required Either successOrFailure, - required HomeStackContext stackContext}) { - return _MenuState( - isCollapse: isCollapse, - apps: apps, - successOrFailure: successOrFailure, - stackContext: stackContext, - ); - } -} - -/// @nodoc -const $MenuState = _$MenuStateTearOff(); - -/// @nodoc -mixin _$MenuState { - bool get isCollapse => throw _privateConstructorUsedError; - Option> get apps => throw _privateConstructorUsedError; - Either get successOrFailure => - throw _privateConstructorUsedError; - HomeStackContext get stackContext => - throw _privateConstructorUsedError; - - @JsonKey(ignore: true) - $MenuStateCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $MenuStateCopyWith<$Res> { - factory $MenuStateCopyWith(MenuState value, $Res Function(MenuState) then) = - _$MenuStateCopyWithImpl<$Res>; - $Res call( - {bool isCollapse, - Option> apps, - Either successOrFailure, - HomeStackContext stackContext}); -} - -/// @nodoc -class _$MenuStateCopyWithImpl<$Res> implements $MenuStateCopyWith<$Res> { - _$MenuStateCopyWithImpl(this._value, this._then); - - final MenuState _value; - // ignore: unused_field - final $Res Function(MenuState) _then; - - @override - $Res call({ - Object? isCollapse = freezed, - Object? apps = freezed, - Object? successOrFailure = freezed, - Object? stackContext = freezed, - }) { - return _then(_value.copyWith( - isCollapse: isCollapse == freezed - ? _value.isCollapse - : isCollapse // ignore: cast_nullable_to_non_nullable - as bool, - apps: apps == freezed - ? _value.apps - : apps // ignore: cast_nullable_to_non_nullable - as Option>, - successOrFailure: successOrFailure == freezed - ? _value.successOrFailure - : successOrFailure // ignore: cast_nullable_to_non_nullable - as Either, - stackContext: stackContext == freezed - ? _value.stackContext - : stackContext // ignore: cast_nullable_to_non_nullable - as HomeStackContext, - )); - } -} - -/// @nodoc -abstract class _$MenuStateCopyWith<$Res> implements $MenuStateCopyWith<$Res> { - factory _$MenuStateCopyWith( - _MenuState value, $Res Function(_MenuState) then) = - __$MenuStateCopyWithImpl<$Res>; - @override - $Res call( - {bool isCollapse, - Option> apps, - Either successOrFailure, - HomeStackContext stackContext}); -} - -/// @nodoc -class __$MenuStateCopyWithImpl<$Res> extends _$MenuStateCopyWithImpl<$Res> - implements _$MenuStateCopyWith<$Res> { - __$MenuStateCopyWithImpl(_MenuState _value, $Res Function(_MenuState) _then) - : super(_value, (v) => _then(v as _MenuState)); - - @override - _MenuState get _value => super._value as _MenuState; - - @override - $Res call({ - Object? isCollapse = freezed, - Object? apps = freezed, - Object? successOrFailure = freezed, - Object? stackContext = freezed, - }) { - return _then(_MenuState( - isCollapse: isCollapse == freezed - ? _value.isCollapse - : isCollapse // ignore: cast_nullable_to_non_nullable - as bool, - apps: apps == freezed - ? _value.apps - : apps // ignore: cast_nullable_to_non_nullable - as Option>, - successOrFailure: successOrFailure == freezed - ? _value.successOrFailure - : successOrFailure // ignore: cast_nullable_to_non_nullable - as Either, - stackContext: stackContext == freezed - ? _value.stackContext - : stackContext // ignore: cast_nullable_to_non_nullable - as HomeStackContext, - )); - } -} - -/// @nodoc - -class _$_MenuState implements _MenuState { - const _$_MenuState( - {required this.isCollapse, - required this.apps, - required this.successOrFailure, - required this.stackContext}); - - @override - final bool isCollapse; - @override - final Option> apps; - @override - final Either successOrFailure; - @override - final HomeStackContext stackContext; - - @override - String toString() { - return 'MenuState(isCollapse: $isCollapse, apps: $apps, successOrFailure: $successOrFailure, stackContext: $stackContext)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other is _MenuState && - (identical(other.isCollapse, isCollapse) || - const DeepCollectionEquality() - .equals(other.isCollapse, isCollapse)) && - (identical(other.apps, apps) || - const DeepCollectionEquality().equals(other.apps, apps)) && - (identical(other.successOrFailure, successOrFailure) || - const DeepCollectionEquality() - .equals(other.successOrFailure, successOrFailure)) && - (identical(other.stackContext, stackContext) || - const DeepCollectionEquality() - .equals(other.stackContext, stackContext))); - } - - @override - int get hashCode => - runtimeType.hashCode ^ - const DeepCollectionEquality().hash(isCollapse) ^ - const DeepCollectionEquality().hash(apps) ^ - const DeepCollectionEquality().hash(successOrFailure) ^ - const DeepCollectionEquality().hash(stackContext); - - @JsonKey(ignore: true) - @override - _$MenuStateCopyWith<_MenuState> get copyWith => - __$MenuStateCopyWithImpl<_MenuState>(this, _$identity); -} - -abstract class _MenuState implements MenuState { - const factory _MenuState( - {required bool isCollapse, - required Option> apps, - required Either successOrFailure, - required HomeStackContext stackContext}) = _$_MenuState; - - @override - bool get isCollapse => throw _privateConstructorUsedError; - @override - Option> get apps => throw _privateConstructorUsedError; - @override - Either get successOrFailure => - throw _privateConstructorUsedError; - @override - HomeStackContext get stackContext => - throw _privateConstructorUsedError; - @override - @JsonKey(ignore: true) - _$MenuStateCopyWith<_MenuState> get copyWith => - throw _privateConstructorUsedError; -} diff --git a/frontend/app_flowy/lib/workspace/application/trash/trash_bloc.freezed.dart b/frontend/app_flowy/lib/workspace/application/trash/trash_bloc.freezed.dart deleted file mode 100644 index 2a2d9bcaa3..0000000000 --- a/frontend/app_flowy/lib/workspace/application/trash/trash_bloc.freezed.dart +++ /dev/null @@ -1,1129 +0,0 @@ -// coverage:ignore-file -// GENERATED CODE - DO NOT MODIFY BY HAND -// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target - -part of 'trash_bloc.dart'; - -// ************************************************************************** -// FreezedGenerator -// ************************************************************************** - -T _$identity(T value) => value; - -final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more informations: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); - -/// @nodoc -class _$TrashEventTearOff { - const _$TrashEventTearOff(); - - Initial initial() { - return const Initial(); - } - - ReceiveTrash didReceiveTrash(List trash) { - return ReceiveTrash( - trash, - ); - } - - Putback putback(String trashId) { - return Putback( - trashId, - ); - } - - Delete delete(Trash trash) { - return Delete( - trash, - ); - } - - RestoreAll restoreAll() { - return const RestoreAll(); - } - - DeleteAll deleteAll() { - return const DeleteAll(); - } -} - -/// @nodoc -const $TrashEvent = _$TrashEventTearOff(); - -/// @nodoc -mixin _$TrashEvent { - @optionalTypeArgs - TResult when({ - required TResult Function() initial, - required TResult Function(List trash) didReceiveTrash, - required TResult Function(String trashId) putback, - required TResult Function(Trash trash) delete, - required TResult Function() restoreAll, - required TResult Function() deleteAll, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? initial, - TResult Function(List trash)? didReceiveTrash, - TResult Function(String trashId)? putback, - TResult Function(Trash trash)? delete, - TResult Function()? restoreAll, - TResult Function()? deleteAll, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? initial, - TResult Function(List trash)? didReceiveTrash, - TResult Function(String trashId)? putback, - TResult Function(Trash trash)? delete, - TResult Function()? restoreAll, - TResult Function()? deleteAll, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(Initial value) initial, - required TResult Function(ReceiveTrash value) didReceiveTrash, - required TResult Function(Putback value) putback, - required TResult Function(Delete value) delete, - required TResult Function(RestoreAll value) restoreAll, - required TResult Function(DeleteAll value) deleteAll, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(Initial value)? initial, - TResult Function(ReceiveTrash value)? didReceiveTrash, - TResult Function(Putback value)? putback, - TResult Function(Delete value)? delete, - TResult Function(RestoreAll value)? restoreAll, - TResult Function(DeleteAll value)? deleteAll, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Initial value)? initial, - TResult Function(ReceiveTrash value)? didReceiveTrash, - TResult Function(Putback value)? putback, - TResult Function(Delete value)? delete, - TResult Function(RestoreAll value)? restoreAll, - TResult Function(DeleteAll value)? deleteAll, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $TrashEventCopyWith<$Res> { - factory $TrashEventCopyWith( - TrashEvent value, $Res Function(TrashEvent) then) = - _$TrashEventCopyWithImpl<$Res>; -} - -/// @nodoc -class _$TrashEventCopyWithImpl<$Res> implements $TrashEventCopyWith<$Res> { - _$TrashEventCopyWithImpl(this._value, this._then); - - final TrashEvent _value; - // ignore: unused_field - final $Res Function(TrashEvent) _then; -} - -/// @nodoc -abstract class $InitialCopyWith<$Res> { - factory $InitialCopyWith(Initial value, $Res Function(Initial) then) = - _$InitialCopyWithImpl<$Res>; -} - -/// @nodoc -class _$InitialCopyWithImpl<$Res> extends _$TrashEventCopyWithImpl<$Res> - implements $InitialCopyWith<$Res> { - _$InitialCopyWithImpl(Initial _value, $Res Function(Initial) _then) - : super(_value, (v) => _then(v as Initial)); - - @override - Initial get _value => super._value as Initial; -} - -/// @nodoc - -class _$Initial implements Initial { - const _$Initial(); - - @override - String toString() { - return 'TrashEvent.initial()'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || (other is Initial); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() initial, - required TResult Function(List trash) didReceiveTrash, - required TResult Function(String trashId) putback, - required TResult Function(Trash trash) delete, - required TResult Function() restoreAll, - required TResult Function() deleteAll, - }) { - return initial(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? initial, - TResult Function(List trash)? didReceiveTrash, - TResult Function(String trashId)? putback, - TResult Function(Trash trash)? delete, - TResult Function()? restoreAll, - TResult Function()? deleteAll, - }) { - return initial?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? initial, - TResult Function(List trash)? didReceiveTrash, - TResult Function(String trashId)? putback, - TResult Function(Trash trash)? delete, - TResult Function()? restoreAll, - TResult Function()? deleteAll, - required TResult orElse(), - }) { - if (initial != null) { - return initial(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Initial value) initial, - required TResult Function(ReceiveTrash value) didReceiveTrash, - required TResult Function(Putback value) putback, - required TResult Function(Delete value) delete, - required TResult Function(RestoreAll value) restoreAll, - required TResult Function(DeleteAll value) deleteAll, - }) { - return initial(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(Initial value)? initial, - TResult Function(ReceiveTrash value)? didReceiveTrash, - TResult Function(Putback value)? putback, - TResult Function(Delete value)? delete, - TResult Function(RestoreAll value)? restoreAll, - TResult Function(DeleteAll value)? deleteAll, - }) { - return initial?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Initial value)? initial, - TResult Function(ReceiveTrash value)? didReceiveTrash, - TResult Function(Putback value)? putback, - TResult Function(Delete value)? delete, - TResult Function(RestoreAll value)? restoreAll, - TResult Function(DeleteAll value)? deleteAll, - required TResult orElse(), - }) { - if (initial != null) { - return initial(this); - } - return orElse(); - } -} - -abstract class Initial implements TrashEvent { - const factory Initial() = _$Initial; -} - -/// @nodoc -abstract class $ReceiveTrashCopyWith<$Res> { - factory $ReceiveTrashCopyWith( - ReceiveTrash value, $Res Function(ReceiveTrash) then) = - _$ReceiveTrashCopyWithImpl<$Res>; - $Res call({List trash}); -} - -/// @nodoc -class _$ReceiveTrashCopyWithImpl<$Res> extends _$TrashEventCopyWithImpl<$Res> - implements $ReceiveTrashCopyWith<$Res> { - _$ReceiveTrashCopyWithImpl( - ReceiveTrash _value, $Res Function(ReceiveTrash) _then) - : super(_value, (v) => _then(v as ReceiveTrash)); - - @override - ReceiveTrash get _value => super._value as ReceiveTrash; - - @override - $Res call({ - Object? trash = freezed, - }) { - return _then(ReceiveTrash( - trash == freezed - ? _value.trash - : trash // ignore: cast_nullable_to_non_nullable - as List, - )); - } -} - -/// @nodoc - -class _$ReceiveTrash implements ReceiveTrash { - const _$ReceiveTrash(this.trash); - - @override - final List trash; - - @override - String toString() { - return 'TrashEvent.didReceiveTrash(trash: $trash)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other is ReceiveTrash && - (identical(other.trash, trash) || - const DeepCollectionEquality().equals(other.trash, trash))); - } - - @override - int get hashCode => - runtimeType.hashCode ^ const DeepCollectionEquality().hash(trash); - - @JsonKey(ignore: true) - @override - $ReceiveTrashCopyWith get copyWith => - _$ReceiveTrashCopyWithImpl(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() initial, - required TResult Function(List trash) didReceiveTrash, - required TResult Function(String trashId) putback, - required TResult Function(Trash trash) delete, - required TResult Function() restoreAll, - required TResult Function() deleteAll, - }) { - return didReceiveTrash(trash); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? initial, - TResult Function(List trash)? didReceiveTrash, - TResult Function(String trashId)? putback, - TResult Function(Trash trash)? delete, - TResult Function()? restoreAll, - TResult Function()? deleteAll, - }) { - return didReceiveTrash?.call(trash); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? initial, - TResult Function(List trash)? didReceiveTrash, - TResult Function(String trashId)? putback, - TResult Function(Trash trash)? delete, - TResult Function()? restoreAll, - TResult Function()? deleteAll, - required TResult orElse(), - }) { - if (didReceiveTrash != null) { - return didReceiveTrash(trash); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Initial value) initial, - required TResult Function(ReceiveTrash value) didReceiveTrash, - required TResult Function(Putback value) putback, - required TResult Function(Delete value) delete, - required TResult Function(RestoreAll value) restoreAll, - required TResult Function(DeleteAll value) deleteAll, - }) { - return didReceiveTrash(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(Initial value)? initial, - TResult Function(ReceiveTrash value)? didReceiveTrash, - TResult Function(Putback value)? putback, - TResult Function(Delete value)? delete, - TResult Function(RestoreAll value)? restoreAll, - TResult Function(DeleteAll value)? deleteAll, - }) { - return didReceiveTrash?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Initial value)? initial, - TResult Function(ReceiveTrash value)? didReceiveTrash, - TResult Function(Putback value)? putback, - TResult Function(Delete value)? delete, - TResult Function(RestoreAll value)? restoreAll, - TResult Function(DeleteAll value)? deleteAll, - required TResult orElse(), - }) { - if (didReceiveTrash != null) { - return didReceiveTrash(this); - } - return orElse(); - } -} - -abstract class ReceiveTrash implements TrashEvent { - const factory ReceiveTrash(List trash) = _$ReceiveTrash; - - List get trash => throw _privateConstructorUsedError; - @JsonKey(ignore: true) - $ReceiveTrashCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $PutbackCopyWith<$Res> { - factory $PutbackCopyWith(Putback value, $Res Function(Putback) then) = - _$PutbackCopyWithImpl<$Res>; - $Res call({String trashId}); -} - -/// @nodoc -class _$PutbackCopyWithImpl<$Res> extends _$TrashEventCopyWithImpl<$Res> - implements $PutbackCopyWith<$Res> { - _$PutbackCopyWithImpl(Putback _value, $Res Function(Putback) _then) - : super(_value, (v) => _then(v as Putback)); - - @override - Putback get _value => super._value as Putback; - - @override - $Res call({ - Object? trashId = freezed, - }) { - return _then(Putback( - trashId == freezed - ? _value.trashId - : trashId // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$Putback implements Putback { - const _$Putback(this.trashId); - - @override - final String trashId; - - @override - String toString() { - return 'TrashEvent.putback(trashId: $trashId)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other is Putback && - (identical(other.trashId, trashId) || - const DeepCollectionEquality().equals(other.trashId, trashId))); - } - - @override - int get hashCode => - runtimeType.hashCode ^ const DeepCollectionEquality().hash(trashId); - - @JsonKey(ignore: true) - @override - $PutbackCopyWith get copyWith => - _$PutbackCopyWithImpl(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() initial, - required TResult Function(List trash) didReceiveTrash, - required TResult Function(String trashId) putback, - required TResult Function(Trash trash) delete, - required TResult Function() restoreAll, - required TResult Function() deleteAll, - }) { - return putback(trashId); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? initial, - TResult Function(List trash)? didReceiveTrash, - TResult Function(String trashId)? putback, - TResult Function(Trash trash)? delete, - TResult Function()? restoreAll, - TResult Function()? deleteAll, - }) { - return putback?.call(trashId); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? initial, - TResult Function(List trash)? didReceiveTrash, - TResult Function(String trashId)? putback, - TResult Function(Trash trash)? delete, - TResult Function()? restoreAll, - TResult Function()? deleteAll, - required TResult orElse(), - }) { - if (putback != null) { - return putback(trashId); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Initial value) initial, - required TResult Function(ReceiveTrash value) didReceiveTrash, - required TResult Function(Putback value) putback, - required TResult Function(Delete value) delete, - required TResult Function(RestoreAll value) restoreAll, - required TResult Function(DeleteAll value) deleteAll, - }) { - return putback(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(Initial value)? initial, - TResult Function(ReceiveTrash value)? didReceiveTrash, - TResult Function(Putback value)? putback, - TResult Function(Delete value)? delete, - TResult Function(RestoreAll value)? restoreAll, - TResult Function(DeleteAll value)? deleteAll, - }) { - return putback?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Initial value)? initial, - TResult Function(ReceiveTrash value)? didReceiveTrash, - TResult Function(Putback value)? putback, - TResult Function(Delete value)? delete, - TResult Function(RestoreAll value)? restoreAll, - TResult Function(DeleteAll value)? deleteAll, - required TResult orElse(), - }) { - if (putback != null) { - return putback(this); - } - return orElse(); - } -} - -abstract class Putback implements TrashEvent { - const factory Putback(String trashId) = _$Putback; - - String get trashId => throw _privateConstructorUsedError; - @JsonKey(ignore: true) - $PutbackCopyWith get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $DeleteCopyWith<$Res> { - factory $DeleteCopyWith(Delete value, $Res Function(Delete) then) = - _$DeleteCopyWithImpl<$Res>; - $Res call({Trash trash}); -} - -/// @nodoc -class _$DeleteCopyWithImpl<$Res> extends _$TrashEventCopyWithImpl<$Res> - implements $DeleteCopyWith<$Res> { - _$DeleteCopyWithImpl(Delete _value, $Res Function(Delete) _then) - : super(_value, (v) => _then(v as Delete)); - - @override - Delete get _value => super._value as Delete; - - @override - $Res call({ - Object? trash = freezed, - }) { - return _then(Delete( - trash == freezed - ? _value.trash - : trash // ignore: cast_nullable_to_non_nullable - as Trash, - )); - } -} - -/// @nodoc - -class _$Delete implements Delete { - const _$Delete(this.trash); - - @override - final Trash trash; - - @override - String toString() { - return 'TrashEvent.delete(trash: $trash)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other is Delete && - (identical(other.trash, trash) || - const DeepCollectionEquality().equals(other.trash, trash))); - } - - @override - int get hashCode => - runtimeType.hashCode ^ const DeepCollectionEquality().hash(trash); - - @JsonKey(ignore: true) - @override - $DeleteCopyWith get copyWith => - _$DeleteCopyWithImpl(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() initial, - required TResult Function(List trash) didReceiveTrash, - required TResult Function(String trashId) putback, - required TResult Function(Trash trash) delete, - required TResult Function() restoreAll, - required TResult Function() deleteAll, - }) { - return delete(trash); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? initial, - TResult Function(List trash)? didReceiveTrash, - TResult Function(String trashId)? putback, - TResult Function(Trash trash)? delete, - TResult Function()? restoreAll, - TResult Function()? deleteAll, - }) { - return delete?.call(trash); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? initial, - TResult Function(List trash)? didReceiveTrash, - TResult Function(String trashId)? putback, - TResult Function(Trash trash)? delete, - TResult Function()? restoreAll, - TResult Function()? deleteAll, - required TResult orElse(), - }) { - if (delete != null) { - return delete(trash); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Initial value) initial, - required TResult Function(ReceiveTrash value) didReceiveTrash, - required TResult Function(Putback value) putback, - required TResult Function(Delete value) delete, - required TResult Function(RestoreAll value) restoreAll, - required TResult Function(DeleteAll value) deleteAll, - }) { - return delete(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(Initial value)? initial, - TResult Function(ReceiveTrash value)? didReceiveTrash, - TResult Function(Putback value)? putback, - TResult Function(Delete value)? delete, - TResult Function(RestoreAll value)? restoreAll, - TResult Function(DeleteAll value)? deleteAll, - }) { - return delete?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Initial value)? initial, - TResult Function(ReceiveTrash value)? didReceiveTrash, - TResult Function(Putback value)? putback, - TResult Function(Delete value)? delete, - TResult Function(RestoreAll value)? restoreAll, - TResult Function(DeleteAll value)? deleteAll, - required TResult orElse(), - }) { - if (delete != null) { - return delete(this); - } - return orElse(); - } -} - -abstract class Delete implements TrashEvent { - const factory Delete(Trash trash) = _$Delete; - - Trash get trash => throw _privateConstructorUsedError; - @JsonKey(ignore: true) - $DeleteCopyWith get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $RestoreAllCopyWith<$Res> { - factory $RestoreAllCopyWith( - RestoreAll value, $Res Function(RestoreAll) then) = - _$RestoreAllCopyWithImpl<$Res>; -} - -/// @nodoc -class _$RestoreAllCopyWithImpl<$Res> extends _$TrashEventCopyWithImpl<$Res> - implements $RestoreAllCopyWith<$Res> { - _$RestoreAllCopyWithImpl(RestoreAll _value, $Res Function(RestoreAll) _then) - : super(_value, (v) => _then(v as RestoreAll)); - - @override - RestoreAll get _value => super._value as RestoreAll; -} - -/// @nodoc - -class _$RestoreAll implements RestoreAll { - const _$RestoreAll(); - - @override - String toString() { - return 'TrashEvent.restoreAll()'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || (other is RestoreAll); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() initial, - required TResult Function(List trash) didReceiveTrash, - required TResult Function(String trashId) putback, - required TResult Function(Trash trash) delete, - required TResult Function() restoreAll, - required TResult Function() deleteAll, - }) { - return restoreAll(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? initial, - TResult Function(List trash)? didReceiveTrash, - TResult Function(String trashId)? putback, - TResult Function(Trash trash)? delete, - TResult Function()? restoreAll, - TResult Function()? deleteAll, - }) { - return restoreAll?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? initial, - TResult Function(List trash)? didReceiveTrash, - TResult Function(String trashId)? putback, - TResult Function(Trash trash)? delete, - TResult Function()? restoreAll, - TResult Function()? deleteAll, - required TResult orElse(), - }) { - if (restoreAll != null) { - return restoreAll(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Initial value) initial, - required TResult Function(ReceiveTrash value) didReceiveTrash, - required TResult Function(Putback value) putback, - required TResult Function(Delete value) delete, - required TResult Function(RestoreAll value) restoreAll, - required TResult Function(DeleteAll value) deleteAll, - }) { - return restoreAll(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(Initial value)? initial, - TResult Function(ReceiveTrash value)? didReceiveTrash, - TResult Function(Putback value)? putback, - TResult Function(Delete value)? delete, - TResult Function(RestoreAll value)? restoreAll, - TResult Function(DeleteAll value)? deleteAll, - }) { - return restoreAll?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Initial value)? initial, - TResult Function(ReceiveTrash value)? didReceiveTrash, - TResult Function(Putback value)? putback, - TResult Function(Delete value)? delete, - TResult Function(RestoreAll value)? restoreAll, - TResult Function(DeleteAll value)? deleteAll, - required TResult orElse(), - }) { - if (restoreAll != null) { - return restoreAll(this); - } - return orElse(); - } -} - -abstract class RestoreAll implements TrashEvent { - const factory RestoreAll() = _$RestoreAll; -} - -/// @nodoc -abstract class $DeleteAllCopyWith<$Res> { - factory $DeleteAllCopyWith(DeleteAll value, $Res Function(DeleteAll) then) = - _$DeleteAllCopyWithImpl<$Res>; -} - -/// @nodoc -class _$DeleteAllCopyWithImpl<$Res> extends _$TrashEventCopyWithImpl<$Res> - implements $DeleteAllCopyWith<$Res> { - _$DeleteAllCopyWithImpl(DeleteAll _value, $Res Function(DeleteAll) _then) - : super(_value, (v) => _then(v as DeleteAll)); - - @override - DeleteAll get _value => super._value as DeleteAll; -} - -/// @nodoc - -class _$DeleteAll implements DeleteAll { - const _$DeleteAll(); - - @override - String toString() { - return 'TrashEvent.deleteAll()'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || (other is DeleteAll); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() initial, - required TResult Function(List trash) didReceiveTrash, - required TResult Function(String trashId) putback, - required TResult Function(Trash trash) delete, - required TResult Function() restoreAll, - required TResult Function() deleteAll, - }) { - return deleteAll(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? initial, - TResult Function(List trash)? didReceiveTrash, - TResult Function(String trashId)? putback, - TResult Function(Trash trash)? delete, - TResult Function()? restoreAll, - TResult Function()? deleteAll, - }) { - return deleteAll?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? initial, - TResult Function(List trash)? didReceiveTrash, - TResult Function(String trashId)? putback, - TResult Function(Trash trash)? delete, - TResult Function()? restoreAll, - TResult Function()? deleteAll, - required TResult orElse(), - }) { - if (deleteAll != null) { - return deleteAll(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Initial value) initial, - required TResult Function(ReceiveTrash value) didReceiveTrash, - required TResult Function(Putback value) putback, - required TResult Function(Delete value) delete, - required TResult Function(RestoreAll value) restoreAll, - required TResult Function(DeleteAll value) deleteAll, - }) { - return deleteAll(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(Initial value)? initial, - TResult Function(ReceiveTrash value)? didReceiveTrash, - TResult Function(Putback value)? putback, - TResult Function(Delete value)? delete, - TResult Function(RestoreAll value)? restoreAll, - TResult Function(DeleteAll value)? deleteAll, - }) { - return deleteAll?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Initial value)? initial, - TResult Function(ReceiveTrash value)? didReceiveTrash, - TResult Function(Putback value)? putback, - TResult Function(Delete value)? delete, - TResult Function(RestoreAll value)? restoreAll, - TResult Function(DeleteAll value)? deleteAll, - required TResult orElse(), - }) { - if (deleteAll != null) { - return deleteAll(this); - } - return orElse(); - } -} - -abstract class DeleteAll implements TrashEvent { - const factory DeleteAll() = _$DeleteAll; -} - -/// @nodoc -class _$TrashStateTearOff { - const _$TrashStateTearOff(); - - _TrashState call( - {required List objects, - required Either successOrFailure}) { - return _TrashState( - objects: objects, - successOrFailure: successOrFailure, - ); - } -} - -/// @nodoc -const $TrashState = _$TrashStateTearOff(); - -/// @nodoc -mixin _$TrashState { - List get objects => throw _privateConstructorUsedError; - Either get successOrFailure => - throw _privateConstructorUsedError; - - @JsonKey(ignore: true) - $TrashStateCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $TrashStateCopyWith<$Res> { - factory $TrashStateCopyWith( - TrashState value, $Res Function(TrashState) then) = - _$TrashStateCopyWithImpl<$Res>; - $Res call({List objects, Either successOrFailure}); -} - -/// @nodoc -class _$TrashStateCopyWithImpl<$Res> implements $TrashStateCopyWith<$Res> { - _$TrashStateCopyWithImpl(this._value, this._then); - - final TrashState _value; - // ignore: unused_field - final $Res Function(TrashState) _then; - - @override - $Res call({ - Object? objects = freezed, - Object? successOrFailure = freezed, - }) { - return _then(_value.copyWith( - objects: objects == freezed - ? _value.objects - : objects // ignore: cast_nullable_to_non_nullable - as List, - successOrFailure: successOrFailure == freezed - ? _value.successOrFailure - : successOrFailure // ignore: cast_nullable_to_non_nullable - as Either, - )); - } -} - -/// @nodoc -abstract class _$TrashStateCopyWith<$Res> implements $TrashStateCopyWith<$Res> { - factory _$TrashStateCopyWith( - _TrashState value, $Res Function(_TrashState) then) = - __$TrashStateCopyWithImpl<$Res>; - @override - $Res call({List objects, Either successOrFailure}); -} - -/// @nodoc -class __$TrashStateCopyWithImpl<$Res> extends _$TrashStateCopyWithImpl<$Res> - implements _$TrashStateCopyWith<$Res> { - __$TrashStateCopyWithImpl( - _TrashState _value, $Res Function(_TrashState) _then) - : super(_value, (v) => _then(v as _TrashState)); - - @override - _TrashState get _value => super._value as _TrashState; - - @override - $Res call({ - Object? objects = freezed, - Object? successOrFailure = freezed, - }) { - return _then(_TrashState( - objects: objects == freezed - ? _value.objects - : objects // ignore: cast_nullable_to_non_nullable - as List, - successOrFailure: successOrFailure == freezed - ? _value.successOrFailure - : successOrFailure // ignore: cast_nullable_to_non_nullable - as Either, - )); - } -} - -/// @nodoc - -class _$_TrashState implements _TrashState { - const _$_TrashState({required this.objects, required this.successOrFailure}); - - @override - final List objects; - @override - final Either successOrFailure; - - @override - String toString() { - return 'TrashState(objects: $objects, successOrFailure: $successOrFailure)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other is _TrashState && - (identical(other.objects, objects) || - const DeepCollectionEquality() - .equals(other.objects, objects)) && - (identical(other.successOrFailure, successOrFailure) || - const DeepCollectionEquality() - .equals(other.successOrFailure, successOrFailure))); - } - - @override - int get hashCode => - runtimeType.hashCode ^ - const DeepCollectionEquality().hash(objects) ^ - const DeepCollectionEquality().hash(successOrFailure); - - @JsonKey(ignore: true) - @override - _$TrashStateCopyWith<_TrashState> get copyWith => - __$TrashStateCopyWithImpl<_TrashState>(this, _$identity); -} - -abstract class _TrashState implements TrashState { - const factory _TrashState( - {required List objects, - required Either successOrFailure}) = _$_TrashState; - - @override - List get objects => throw _privateConstructorUsedError; - @override - Either get successOrFailure => - throw _privateConstructorUsedError; - @override - @JsonKey(ignore: true) - _$TrashStateCopyWith<_TrashState> get copyWith => - throw _privateConstructorUsedError; -} diff --git a/frontend/app_flowy/lib/workspace/application/view/view_bloc.freezed.dart b/frontend/app_flowy/lib/workspace/application/view/view_bloc.freezed.dart deleted file mode 100644 index 51729bca73..0000000000 --- a/frontend/app_flowy/lib/workspace/application/view/view_bloc.freezed.dart +++ /dev/null @@ -1,1155 +0,0 @@ -// coverage:ignore-file -// GENERATED CODE - DO NOT MODIFY BY HAND -// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target - -part of 'view_bloc.dart'; - -// ************************************************************************** -// FreezedGenerator -// ************************************************************************** - -T _$identity(T value) => value; - -final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more informations: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); - -/// @nodoc -class _$ViewEventTearOff { - const _$ViewEventTearOff(); - - Initial initial() { - return const Initial(); - } - - SetEditing setIsEditing(bool isEditing) { - return SetEditing( - isEditing, - ); - } - - Rename rename(String newName) { - return Rename( - newName, - ); - } - - Delete delete() { - return const Delete(); - } - - Duplicate duplicate() { - return const Duplicate(); - } - - ViewDidUpdate viewDidUpdate(Either result) { - return ViewDidUpdate( - result, - ); - } -} - -/// @nodoc -const $ViewEvent = _$ViewEventTearOff(); - -/// @nodoc -mixin _$ViewEvent { - @optionalTypeArgs - TResult when({ - required TResult Function() initial, - required TResult Function(bool isEditing) setIsEditing, - required TResult Function(String newName) rename, - required TResult Function() delete, - required TResult Function() duplicate, - required TResult Function(Either result) viewDidUpdate, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? initial, - TResult Function(bool isEditing)? setIsEditing, - TResult Function(String newName)? rename, - TResult Function()? delete, - TResult Function()? duplicate, - TResult Function(Either result)? viewDidUpdate, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? initial, - TResult Function(bool isEditing)? setIsEditing, - TResult Function(String newName)? rename, - TResult Function()? delete, - TResult Function()? duplicate, - TResult Function(Either result)? viewDidUpdate, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(Initial value) initial, - required TResult Function(SetEditing value) setIsEditing, - required TResult Function(Rename value) rename, - required TResult Function(Delete value) delete, - required TResult Function(Duplicate value) duplicate, - required TResult Function(ViewDidUpdate value) viewDidUpdate, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(Initial value)? initial, - TResult Function(SetEditing value)? setIsEditing, - TResult Function(Rename value)? rename, - TResult Function(Delete value)? delete, - TResult Function(Duplicate value)? duplicate, - TResult Function(ViewDidUpdate value)? viewDidUpdate, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Initial value)? initial, - TResult Function(SetEditing value)? setIsEditing, - TResult Function(Rename value)? rename, - TResult Function(Delete value)? delete, - TResult Function(Duplicate value)? duplicate, - TResult Function(ViewDidUpdate value)? viewDidUpdate, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $ViewEventCopyWith<$Res> { - factory $ViewEventCopyWith(ViewEvent value, $Res Function(ViewEvent) then) = - _$ViewEventCopyWithImpl<$Res>; -} - -/// @nodoc -class _$ViewEventCopyWithImpl<$Res> implements $ViewEventCopyWith<$Res> { - _$ViewEventCopyWithImpl(this._value, this._then); - - final ViewEvent _value; - // ignore: unused_field - final $Res Function(ViewEvent) _then; -} - -/// @nodoc -abstract class $InitialCopyWith<$Res> { - factory $InitialCopyWith(Initial value, $Res Function(Initial) then) = - _$InitialCopyWithImpl<$Res>; -} - -/// @nodoc -class _$InitialCopyWithImpl<$Res> extends _$ViewEventCopyWithImpl<$Res> - implements $InitialCopyWith<$Res> { - _$InitialCopyWithImpl(Initial _value, $Res Function(Initial) _then) - : super(_value, (v) => _then(v as Initial)); - - @override - Initial get _value => super._value as Initial; -} - -/// @nodoc - -class _$Initial implements Initial { - const _$Initial(); - - @override - String toString() { - return 'ViewEvent.initial()'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || (other is Initial); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() initial, - required TResult Function(bool isEditing) setIsEditing, - required TResult Function(String newName) rename, - required TResult Function() delete, - required TResult Function() duplicate, - required TResult Function(Either result) viewDidUpdate, - }) { - return initial(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? initial, - TResult Function(bool isEditing)? setIsEditing, - TResult Function(String newName)? rename, - TResult Function()? delete, - TResult Function()? duplicate, - TResult Function(Either result)? viewDidUpdate, - }) { - return initial?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? initial, - TResult Function(bool isEditing)? setIsEditing, - TResult Function(String newName)? rename, - TResult Function()? delete, - TResult Function()? duplicate, - TResult Function(Either result)? viewDidUpdate, - required TResult orElse(), - }) { - if (initial != null) { - return initial(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Initial value) initial, - required TResult Function(SetEditing value) setIsEditing, - required TResult Function(Rename value) rename, - required TResult Function(Delete value) delete, - required TResult Function(Duplicate value) duplicate, - required TResult Function(ViewDidUpdate value) viewDidUpdate, - }) { - return initial(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(Initial value)? initial, - TResult Function(SetEditing value)? setIsEditing, - TResult Function(Rename value)? rename, - TResult Function(Delete value)? delete, - TResult Function(Duplicate value)? duplicate, - TResult Function(ViewDidUpdate value)? viewDidUpdate, - }) { - return initial?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Initial value)? initial, - TResult Function(SetEditing value)? setIsEditing, - TResult Function(Rename value)? rename, - TResult Function(Delete value)? delete, - TResult Function(Duplicate value)? duplicate, - TResult Function(ViewDidUpdate value)? viewDidUpdate, - required TResult orElse(), - }) { - if (initial != null) { - return initial(this); - } - return orElse(); - } -} - -abstract class Initial implements ViewEvent { - const factory Initial() = _$Initial; -} - -/// @nodoc -abstract class $SetEditingCopyWith<$Res> { - factory $SetEditingCopyWith( - SetEditing value, $Res Function(SetEditing) then) = - _$SetEditingCopyWithImpl<$Res>; - $Res call({bool isEditing}); -} - -/// @nodoc -class _$SetEditingCopyWithImpl<$Res> extends _$ViewEventCopyWithImpl<$Res> - implements $SetEditingCopyWith<$Res> { - _$SetEditingCopyWithImpl(SetEditing _value, $Res Function(SetEditing) _then) - : super(_value, (v) => _then(v as SetEditing)); - - @override - SetEditing get _value => super._value as SetEditing; - - @override - $Res call({ - Object? isEditing = freezed, - }) { - return _then(SetEditing( - isEditing == freezed - ? _value.isEditing - : isEditing // ignore: cast_nullable_to_non_nullable - as bool, - )); - } -} - -/// @nodoc - -class _$SetEditing implements SetEditing { - const _$SetEditing(this.isEditing); - - @override - final bool isEditing; - - @override - String toString() { - return 'ViewEvent.setIsEditing(isEditing: $isEditing)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other is SetEditing && - (identical(other.isEditing, isEditing) || - const DeepCollectionEquality() - .equals(other.isEditing, isEditing))); - } - - @override - int get hashCode => - runtimeType.hashCode ^ const DeepCollectionEquality().hash(isEditing); - - @JsonKey(ignore: true) - @override - $SetEditingCopyWith get copyWith => - _$SetEditingCopyWithImpl(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() initial, - required TResult Function(bool isEditing) setIsEditing, - required TResult Function(String newName) rename, - required TResult Function() delete, - required TResult Function() duplicate, - required TResult Function(Either result) viewDidUpdate, - }) { - return setIsEditing(isEditing); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? initial, - TResult Function(bool isEditing)? setIsEditing, - TResult Function(String newName)? rename, - TResult Function()? delete, - TResult Function()? duplicate, - TResult Function(Either result)? viewDidUpdate, - }) { - return setIsEditing?.call(isEditing); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? initial, - TResult Function(bool isEditing)? setIsEditing, - TResult Function(String newName)? rename, - TResult Function()? delete, - TResult Function()? duplicate, - TResult Function(Either result)? viewDidUpdate, - required TResult orElse(), - }) { - if (setIsEditing != null) { - return setIsEditing(isEditing); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Initial value) initial, - required TResult Function(SetEditing value) setIsEditing, - required TResult Function(Rename value) rename, - required TResult Function(Delete value) delete, - required TResult Function(Duplicate value) duplicate, - required TResult Function(ViewDidUpdate value) viewDidUpdate, - }) { - return setIsEditing(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(Initial value)? initial, - TResult Function(SetEditing value)? setIsEditing, - TResult Function(Rename value)? rename, - TResult Function(Delete value)? delete, - TResult Function(Duplicate value)? duplicate, - TResult Function(ViewDidUpdate value)? viewDidUpdate, - }) { - return setIsEditing?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Initial value)? initial, - TResult Function(SetEditing value)? setIsEditing, - TResult Function(Rename value)? rename, - TResult Function(Delete value)? delete, - TResult Function(Duplicate value)? duplicate, - TResult Function(ViewDidUpdate value)? viewDidUpdate, - required TResult orElse(), - }) { - if (setIsEditing != null) { - return setIsEditing(this); - } - return orElse(); - } -} - -abstract class SetEditing implements ViewEvent { - const factory SetEditing(bool isEditing) = _$SetEditing; - - bool get isEditing => throw _privateConstructorUsedError; - @JsonKey(ignore: true) - $SetEditingCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $RenameCopyWith<$Res> { - factory $RenameCopyWith(Rename value, $Res Function(Rename) then) = - _$RenameCopyWithImpl<$Res>; - $Res call({String newName}); -} - -/// @nodoc -class _$RenameCopyWithImpl<$Res> extends _$ViewEventCopyWithImpl<$Res> - implements $RenameCopyWith<$Res> { - _$RenameCopyWithImpl(Rename _value, $Res Function(Rename) _then) - : super(_value, (v) => _then(v as Rename)); - - @override - Rename get _value => super._value as Rename; - - @override - $Res call({ - Object? newName = freezed, - }) { - return _then(Rename( - newName == freezed - ? _value.newName - : newName // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$Rename implements Rename { - const _$Rename(this.newName); - - @override - final String newName; - - @override - String toString() { - return 'ViewEvent.rename(newName: $newName)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other is Rename && - (identical(other.newName, newName) || - const DeepCollectionEquality().equals(other.newName, newName))); - } - - @override - int get hashCode => - runtimeType.hashCode ^ const DeepCollectionEquality().hash(newName); - - @JsonKey(ignore: true) - @override - $RenameCopyWith get copyWith => - _$RenameCopyWithImpl(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() initial, - required TResult Function(bool isEditing) setIsEditing, - required TResult Function(String newName) rename, - required TResult Function() delete, - required TResult Function() duplicate, - required TResult Function(Either result) viewDidUpdate, - }) { - return rename(newName); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? initial, - TResult Function(bool isEditing)? setIsEditing, - TResult Function(String newName)? rename, - TResult Function()? delete, - TResult Function()? duplicate, - TResult Function(Either result)? viewDidUpdate, - }) { - return rename?.call(newName); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? initial, - TResult Function(bool isEditing)? setIsEditing, - TResult Function(String newName)? rename, - TResult Function()? delete, - TResult Function()? duplicate, - TResult Function(Either result)? viewDidUpdate, - required TResult orElse(), - }) { - if (rename != null) { - return rename(newName); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Initial value) initial, - required TResult Function(SetEditing value) setIsEditing, - required TResult Function(Rename value) rename, - required TResult Function(Delete value) delete, - required TResult Function(Duplicate value) duplicate, - required TResult Function(ViewDidUpdate value) viewDidUpdate, - }) { - return rename(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(Initial value)? initial, - TResult Function(SetEditing value)? setIsEditing, - TResult Function(Rename value)? rename, - TResult Function(Delete value)? delete, - TResult Function(Duplicate value)? duplicate, - TResult Function(ViewDidUpdate value)? viewDidUpdate, - }) { - return rename?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Initial value)? initial, - TResult Function(SetEditing value)? setIsEditing, - TResult Function(Rename value)? rename, - TResult Function(Delete value)? delete, - TResult Function(Duplicate value)? duplicate, - TResult Function(ViewDidUpdate value)? viewDidUpdate, - required TResult orElse(), - }) { - if (rename != null) { - return rename(this); - } - return orElse(); - } -} - -abstract class Rename implements ViewEvent { - const factory Rename(String newName) = _$Rename; - - String get newName => throw _privateConstructorUsedError; - @JsonKey(ignore: true) - $RenameCopyWith get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $DeleteCopyWith<$Res> { - factory $DeleteCopyWith(Delete value, $Res Function(Delete) then) = - _$DeleteCopyWithImpl<$Res>; -} - -/// @nodoc -class _$DeleteCopyWithImpl<$Res> extends _$ViewEventCopyWithImpl<$Res> - implements $DeleteCopyWith<$Res> { - _$DeleteCopyWithImpl(Delete _value, $Res Function(Delete) _then) - : super(_value, (v) => _then(v as Delete)); - - @override - Delete get _value => super._value as Delete; -} - -/// @nodoc - -class _$Delete implements Delete { - const _$Delete(); - - @override - String toString() { - return 'ViewEvent.delete()'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || (other is Delete); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() initial, - required TResult Function(bool isEditing) setIsEditing, - required TResult Function(String newName) rename, - required TResult Function() delete, - required TResult Function() duplicate, - required TResult Function(Either result) viewDidUpdate, - }) { - return delete(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? initial, - TResult Function(bool isEditing)? setIsEditing, - TResult Function(String newName)? rename, - TResult Function()? delete, - TResult Function()? duplicate, - TResult Function(Either result)? viewDidUpdate, - }) { - return delete?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? initial, - TResult Function(bool isEditing)? setIsEditing, - TResult Function(String newName)? rename, - TResult Function()? delete, - TResult Function()? duplicate, - TResult Function(Either result)? viewDidUpdate, - required TResult orElse(), - }) { - if (delete != null) { - return delete(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Initial value) initial, - required TResult Function(SetEditing value) setIsEditing, - required TResult Function(Rename value) rename, - required TResult Function(Delete value) delete, - required TResult Function(Duplicate value) duplicate, - required TResult Function(ViewDidUpdate value) viewDidUpdate, - }) { - return delete(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(Initial value)? initial, - TResult Function(SetEditing value)? setIsEditing, - TResult Function(Rename value)? rename, - TResult Function(Delete value)? delete, - TResult Function(Duplicate value)? duplicate, - TResult Function(ViewDidUpdate value)? viewDidUpdate, - }) { - return delete?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Initial value)? initial, - TResult Function(SetEditing value)? setIsEditing, - TResult Function(Rename value)? rename, - TResult Function(Delete value)? delete, - TResult Function(Duplicate value)? duplicate, - TResult Function(ViewDidUpdate value)? viewDidUpdate, - required TResult orElse(), - }) { - if (delete != null) { - return delete(this); - } - return orElse(); - } -} - -abstract class Delete implements ViewEvent { - const factory Delete() = _$Delete; -} - -/// @nodoc -abstract class $DuplicateCopyWith<$Res> { - factory $DuplicateCopyWith(Duplicate value, $Res Function(Duplicate) then) = - _$DuplicateCopyWithImpl<$Res>; -} - -/// @nodoc -class _$DuplicateCopyWithImpl<$Res> extends _$ViewEventCopyWithImpl<$Res> - implements $DuplicateCopyWith<$Res> { - _$DuplicateCopyWithImpl(Duplicate _value, $Res Function(Duplicate) _then) - : super(_value, (v) => _then(v as Duplicate)); - - @override - Duplicate get _value => super._value as Duplicate; -} - -/// @nodoc - -class _$Duplicate implements Duplicate { - const _$Duplicate(); - - @override - String toString() { - return 'ViewEvent.duplicate()'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || (other is Duplicate); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() initial, - required TResult Function(bool isEditing) setIsEditing, - required TResult Function(String newName) rename, - required TResult Function() delete, - required TResult Function() duplicate, - required TResult Function(Either result) viewDidUpdate, - }) { - return duplicate(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? initial, - TResult Function(bool isEditing)? setIsEditing, - TResult Function(String newName)? rename, - TResult Function()? delete, - TResult Function()? duplicate, - TResult Function(Either result)? viewDidUpdate, - }) { - return duplicate?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? initial, - TResult Function(bool isEditing)? setIsEditing, - TResult Function(String newName)? rename, - TResult Function()? delete, - TResult Function()? duplicate, - TResult Function(Either result)? viewDidUpdate, - required TResult orElse(), - }) { - if (duplicate != null) { - return duplicate(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Initial value) initial, - required TResult Function(SetEditing value) setIsEditing, - required TResult Function(Rename value) rename, - required TResult Function(Delete value) delete, - required TResult Function(Duplicate value) duplicate, - required TResult Function(ViewDidUpdate value) viewDidUpdate, - }) { - return duplicate(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(Initial value)? initial, - TResult Function(SetEditing value)? setIsEditing, - TResult Function(Rename value)? rename, - TResult Function(Delete value)? delete, - TResult Function(Duplicate value)? duplicate, - TResult Function(ViewDidUpdate value)? viewDidUpdate, - }) { - return duplicate?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Initial value)? initial, - TResult Function(SetEditing value)? setIsEditing, - TResult Function(Rename value)? rename, - TResult Function(Delete value)? delete, - TResult Function(Duplicate value)? duplicate, - TResult Function(ViewDidUpdate value)? viewDidUpdate, - required TResult orElse(), - }) { - if (duplicate != null) { - return duplicate(this); - } - return orElse(); - } -} - -abstract class Duplicate implements ViewEvent { - const factory Duplicate() = _$Duplicate; -} - -/// @nodoc -abstract class $ViewDidUpdateCopyWith<$Res> { - factory $ViewDidUpdateCopyWith( - ViewDidUpdate value, $Res Function(ViewDidUpdate) then) = - _$ViewDidUpdateCopyWithImpl<$Res>; - $Res call({Either result}); -} - -/// @nodoc -class _$ViewDidUpdateCopyWithImpl<$Res> extends _$ViewEventCopyWithImpl<$Res> - implements $ViewDidUpdateCopyWith<$Res> { - _$ViewDidUpdateCopyWithImpl( - ViewDidUpdate _value, $Res Function(ViewDidUpdate) _then) - : super(_value, (v) => _then(v as ViewDidUpdate)); - - @override - ViewDidUpdate get _value => super._value as ViewDidUpdate; - - @override - $Res call({ - Object? result = freezed, - }) { - return _then(ViewDidUpdate( - result == freezed - ? _value.result - : result // ignore: cast_nullable_to_non_nullable - as Either, - )); - } -} - -/// @nodoc - -class _$ViewDidUpdate implements ViewDidUpdate { - const _$ViewDidUpdate(this.result); - - @override - final Either result; - - @override - String toString() { - return 'ViewEvent.viewDidUpdate(result: $result)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other is ViewDidUpdate && - (identical(other.result, result) || - const DeepCollectionEquality().equals(other.result, result))); - } - - @override - int get hashCode => - runtimeType.hashCode ^ const DeepCollectionEquality().hash(result); - - @JsonKey(ignore: true) - @override - $ViewDidUpdateCopyWith get copyWith => - _$ViewDidUpdateCopyWithImpl(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() initial, - required TResult Function(bool isEditing) setIsEditing, - required TResult Function(String newName) rename, - required TResult Function() delete, - required TResult Function() duplicate, - required TResult Function(Either result) viewDidUpdate, - }) { - return viewDidUpdate(result); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? initial, - TResult Function(bool isEditing)? setIsEditing, - TResult Function(String newName)? rename, - TResult Function()? delete, - TResult Function()? duplicate, - TResult Function(Either result)? viewDidUpdate, - }) { - return viewDidUpdate?.call(result); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? initial, - TResult Function(bool isEditing)? setIsEditing, - TResult Function(String newName)? rename, - TResult Function()? delete, - TResult Function()? duplicate, - TResult Function(Either result)? viewDidUpdate, - required TResult orElse(), - }) { - if (viewDidUpdate != null) { - return viewDidUpdate(result); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Initial value) initial, - required TResult Function(SetEditing value) setIsEditing, - required TResult Function(Rename value) rename, - required TResult Function(Delete value) delete, - required TResult Function(Duplicate value) duplicate, - required TResult Function(ViewDidUpdate value) viewDidUpdate, - }) { - return viewDidUpdate(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(Initial value)? initial, - TResult Function(SetEditing value)? setIsEditing, - TResult Function(Rename value)? rename, - TResult Function(Delete value)? delete, - TResult Function(Duplicate value)? duplicate, - TResult Function(ViewDidUpdate value)? viewDidUpdate, - }) { - return viewDidUpdate?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Initial value)? initial, - TResult Function(SetEditing value)? setIsEditing, - TResult Function(Rename value)? rename, - TResult Function(Delete value)? delete, - TResult Function(Duplicate value)? duplicate, - TResult Function(ViewDidUpdate value)? viewDidUpdate, - required TResult orElse(), - }) { - if (viewDidUpdate != null) { - return viewDidUpdate(this); - } - return orElse(); - } -} - -abstract class ViewDidUpdate implements ViewEvent { - const factory ViewDidUpdate(Either result) = - _$ViewDidUpdate; - - Either get result => throw _privateConstructorUsedError; - @JsonKey(ignore: true) - $ViewDidUpdateCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -class _$ViewStateTearOff { - const _$ViewStateTearOff(); - - _ViewState call( - {required View view, - required bool isEditing, - required Either successOrFailure}) { - return _ViewState( - view: view, - isEditing: isEditing, - successOrFailure: successOrFailure, - ); - } -} - -/// @nodoc -const $ViewState = _$ViewStateTearOff(); - -/// @nodoc -mixin _$ViewState { - View get view => throw _privateConstructorUsedError; - bool get isEditing => throw _privateConstructorUsedError; - Either get successOrFailure => - throw _privateConstructorUsedError; - - @JsonKey(ignore: true) - $ViewStateCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $ViewStateCopyWith<$Res> { - factory $ViewStateCopyWith(ViewState value, $Res Function(ViewState) then) = - _$ViewStateCopyWithImpl<$Res>; - $Res call( - {View view, bool isEditing, Either successOrFailure}); -} - -/// @nodoc -class _$ViewStateCopyWithImpl<$Res> implements $ViewStateCopyWith<$Res> { - _$ViewStateCopyWithImpl(this._value, this._then); - - final ViewState _value; - // ignore: unused_field - final $Res Function(ViewState) _then; - - @override - $Res call({ - Object? view = freezed, - Object? isEditing = freezed, - Object? successOrFailure = freezed, - }) { - return _then(_value.copyWith( - view: view == freezed - ? _value.view - : view // ignore: cast_nullable_to_non_nullable - as View, - isEditing: isEditing == freezed - ? _value.isEditing - : isEditing // ignore: cast_nullable_to_non_nullable - as bool, - successOrFailure: successOrFailure == freezed - ? _value.successOrFailure - : successOrFailure // ignore: cast_nullable_to_non_nullable - as Either, - )); - } -} - -/// @nodoc -abstract class _$ViewStateCopyWith<$Res> implements $ViewStateCopyWith<$Res> { - factory _$ViewStateCopyWith( - _ViewState value, $Res Function(_ViewState) then) = - __$ViewStateCopyWithImpl<$Res>; - @override - $Res call( - {View view, bool isEditing, Either successOrFailure}); -} - -/// @nodoc -class __$ViewStateCopyWithImpl<$Res> extends _$ViewStateCopyWithImpl<$Res> - implements _$ViewStateCopyWith<$Res> { - __$ViewStateCopyWithImpl(_ViewState _value, $Res Function(_ViewState) _then) - : super(_value, (v) => _then(v as _ViewState)); - - @override - _ViewState get _value => super._value as _ViewState; - - @override - $Res call({ - Object? view = freezed, - Object? isEditing = freezed, - Object? successOrFailure = freezed, - }) { - return _then(_ViewState( - view: view == freezed - ? _value.view - : view // ignore: cast_nullable_to_non_nullable - as View, - isEditing: isEditing == freezed - ? _value.isEditing - : isEditing // ignore: cast_nullable_to_non_nullable - as bool, - successOrFailure: successOrFailure == freezed - ? _value.successOrFailure - : successOrFailure // ignore: cast_nullable_to_non_nullable - as Either, - )); - } -} - -/// @nodoc - -class _$_ViewState implements _ViewState { - const _$_ViewState( - {required this.view, - required this.isEditing, - required this.successOrFailure}); - - @override - final View view; - @override - final bool isEditing; - @override - final Either successOrFailure; - - @override - String toString() { - return 'ViewState(view: $view, isEditing: $isEditing, successOrFailure: $successOrFailure)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other is _ViewState && - (identical(other.view, view) || - const DeepCollectionEquality().equals(other.view, view)) && - (identical(other.isEditing, isEditing) || - const DeepCollectionEquality() - .equals(other.isEditing, isEditing)) && - (identical(other.successOrFailure, successOrFailure) || - const DeepCollectionEquality() - .equals(other.successOrFailure, successOrFailure))); - } - - @override - int get hashCode => - runtimeType.hashCode ^ - const DeepCollectionEquality().hash(view) ^ - const DeepCollectionEquality().hash(isEditing) ^ - const DeepCollectionEquality().hash(successOrFailure); - - @JsonKey(ignore: true) - @override - _$ViewStateCopyWith<_ViewState> get copyWith => - __$ViewStateCopyWithImpl<_ViewState>(this, _$identity); -} - -abstract class _ViewState implements ViewState { - const factory _ViewState( - {required View view, - required bool isEditing, - required Either successOrFailure}) = _$_ViewState; - - @override - View get view => throw _privateConstructorUsedError; - @override - bool get isEditing => throw _privateConstructorUsedError; - @override - Either get successOrFailure => - throw _privateConstructorUsedError; - @override - @JsonKey(ignore: true) - _$ViewStateCopyWith<_ViewState> get copyWith => - throw _privateConstructorUsedError; -} diff --git a/frontend/app_flowy/lib/workspace/application/workspace/welcome_bloc.freezed.dart b/frontend/app_flowy/lib/workspace/application/workspace/welcome_bloc.freezed.dart deleted file mode 100644 index b82475bc73..0000000000 --- a/frontend/app_flowy/lib/workspace/application/workspace/welcome_bloc.freezed.dart +++ /dev/null @@ -1,890 +0,0 @@ -// coverage:ignore-file -// GENERATED CODE - DO NOT MODIFY BY HAND -// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target - -part of 'welcome_bloc.dart'; - -// ************************************************************************** -// FreezedGenerator -// ************************************************************************** - -T _$identity(T value) => value; - -final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more informations: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); - -/// @nodoc -class _$WelcomeEventTearOff { - const _$WelcomeEventTearOff(); - - Initial initial() { - return const Initial(); - } - - CreateWorkspace createWorkspace(String name, String desc) { - return CreateWorkspace( - name, - desc, - ); - } - - OpenWorkspace openWorkspace(Workspace workspace) { - return OpenWorkspace( - workspace, - ); - } - - WorkspacesReceived workspacesReveived( - Either, FlowyError> workspacesOrFail) { - return WorkspacesReceived( - workspacesOrFail, - ); - } -} - -/// @nodoc -const $WelcomeEvent = _$WelcomeEventTearOff(); - -/// @nodoc -mixin _$WelcomeEvent { - @optionalTypeArgs - TResult when({ - required TResult Function() initial, - required TResult Function(String name, String desc) createWorkspace, - required TResult Function(Workspace workspace) openWorkspace, - required TResult Function( - Either, FlowyError> workspacesOrFail) - workspacesReveived, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? initial, - TResult Function(String name, String desc)? createWorkspace, - TResult Function(Workspace workspace)? openWorkspace, - TResult Function(Either, FlowyError> workspacesOrFail)? - workspacesReveived, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? initial, - TResult Function(String name, String desc)? createWorkspace, - TResult Function(Workspace workspace)? openWorkspace, - TResult Function(Either, FlowyError> workspacesOrFail)? - workspacesReveived, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(Initial value) initial, - required TResult Function(CreateWorkspace value) createWorkspace, - required TResult Function(OpenWorkspace value) openWorkspace, - required TResult Function(WorkspacesReceived value) workspacesReveived, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(Initial value)? initial, - TResult Function(CreateWorkspace value)? createWorkspace, - TResult Function(OpenWorkspace value)? openWorkspace, - TResult Function(WorkspacesReceived value)? workspacesReveived, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Initial value)? initial, - TResult Function(CreateWorkspace value)? createWorkspace, - TResult Function(OpenWorkspace value)? openWorkspace, - TResult Function(WorkspacesReceived value)? workspacesReveived, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $WelcomeEventCopyWith<$Res> { - factory $WelcomeEventCopyWith( - WelcomeEvent value, $Res Function(WelcomeEvent) then) = - _$WelcomeEventCopyWithImpl<$Res>; -} - -/// @nodoc -class _$WelcomeEventCopyWithImpl<$Res> implements $WelcomeEventCopyWith<$Res> { - _$WelcomeEventCopyWithImpl(this._value, this._then); - - final WelcomeEvent _value; - // ignore: unused_field - final $Res Function(WelcomeEvent) _then; -} - -/// @nodoc -abstract class $InitialCopyWith<$Res> { - factory $InitialCopyWith(Initial value, $Res Function(Initial) then) = - _$InitialCopyWithImpl<$Res>; -} - -/// @nodoc -class _$InitialCopyWithImpl<$Res> extends _$WelcomeEventCopyWithImpl<$Res> - implements $InitialCopyWith<$Res> { - _$InitialCopyWithImpl(Initial _value, $Res Function(Initial) _then) - : super(_value, (v) => _then(v as Initial)); - - @override - Initial get _value => super._value as Initial; -} - -/// @nodoc - -class _$Initial implements Initial { - const _$Initial(); - - @override - String toString() { - return 'WelcomeEvent.initial()'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || (other is Initial); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() initial, - required TResult Function(String name, String desc) createWorkspace, - required TResult Function(Workspace workspace) openWorkspace, - required TResult Function( - Either, FlowyError> workspacesOrFail) - workspacesReveived, - }) { - return initial(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? initial, - TResult Function(String name, String desc)? createWorkspace, - TResult Function(Workspace workspace)? openWorkspace, - TResult Function(Either, FlowyError> workspacesOrFail)? - workspacesReveived, - }) { - return initial?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? initial, - TResult Function(String name, String desc)? createWorkspace, - TResult Function(Workspace workspace)? openWorkspace, - TResult Function(Either, FlowyError> workspacesOrFail)? - workspacesReveived, - required TResult orElse(), - }) { - if (initial != null) { - return initial(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Initial value) initial, - required TResult Function(CreateWorkspace value) createWorkspace, - required TResult Function(OpenWorkspace value) openWorkspace, - required TResult Function(WorkspacesReceived value) workspacesReveived, - }) { - return initial(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(Initial value)? initial, - TResult Function(CreateWorkspace value)? createWorkspace, - TResult Function(OpenWorkspace value)? openWorkspace, - TResult Function(WorkspacesReceived value)? workspacesReveived, - }) { - return initial?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Initial value)? initial, - TResult Function(CreateWorkspace value)? createWorkspace, - TResult Function(OpenWorkspace value)? openWorkspace, - TResult Function(WorkspacesReceived value)? workspacesReveived, - required TResult orElse(), - }) { - if (initial != null) { - return initial(this); - } - return orElse(); - } -} - -abstract class Initial implements WelcomeEvent { - const factory Initial() = _$Initial; -} - -/// @nodoc -abstract class $CreateWorkspaceCopyWith<$Res> { - factory $CreateWorkspaceCopyWith( - CreateWorkspace value, $Res Function(CreateWorkspace) then) = - _$CreateWorkspaceCopyWithImpl<$Res>; - $Res call({String name, String desc}); -} - -/// @nodoc -class _$CreateWorkspaceCopyWithImpl<$Res> - extends _$WelcomeEventCopyWithImpl<$Res> - implements $CreateWorkspaceCopyWith<$Res> { - _$CreateWorkspaceCopyWithImpl( - CreateWorkspace _value, $Res Function(CreateWorkspace) _then) - : super(_value, (v) => _then(v as CreateWorkspace)); - - @override - CreateWorkspace get _value => super._value as CreateWorkspace; - - @override - $Res call({ - Object? name = freezed, - Object? desc = freezed, - }) { - return _then(CreateWorkspace( - name == freezed - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - desc == freezed - ? _value.desc - : desc // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$CreateWorkspace implements CreateWorkspace { - const _$CreateWorkspace(this.name, this.desc); - - @override - final String name; - @override - final String desc; - - @override - String toString() { - return 'WelcomeEvent.createWorkspace(name: $name, desc: $desc)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other is CreateWorkspace && - (identical(other.name, name) || - const DeepCollectionEquality().equals(other.name, name)) && - (identical(other.desc, desc) || - const DeepCollectionEquality().equals(other.desc, desc))); - } - - @override - int get hashCode => - runtimeType.hashCode ^ - const DeepCollectionEquality().hash(name) ^ - const DeepCollectionEquality().hash(desc); - - @JsonKey(ignore: true) - @override - $CreateWorkspaceCopyWith get copyWith => - _$CreateWorkspaceCopyWithImpl(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() initial, - required TResult Function(String name, String desc) createWorkspace, - required TResult Function(Workspace workspace) openWorkspace, - required TResult Function( - Either, FlowyError> workspacesOrFail) - workspacesReveived, - }) { - return createWorkspace(name, desc); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? initial, - TResult Function(String name, String desc)? createWorkspace, - TResult Function(Workspace workspace)? openWorkspace, - TResult Function(Either, FlowyError> workspacesOrFail)? - workspacesReveived, - }) { - return createWorkspace?.call(name, desc); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? initial, - TResult Function(String name, String desc)? createWorkspace, - TResult Function(Workspace workspace)? openWorkspace, - TResult Function(Either, FlowyError> workspacesOrFail)? - workspacesReveived, - required TResult orElse(), - }) { - if (createWorkspace != null) { - return createWorkspace(name, desc); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Initial value) initial, - required TResult Function(CreateWorkspace value) createWorkspace, - required TResult Function(OpenWorkspace value) openWorkspace, - required TResult Function(WorkspacesReceived value) workspacesReveived, - }) { - return createWorkspace(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(Initial value)? initial, - TResult Function(CreateWorkspace value)? createWorkspace, - TResult Function(OpenWorkspace value)? openWorkspace, - TResult Function(WorkspacesReceived value)? workspacesReveived, - }) { - return createWorkspace?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Initial value)? initial, - TResult Function(CreateWorkspace value)? createWorkspace, - TResult Function(OpenWorkspace value)? openWorkspace, - TResult Function(WorkspacesReceived value)? workspacesReveived, - required TResult orElse(), - }) { - if (createWorkspace != null) { - return createWorkspace(this); - } - return orElse(); - } -} - -abstract class CreateWorkspace implements WelcomeEvent { - const factory CreateWorkspace(String name, String desc) = _$CreateWorkspace; - - String get name => throw _privateConstructorUsedError; - String get desc => throw _privateConstructorUsedError; - @JsonKey(ignore: true) - $CreateWorkspaceCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $OpenWorkspaceCopyWith<$Res> { - factory $OpenWorkspaceCopyWith( - OpenWorkspace value, $Res Function(OpenWorkspace) then) = - _$OpenWorkspaceCopyWithImpl<$Res>; - $Res call({Workspace workspace}); -} - -/// @nodoc -class _$OpenWorkspaceCopyWithImpl<$Res> extends _$WelcomeEventCopyWithImpl<$Res> - implements $OpenWorkspaceCopyWith<$Res> { - _$OpenWorkspaceCopyWithImpl( - OpenWorkspace _value, $Res Function(OpenWorkspace) _then) - : super(_value, (v) => _then(v as OpenWorkspace)); - - @override - OpenWorkspace get _value => super._value as OpenWorkspace; - - @override - $Res call({ - Object? workspace = freezed, - }) { - return _then(OpenWorkspace( - workspace == freezed - ? _value.workspace - : workspace // ignore: cast_nullable_to_non_nullable - as Workspace, - )); - } -} - -/// @nodoc - -class _$OpenWorkspace implements OpenWorkspace { - const _$OpenWorkspace(this.workspace); - - @override - final Workspace workspace; - - @override - String toString() { - return 'WelcomeEvent.openWorkspace(workspace: $workspace)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other is OpenWorkspace && - (identical(other.workspace, workspace) || - const DeepCollectionEquality() - .equals(other.workspace, workspace))); - } - - @override - int get hashCode => - runtimeType.hashCode ^ const DeepCollectionEquality().hash(workspace); - - @JsonKey(ignore: true) - @override - $OpenWorkspaceCopyWith get copyWith => - _$OpenWorkspaceCopyWithImpl(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() initial, - required TResult Function(String name, String desc) createWorkspace, - required TResult Function(Workspace workspace) openWorkspace, - required TResult Function( - Either, FlowyError> workspacesOrFail) - workspacesReveived, - }) { - return openWorkspace(workspace); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? initial, - TResult Function(String name, String desc)? createWorkspace, - TResult Function(Workspace workspace)? openWorkspace, - TResult Function(Either, FlowyError> workspacesOrFail)? - workspacesReveived, - }) { - return openWorkspace?.call(workspace); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? initial, - TResult Function(String name, String desc)? createWorkspace, - TResult Function(Workspace workspace)? openWorkspace, - TResult Function(Either, FlowyError> workspacesOrFail)? - workspacesReveived, - required TResult orElse(), - }) { - if (openWorkspace != null) { - return openWorkspace(workspace); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Initial value) initial, - required TResult Function(CreateWorkspace value) createWorkspace, - required TResult Function(OpenWorkspace value) openWorkspace, - required TResult Function(WorkspacesReceived value) workspacesReveived, - }) { - return openWorkspace(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(Initial value)? initial, - TResult Function(CreateWorkspace value)? createWorkspace, - TResult Function(OpenWorkspace value)? openWorkspace, - TResult Function(WorkspacesReceived value)? workspacesReveived, - }) { - return openWorkspace?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Initial value)? initial, - TResult Function(CreateWorkspace value)? createWorkspace, - TResult Function(OpenWorkspace value)? openWorkspace, - TResult Function(WorkspacesReceived value)? workspacesReveived, - required TResult orElse(), - }) { - if (openWorkspace != null) { - return openWorkspace(this); - } - return orElse(); - } -} - -abstract class OpenWorkspace implements WelcomeEvent { - const factory OpenWorkspace(Workspace workspace) = _$OpenWorkspace; - - Workspace get workspace => throw _privateConstructorUsedError; - @JsonKey(ignore: true) - $OpenWorkspaceCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $WorkspacesReceivedCopyWith<$Res> { - factory $WorkspacesReceivedCopyWith( - WorkspacesReceived value, $Res Function(WorkspacesReceived) then) = - _$WorkspacesReceivedCopyWithImpl<$Res>; - $Res call({Either, FlowyError> workspacesOrFail}); -} - -/// @nodoc -class _$WorkspacesReceivedCopyWithImpl<$Res> - extends _$WelcomeEventCopyWithImpl<$Res> - implements $WorkspacesReceivedCopyWith<$Res> { - _$WorkspacesReceivedCopyWithImpl( - WorkspacesReceived _value, $Res Function(WorkspacesReceived) _then) - : super(_value, (v) => _then(v as WorkspacesReceived)); - - @override - WorkspacesReceived get _value => super._value as WorkspacesReceived; - - @override - $Res call({ - Object? workspacesOrFail = freezed, - }) { - return _then(WorkspacesReceived( - workspacesOrFail == freezed - ? _value.workspacesOrFail - : workspacesOrFail // ignore: cast_nullable_to_non_nullable - as Either, FlowyError>, - )); - } -} - -/// @nodoc - -class _$WorkspacesReceived implements WorkspacesReceived { - const _$WorkspacesReceived(this.workspacesOrFail); - - @override - final Either, FlowyError> workspacesOrFail; - - @override - String toString() { - return 'WelcomeEvent.workspacesReveived(workspacesOrFail: $workspacesOrFail)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other is WorkspacesReceived && - (identical(other.workspacesOrFail, workspacesOrFail) || - const DeepCollectionEquality() - .equals(other.workspacesOrFail, workspacesOrFail))); - } - - @override - int get hashCode => - runtimeType.hashCode ^ - const DeepCollectionEquality().hash(workspacesOrFail); - - @JsonKey(ignore: true) - @override - $WorkspacesReceivedCopyWith get copyWith => - _$WorkspacesReceivedCopyWithImpl(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() initial, - required TResult Function(String name, String desc) createWorkspace, - required TResult Function(Workspace workspace) openWorkspace, - required TResult Function( - Either, FlowyError> workspacesOrFail) - workspacesReveived, - }) { - return workspacesReveived(workspacesOrFail); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult Function()? initial, - TResult Function(String name, String desc)? createWorkspace, - TResult Function(Workspace workspace)? openWorkspace, - TResult Function(Either, FlowyError> workspacesOrFail)? - workspacesReveived, - }) { - return workspacesReveived?.call(workspacesOrFail); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? initial, - TResult Function(String name, String desc)? createWorkspace, - TResult Function(Workspace workspace)? openWorkspace, - TResult Function(Either, FlowyError> workspacesOrFail)? - workspacesReveived, - required TResult orElse(), - }) { - if (workspacesReveived != null) { - return workspacesReveived(workspacesOrFail); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Initial value) initial, - required TResult Function(CreateWorkspace value) createWorkspace, - required TResult Function(OpenWorkspace value) openWorkspace, - required TResult Function(WorkspacesReceived value) workspacesReveived, - }) { - return workspacesReveived(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult Function(Initial value)? initial, - TResult Function(CreateWorkspace value)? createWorkspace, - TResult Function(OpenWorkspace value)? openWorkspace, - TResult Function(WorkspacesReceived value)? workspacesReveived, - }) { - return workspacesReveived?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Initial value)? initial, - TResult Function(CreateWorkspace value)? createWorkspace, - TResult Function(OpenWorkspace value)? openWorkspace, - TResult Function(WorkspacesReceived value)? workspacesReveived, - required TResult orElse(), - }) { - if (workspacesReveived != null) { - return workspacesReveived(this); - } - return orElse(); - } -} - -abstract class WorkspacesReceived implements WelcomeEvent { - const factory WorkspacesReceived( - Either, FlowyError> workspacesOrFail) = - _$WorkspacesReceived; - - Either, FlowyError> get workspacesOrFail => - throw _privateConstructorUsedError; - @JsonKey(ignore: true) - $WorkspacesReceivedCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -class _$WelcomeStateTearOff { - const _$WelcomeStateTearOff(); - - _WelcomeState call( - {required bool isLoading, - required List workspaces, - required Either successOrFailure}) { - return _WelcomeState( - isLoading: isLoading, - workspaces: workspaces, - successOrFailure: successOrFailure, - ); - } -} - -/// @nodoc -const $WelcomeState = _$WelcomeStateTearOff(); - -/// @nodoc -mixin _$WelcomeState { - bool get isLoading => throw _privateConstructorUsedError; - List get workspaces => throw _privateConstructorUsedError; - Either get successOrFailure => - throw _privateConstructorUsedError; - - @JsonKey(ignore: true) - $WelcomeStateCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $WelcomeStateCopyWith<$Res> { - factory $WelcomeStateCopyWith( - WelcomeState value, $Res Function(WelcomeState) then) = - _$WelcomeStateCopyWithImpl<$Res>; - $Res call( - {bool isLoading, - List workspaces, - Either successOrFailure}); -} - -/// @nodoc -class _$WelcomeStateCopyWithImpl<$Res> implements $WelcomeStateCopyWith<$Res> { - _$WelcomeStateCopyWithImpl(this._value, this._then); - - final WelcomeState _value; - // ignore: unused_field - final $Res Function(WelcomeState) _then; - - @override - $Res call({ - Object? isLoading = freezed, - Object? workspaces = freezed, - Object? successOrFailure = freezed, - }) { - return _then(_value.copyWith( - isLoading: isLoading == freezed - ? _value.isLoading - : isLoading // ignore: cast_nullable_to_non_nullable - as bool, - workspaces: workspaces == freezed - ? _value.workspaces - : workspaces // ignore: cast_nullable_to_non_nullable - as List, - successOrFailure: successOrFailure == freezed - ? _value.successOrFailure - : successOrFailure // ignore: cast_nullable_to_non_nullable - as Either, - )); - } -} - -/// @nodoc -abstract class _$WelcomeStateCopyWith<$Res> - implements $WelcomeStateCopyWith<$Res> { - factory _$WelcomeStateCopyWith( - _WelcomeState value, $Res Function(_WelcomeState) then) = - __$WelcomeStateCopyWithImpl<$Res>; - @override - $Res call( - {bool isLoading, - List workspaces, - Either successOrFailure}); -} - -/// @nodoc -class __$WelcomeStateCopyWithImpl<$Res> extends _$WelcomeStateCopyWithImpl<$Res> - implements _$WelcomeStateCopyWith<$Res> { - __$WelcomeStateCopyWithImpl( - _WelcomeState _value, $Res Function(_WelcomeState) _then) - : super(_value, (v) => _then(v as _WelcomeState)); - - @override - _WelcomeState get _value => super._value as _WelcomeState; - - @override - $Res call({ - Object? isLoading = freezed, - Object? workspaces = freezed, - Object? successOrFailure = freezed, - }) { - return _then(_WelcomeState( - isLoading: isLoading == freezed - ? _value.isLoading - : isLoading // ignore: cast_nullable_to_non_nullable - as bool, - workspaces: workspaces == freezed - ? _value.workspaces - : workspaces // ignore: cast_nullable_to_non_nullable - as List, - successOrFailure: successOrFailure == freezed - ? _value.successOrFailure - : successOrFailure // ignore: cast_nullable_to_non_nullable - as Either, - )); - } -} - -/// @nodoc - -class _$_WelcomeState implements _WelcomeState { - const _$_WelcomeState( - {required this.isLoading, - required this.workspaces, - required this.successOrFailure}); - - @override - final bool isLoading; - @override - final List workspaces; - @override - final Either successOrFailure; - - @override - String toString() { - return 'WelcomeState(isLoading: $isLoading, workspaces: $workspaces, successOrFailure: $successOrFailure)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other is _WelcomeState && - (identical(other.isLoading, isLoading) || - const DeepCollectionEquality() - .equals(other.isLoading, isLoading)) && - (identical(other.workspaces, workspaces) || - const DeepCollectionEquality() - .equals(other.workspaces, workspaces)) && - (identical(other.successOrFailure, successOrFailure) || - const DeepCollectionEquality() - .equals(other.successOrFailure, successOrFailure))); - } - - @override - int get hashCode => - runtimeType.hashCode ^ - const DeepCollectionEquality().hash(isLoading) ^ - const DeepCollectionEquality().hash(workspaces) ^ - const DeepCollectionEquality().hash(successOrFailure); - - @JsonKey(ignore: true) - @override - _$WelcomeStateCopyWith<_WelcomeState> get copyWith => - __$WelcomeStateCopyWithImpl<_WelcomeState>(this, _$identity); -} - -abstract class _WelcomeState implements WelcomeState { - const factory _WelcomeState( - {required bool isLoading, - required List workspaces, - required Either successOrFailure}) = _$_WelcomeState; - - @override - bool get isLoading => throw _privateConstructorUsedError; - @override - List get workspaces => throw _privateConstructorUsedError; - @override - Either get successOrFailure => - throw _privateConstructorUsedError; - @override - @JsonKey(ignore: true) - _$WelcomeStateCopyWith<_WelcomeState> get copyWith => - throw _privateConstructorUsedError; -} From 3021bdc1af1be44dfc7c765ef277d2d295dba995 Mon Sep 17 00:00:00 2001 From: tsuiyuenhong Date: Sat, 26 Feb 2022 22:56:48 +0800 Subject: [PATCH 10/15] chore: use actions-cache to speed up CI. --- .github/workflows/ci.yaml | 130 ++++++++++++++++++++------------------ 1 file changed, 67 insertions(+), 63 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 7e804eb136..933619de73 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,79 +1,83 @@ name: CI + on: push: - branches: [main] + branches: + - 'main' + pull_request: - branches: [main] + branches: + - 'main' + jobs: - build-macos: - runs-on: macOS-latest + build: + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + include: + - os: ubuntu-latest + flutter_profile: development-linux-x86 + - os: macos-latest + flutter_profile: development-mac + runs-on: ${{ matrix.os }} + steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 + - uses: actions/checkout@v2 + + - id: rust_toolchain + uses: actions-rs/toolchain@v1 with: toolchain: stable - - name: Checkout Flutter - uses: actions/checkout@v2 + + - id: flutter + uses: subosito/flutter-action@v2 with: - repository: flutter/flutter - path: flutter - - name: Flutter - working-directory: flutter - run: | - echo "$(pwd)/bin" >> $GITHUB_PATH - export PATH="$PATH:$(pwd)/bin" - flutter channel stable - flutter config --enable-macos-desktop - flutter doctor + channel: 'stable' + cache: true + + - name: Cache Cargo + uses: actions/cache@v2 + with: + path: | + ~/.cargo + key: ${{ runner.os }}-cargo-${{ steps.rust_toolchain.outputs.rustc_hash }}-${{ hashFiles('./frontend/rust-lib/Cargo.toml') }} + + - name: Cache Rust + uses: actions/cache@v2 + with: + path: | + frontend/rust-lib/target + key: ${{ runner.os }}-rust-${{ steps.rust_toolchain.outputs.rustc_hash }}-${{ hashFiles('./frontend/rust-lib/Cargo.toml') }} + + - name: Setup Environment + run: | + if [ "$RUNNER_OS" == "Linux" ]; then + sudo wget -qO /etc/apt/trusted.gpg.d/dart_linux_signing_key.asc https://dl-ssl.google.com/linux/linux_signing_key.pub + sudo wget -qO /etc/apt/sources.list.d/dart_stable.list https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list + sudo apt-get update + sudo apt-get install -y dart curl build-essential libsqlite3-dev libssl-dev clang cmake ninja-build pkg-config libgtk-3-dev + elif [ "$RUNNER_OS" == "macOS" ]; then + echo 'do nothing' + fi + shell: bash + - name: Deps working-directory: frontend run: | - cargo install --force cargo-make - cargo install --force duckscript_cli + cargo install cargo-make + cargo install duckscript_cli cargo make flowy_dev - echo PATH="$PATH":"$HOME/.pub-cache/bin" >> $GITHUB_PATH + + - name: Config Flutter + run: | + if [ "$RUNNER_OS" == "Linux" ]; then + flutter config --enable-linux-desktop + elif [ "$RUNNER_OS" == "macOS" ]; then + flutter config --enable-macos-desktop + fi + shell: bash + - name: Build working-directory: frontend - run: cargo make --profile production-mac-x86 appflowy - build-ubuntu: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Packages run: | - sudo wget -qO /etc/apt/trusted.gpg.d/dart_linux_signing_key.asc https://dl-ssl.google.com/linux/linux_signing_key.pub - sudo wget -qO /etc/apt/sources.list.d/dart_stable.list https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list - sudo apt-get update - sudo apt-get install -y dart curl build-essential libsqlite3-dev libssl-dev clang cmake ninja-build pkg-config libgtk-3-dev - - name: Rust - run: | - curl \ - --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y - source $HOME/.cargo/env - rustup toolchain install stable - rustup default stable - - name: Checkout Flutter - uses: actions/checkout@v2 - with: - repository: flutter/flutter - path: flutter - - name: Flutter - working-directory: flutter - run: | - echo "$(pwd)/bin" >> $GITHUB_PATH - export PATH="$PATH:$(pwd)/bin" - flutter channel stable - flutter config --enable-linux-desktop - flutter doctor - - name: Deps - working-directory: frontend - run: | - cargo install --force cargo-make - cargo install --force duckscript_cli - cargo make flowy_dev - echo PATH="$PATH":"$HOME/.pub-cache/bin" >> $GITHUB_PATH - - name: Build - working-directory: frontend - run: cargo make --profile production-linux-x86 appflowy + cargo make --profile ${{ matrix.flutter_profile }} appflowy-dev \ No newline at end of file From 8f50d0c6dcc868f8bfc28462411ab7cd3d5ca2e8 Mon Sep 17 00:00:00 2001 From: Lays Rodrigues Date: Thu, 3 Feb 2022 11:10:20 -0300 Subject: [PATCH 11/15] feat: add portuguese translation Signed-off-by: Lays Rodrigues --- .../app_flowy/assets/translations/pt-BR.json | 146 ++++++++++++++++++ .../lib/startup/tasks/app_widget.dart | 1 + .../packages/flowy_infra/lib/language.dart | 4 +- 3 files changed, 150 insertions(+), 1 deletion(-) create mode 100644 frontend/app_flowy/assets/translations/pt-BR.json diff --git a/frontend/app_flowy/assets/translations/pt-BR.json b/frontend/app_flowy/assets/translations/pt-BR.json new file mode 100644 index 0000000000..e2f0b27032 --- /dev/null +++ b/frontend/app_flowy/assets/translations/pt-BR.json @@ -0,0 +1,146 @@ +{ + "appName": "AppFlowy", + "defaultUsername": "Me", + "welcomeText": "Bem vindo @:appName", + "githubStarText": "Star on GitHub", + "subscribeNewsletterText": "Se inscreva na Newsletter", + "letsGoButtonText": "Vamos lá", + "title": "Título", + "signUp": { + "buttonText": "Inscreve-se", + "title": "Inscrever-se @:appName", + "getStartedText": "Começar", + "emptyPasswordError": "Senha não pode ser em branco.", + "repeatPasswordEmptyError": "Confirmar a senha não pode ser em branco.", + "unmatchedPasswordError": "As senhas não conferem.", + "alreadyHaveAnAccount": "Já possui uma conta?", + "emailHint": "Email", + "passwordHint": "Senha", + "repeatPasswordHint": "Confirme a senha" + }, + "signIn": { + "loginTitle": "Login to @:appName", + "loginButtonText": "Login", + "buttonText": "Entre", + "forgotPassword": "Esqueceu a senha?", + "emailHint": "Email", + "passwordHint": "Senha", + "dontHaveAnAccount": "Não possui uma conta?", + "repeatPasswordEmptyError": "Confirmar a senha não pode ser em branco.", + "unmatchedPasswordError": "As senhas não conferem." + }, + "workspace": { + "create": "Crie uma área de trabalho", + "hint": "área de trabalho", + "notFoundError": "Área de trabalho não encontrada" + }, + "shareAction": { + "buttonText": "Compartilhar", + "workInProgress": "Em breve", + "markdown": "Markdown", + "copyLink": "Copiar o link" + }, + "disclosureAction": { + "rename": "Renomear", + "delete": "Deletar", + "duplicate": "Duplicar" + }, + "blankPageTitle": "Página em branco", + "newPageText": "Nova página", + "trash": { + "text": "Lixeira", + "restoreAll": "Restaurar todos", + "deleteAll": "Deletar todos", + "pageHeader": { + "fileName": "Nome do arquivo", + "lastModified": "Última modificação", + "created": "Criado" + } + }, + "deletePagePrompt": { + "text": "Está página está na lixeira", + "restore": "Restaurar a oágina", + "deletePermanent": "Deletar permanentemente" + }, + "dialogCreatePageNameHint": "Nome da página", + "questionBubble": { + "whatsNew": "O que há de novo?", + "help": "Ajuda & Suporte", + "debug": { + "name": "Informação de debug", + "success": "Copiar informação de debug para o clipboard!", + "fail": "Falha em copiar a informação de debug para o clipboard" + } + }, + "menuAppHeader": { + "addPageTooltip": "Adicione uma nova página.", + "defaultNewPageName": "Sem título", + "renameDialog": "Renomear" + }, + "toolbar": { + "undo": "Desfazer", + "redo": "Refazer", + "bold": "Negrito", + "italic": "Itálico", + "underline": "Sublinhado", + "strike": "Tachado", + "numList": "Lista numerada", + "bulletList": "Lista com marcadores", + "checkList": "Check List", + "inlineCode": "Embutir código", + "quote": "Citação em bloco", + "header": "Cabeçalho", + "highlight": "Realçar" + }, + "tooltip": { + "lightMode": "Mudar para o modo Claro.", + "darkMode": "Mudar para o modo Escuro." + }, + "contactsPage": { + "title": "Contatos", + "whatsHappening": "O que está acontecendo essa semana?", + "addContact": "Adicionar um contato", + "editContact": "Editar um contato" + }, + "button": { + "OK": "OK", + "Cancel": "Canelar", + "signIn": "Entrar", + "signOut": "Sair", + "complete": "Completar", + "save": "Salvar" + }, + "label": { + "welcome": "Bem vindo!", + "firstName": "Primeiro Nome", + "middleName": "Nome do Meio", + "lastName": "Último Nome", + "stepX": "Passo {X}" + }, + "oAuth": { + "err": { + "failedTitle": "Erro ao conectar a sua conta.", + "failedMsg": "Verifique se você concluiu o processo de login em seu navegador." + }, + "google": { + "title": "GOOGLE SIGN-IN", + "instruction1": "Para importar seus Contatos do Google, você precisará autorizar este aplicativo usando seu navegador web.", + "instruction2": "Copie este código para sua área de transferência clicando no ícone ou selecionando o texto:", + "instruction3": "Navegue até o link a seguir em seu navegador e digite o código acima:", + "instruction4": "Pressione o botão abaixo ao concluir a inscrição:" + } + }, + "settings": { + "title": "Configurações", + "menu": { + "appearance": "Aparência", + "language": "Idioma", + "open": "Abrir as Configurações" + }, + "appearance": { + "lightLabel": "Modo Claro", + "darkLabel": "Modo Escuro" + } + } + } + \ No newline at end of file diff --git a/frontend/app_flowy/lib/startup/tasks/app_widget.dart b/frontend/app_flowy/lib/startup/tasks/app_widget.dart index 142c4cc30f..6bcb9349ad 100644 --- a/frontend/app_flowy/lib/startup/tasks/app_widget.dart +++ b/frontend/app_flowy/lib/startup/tasks/app_widget.dart @@ -35,6 +35,7 @@ class InitAppWidgetTask extends LaunchTask { Locale('fr', 'FR'), Locale('fr', 'CA'), Locale('it', 'IT'), + Locale('pt', 'BR'), Locale('ru', 'RU'), Locale('zh', 'CN'), ], diff --git a/frontend/app_flowy/packages/flowy_infra/lib/language.dart b/frontend/app_flowy/packages/flowy_infra/lib/language.dart index 2e0122366a..9f140fecc8 100644 --- a/frontend/app_flowy/packages/flowy_infra/lib/language.dart +++ b/frontend/app_flowy/packages/flowy_infra/lib/language.dart @@ -14,7 +14,7 @@ String languageFromLocale(Locale locale) { case "es": return "Español"; case "fr": - switch (locale.countryCode) { + switch(locale.countryCode) { case "CA" : return "Français (CA)"; case "FR" : @@ -24,6 +24,8 @@ String languageFromLocale(Locale locale) { } case "it": return "Italiano"; + case "pt": + return "Português"; case "ru": return "русский"; From 11fee0a815d17360cb3955a6d5fd149d49ac2277 Mon Sep 17 00:00:00 2001 From: Mike Wallace Date: Sun, 27 Feb 2022 13:06:15 -0500 Subject: [PATCH 12/15] Update README.md --- README.md | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/README.md b/README.md index 2c80d0aba3..4ee222140a 100644 --- a/README.md +++ b/README.md @@ -29,19 +29,6 @@ You are in charge of your data and customizations. Please view the [documentation](https://appflowy.gitbook.io/docs/essential-documentation/install-appflowy/installation-methods) for OS specific installation instructions. -You can also try AppFlowy using the docker image: - -``` -docker run --rm \ - -v $HOME/.Xauthority:/root/.Xauthority:rw \ - -v /tmp/.X11-unix:/tmp/.X11-unix \ - -v /dev/dri:/dev/dri \ - -v /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket \ - -v appflowy-data:/home/appflowy \ - -e DISPLAY=${DISPLAY} \ - appflowyio/appflowy_client:latest -``` - ## Built With * [Flutter](https://flutter.dev/) From 5d09e1509d2e86a3c7e7d30ccbbfb7bb67580960 Mon Sep 17 00:00:00 2001 From: luz paz Date: Fri, 25 Feb 2022 16:48:55 -0500 Subject: [PATCH 13/15] fix: various typos Found via `codespell -q 3 -S *.svg,./frontend/app_flowy/assets/translations -L bloc,crate,homestate,nd,ot,ser` --- .../lib/workspace/domain/page_stack/page_stack.dart | 2 +- .../infrastructure/markdown/src/delta_markdown_decoder.dart | 2 +- .../infrastructure/markdown/src/inline_parser.dart | 6 +++--- .../presentation/widgets/emoji_picker/src/config.dart | 4 ++-- .../presentation/widgets/emoji_picker/src/emoji_picker.dart | 4 ++-- .../widgets/emoji_picker/src/emoji_picker_builder.dart | 2 +- .../lib/workspace/presentation/widgets/menu/menu.dart | 2 +- .../lib/flowy_infra_ui_platform_interface.dart | 4 ++-- .../flowy_infra_ui/lib/src/flowy_overlay/flowy_overlay.dart | 2 +- frontend/app_flowy/web/index.html | 2 +- 10 files changed, 15 insertions(+), 15 deletions(-) diff --git a/frontend/app_flowy/lib/workspace/domain/page_stack/page_stack.dart b/frontend/app_flowy/lib/workspace/domain/page_stack/page_stack.dart index 8c908d1a9a..10e56bf9f0 100644 --- a/frontend/app_flowy/lib/workspace/domain/page_stack/page_stack.dart +++ b/frontend/app_flowy/lib/workspace/domain/page_stack/page_stack.dart @@ -70,7 +70,7 @@ class HomeStackNotifier extends ChangeNotifier { HomeStackContext get context => stackContext; } -// HomeStack is initialized as singleton to controll the page stack. +// HomeStack is initialized as singleton to control the page stack. class HomeStackManager { final HomeStackNotifier _notifier = HomeStackNotifier(); HomeStackManager(); diff --git a/frontend/app_flowy/lib/workspace/infrastructure/markdown/src/delta_markdown_decoder.dart b/frontend/app_flowy/lib/workspace/infrastructure/markdown/src/delta_markdown_decoder.dart index fe9ae8f05b..74982c752e 100644 --- a/frontend/app_flowy/lib/workspace/infrastructure/markdown/src/delta_markdown_decoder.dart +++ b/frontend/app_flowy/lib/workspace/infrastructure/markdown/src/delta_markdown_decoder.dart @@ -114,7 +114,7 @@ class _DeltaVisitor implements ast.NodeVisitor { // TODO(kolja): Determine which behavior we really want here. // We can either insert an additional newline or just have the // paragraphs as single lines. Zefyr will by default render two lines - // are different paragraphs so for now we will not add an additonal + // are different paragraphs so for now we will not add an additional // newline here. // // if (previousToplevelElement != null && diff --git a/frontend/app_flowy/lib/workspace/infrastructure/markdown/src/inline_parser.dart b/frontend/app_flowy/lib/workspace/infrastructure/markdown/src/inline_parser.dart index 0f15a99e4d..8b47a97433 100644 --- a/frontend/app_flowy/lib/workspace/infrastructure/markdown/src/inline_parser.dart +++ b/frontend/app_flowy/lib/workspace/infrastructure/markdown/src/inline_parser.dart @@ -154,7 +154,7 @@ abstract class InlineSyntax { /// Tries to match at the parser's current position. /// - /// The parser's position can be overriden with [startMatchPos]. + /// The parser's position can be overridden with [startMatchPos]. /// Returns whether or not the pattern successfully matched. bool tryMatch(InlineParser parser, [int? startMatchPos]) { startMatchPos ??= parser.pos; @@ -609,7 +609,7 @@ class LinkSyntax extends TagSyntax { // // Once we have parsed `Text [`, there is one (pending) link in the state // stack. It is, by default, active. Once we parse the next possible link, - // `[more](links)`, as a real link, we must deactive the pending links (just + // `[more](links)`, as a real link, we must deactivate the pending links (just // the one, in this case). var _pendingStatesAreActive = true; @@ -933,7 +933,7 @@ class LinkSyntax extends TagSyntax { // followed by mystery characters; no longer a link. return null; } - // [_parseTitle] made sure the title was follwed by a closing `)` + // [_parseTitle] made sure the title was followed by a closing `)` // (but it's up to the code here to examine the balance of // parentheses). parenCount--; diff --git a/frontend/app_flowy/lib/workspace/presentation/widgets/emoji_picker/src/config.dart b/frontend/app_flowy/lib/workspace/presentation/widgets/emoji_picker/src/config.dart index b7e71e87b9..26046af5bb 100644 --- a/frontend/app_flowy/lib/workspace/presentation/widgets/emoji_picker/src/config.dart +++ b/frontend/app_flowy/lib/workspace/presentation/widgets/emoji_picker/src/config.dart @@ -35,7 +35,7 @@ class Config { /// Can be smaller due to screen size and amount of columns final double emojiSizeMax; - /// Verical spacing between emojis + /// Vertical spacing between emojis final double verticalSpacing; /// Horizontal spacing between emojis @@ -57,7 +57,7 @@ class Config { /// The color of the category icon when selected final Color iconColorSelected; - /// The color of the loading indicator during initalization + /// The color of the loading indicator during initialization final Color progressIndicatorColor; /// The color of the backspace icon button diff --git a/frontend/app_flowy/lib/workspace/presentation/widgets/emoji_picker/src/emoji_picker.dart b/frontend/app_flowy/lib/workspace/presentation/widgets/emoji_picker/src/emoji_picker.dart index cb06fe437a..f1e4420252 100644 --- a/frontend/app_flowy/lib/workspace/presentation/widgets/emoji_picker/src/emoji_picker.dart +++ b/frontend/app_flowy/lib/workspace/presentation/widgets/emoji_picker/src/emoji_picker.dart @@ -40,7 +40,7 @@ enum Category { /// Travel emojis TRAVEL, - /// Ojects emojis + /// Objects emojis OBJECTS, /// Sumbol emojis @@ -179,7 +179,7 @@ class _EmojiPickerState extends State { }; } - // Initalize emoji data + // Initialize emoji data Future _updateEmojis() async { categoryEmoji.clear(); if (widget.config.showRecentsTab) { diff --git a/frontend/app_flowy/lib/workspace/presentation/widgets/emoji_picker/src/emoji_picker_builder.dart b/frontend/app_flowy/lib/workspace/presentation/widgets/emoji_picker/src/emoji_picker_builder.dart index 07b6ca7efe..ee00569852 100644 --- a/frontend/app_flowy/lib/workspace/presentation/widgets/emoji_picker/src/emoji_picker_builder.dart +++ b/frontend/app_flowy/lib/workspace/presentation/widgets/emoji_picker/src/emoji_picker_builder.dart @@ -4,7 +4,7 @@ import 'config.dart'; import 'emoji_view_state.dart'; /// Template class for custom implementation -/// Inhert this class to create your own EmojiPicker +/// Inherit this class to create your own EmojiPicker abstract class EmojiPickerBuilder extends StatefulWidget { /// Constructor const EmojiPickerBuilder(this.config, this.state, {Key? key}) : super(key: key); diff --git a/frontend/app_flowy/lib/workspace/presentation/widgets/menu/menu.dart b/frontend/app_flowy/lib/workspace/presentation/widgets/menu/menu.dart index c2046fce39..7689b51e07 100644 --- a/frontend/app_flowy/lib/workspace/presentation/widgets/menu/menu.dart +++ b/frontend/app_flowy/lib/workspace/presentation/widgets/menu/menu.dart @@ -90,7 +90,7 @@ class HomeMenu extends StatelessWidget { } Widget _renderBody(BuildContext context) { - // nested cloumn: https://siddharthmolleti.com/flutter-box-constraints-nested-column-s-row-s-3dfacada7361 + // nested column: https://siddharthmolleti.com/flutter-box-constraints-nested-column-s-row-s-3dfacada7361 final theme = context.watch(); return Container( color: theme.bg1, diff --git a/frontend/app_flowy/packages/flowy_infra_ui/flowy_infra_ui_platform_interface/lib/flowy_infra_ui_platform_interface.dart b/frontend/app_flowy/packages/flowy_infra_ui/flowy_infra_ui_platform_interface/lib/flowy_infra_ui_platform_interface.dart index 32ac147886..9c57883407 100644 --- a/frontend/app_flowy/packages/flowy_infra_ui/flowy_infra_ui_platform_interface/lib/flowy_infra_ui_platform_interface.dart +++ b/frontend/app_flowy/packages/flowy_infra_ui/flowy_infra_ui_platform_interface/lib/flowy_infra_ui_platform_interface.dart @@ -18,10 +18,10 @@ abstract class FlowyInfraUIPlatform extends PlatformInterface { } Stream get onKeyboardVisibilityChange { - throw UnimplementedError('`onKeyboardChange` should be overrided by subclass.'); + throw UnimplementedError('`onKeyboardChange` should be overridden by subclass.'); } Future getPlatformVersion() { - throw UnimplementedError('`getPlatformVersion` should be overrided by subclass.'); + throw UnimplementedError('`getPlatformVersion` should be overridden by subclass.'); } } diff --git a/frontend/app_flowy/packages/flowy_infra_ui/lib/src/flowy_overlay/flowy_overlay.dart b/frontend/app_flowy/packages/flowy_infra_ui/lib/src/flowy_overlay/flowy_overlay.dart index f39e13cd93..84c2cddd82 100644 --- a/frontend/app_flowy/packages/flowy_infra_ui/lib/src/flowy_overlay/flowy_overlay.dart +++ b/frontend/app_flowy/packages/flowy_infra_ui/lib/src/flowy_overlay/flowy_overlay.dart @@ -37,7 +37,7 @@ enum OverlapBehaviour { /// Maintain overlay size, which may cover the anchor widget. none, - /// Resize overlay to avoid overlaping the anchor widget. + /// Resize overlay to avoid overlapping the anchor widget. stretch, } diff --git a/frontend/app_flowy/web/index.html b/frontend/app_flowy/web/index.html index 501ec3737b..284a6312ec 100644 --- a/frontend/app_flowy/web/index.html +++ b/frontend/app_flowy/web/index.html @@ -82,7 +82,7 @@ }); // If service worker doesn't succeed in a reasonable amount of time, - // fallback to plaint