Compare commits

...
Author SHA1 Message Date
hugo b1d66dc6e4 chore(release): publish packages
continuous-integration/drone/push Build is passing
- wyatt_analysis@2.4.1
2023-02-24 10:20:00 +01:00
hugo 25cf9518f9 chore: fix all problems
continuous-integration/drone/push Build is passing
2023-02-24 10:12:04 +01:00
hugo 8d833d39d7 chore: fix and format using melos 2023-02-23 19:19:48 +01:00
hugo d098d9a6bf feat(analysis): add latest version persistence between script executions
continuous-integration/drone/push Build is passing
2023-02-23 18:53:03 +01:00
hugo 0f8c5bb983 ci(analysis): ignore script in publish (closes #124) 2023-02-23 18:52:27 +01:00
hugo 20f07a177b feat(analysis): ignore todo's 2023-02-23 18:50:17 +01:00
hugo 1a48b606a4 refactor(ui): replace ThemeResolver by ThemeHelper in Loader / RichTextBuilder (closes #148) 2023-02-23 18:27:17 +01:00
hugo 6c54689393 refactor(ui)!: remove bloc export in buttons to be state management solution agnostic (closes #147) 2023-02-23 16:59:56 +01:00
hugo d6c9dfd8a7 feat(ui_components): add extra state 2023-02-23 16:57:18 +01:00
hugo 881cbc5bef fix(ui): change example to be compatible with new AppTopBar and TextWrapper 2023-02-23 11:50:13 +01:00
malo 81c8851ac8 style(ui_components): remove useless comment
continuous-integration/drone/push Build is passing
2023-02-23 10:40:05 +01:00
malo 0c176ba0fa feat(ui_kit-ui_components): Modify the theme resolver to utilize the theme helper and streamline the logic 2023-02-23 10:24:54 +01:00
malo 970dde2ef1 feat(ui_kit): remove .raw call 2023-02-23 09:33:05 +01:00
malo 2e187b26eb feat(ui_kit): export ui kit as component theme data 2023-02-23 09:30:11 +01:00
malo 0337d4f97a feat(ui_components): make component theme data copyable 2023-02-23 09:29:46 +01:00
malo 3c3545abfe style(ui_kit): remove test style
continuous-integration/drone/push Build is passing
2023-02-22 19:29:39 +01:00
malo 2dfbd59773 feat(ui_kit): allow to cascade styles in ThemeHelper 2023-02-22 19:28:09 +01:00
malo 4a3fde3a1e feat(ui_kit): implement top nav bar
continuous-integration/drone/push Build is passing
2023-02-22 17:43:42 +01:00
malo 317eb56d66 refactor(ui_kit): adapt ui_kit 2023-02-22 16:13:07 +01:00
malo b9dac32143 refactor(ui_components): migrate top nav bar using generify top bar 2023-02-22 16:10:25 +01:00
malo 8955788fa5 feat(ui_components): generify bars 2023-02-22 16:05:40 +01:00
malo ca6af3ccc3 style(ui_components): clean folders and gather bars 2023-02-22 16:01:51 +01:00
malo ad0f1ec1c5 feat(ui_kit): implement top app bar and update example 2023-02-22 15:50:46 +01:00
malo 41a484c013 feat(ui_components): update attributs and proxy most of appbar attributs 2023-02-22 15:50:21 +01:00
malo 4811ed8998 feat(ui_components): add centerTitle property to app bar component 2023-02-22 11:37:29 +01:00
malo dba14088b0 style(ui_components): format imports 2023-02-22 11:25:22 +01:00
malo b2fe14a123 feat(ui_components): add top navigation bar component to theme data 2023-02-22 11:24:30 +01:00
malo bbd3f0a02d feat(ui_components): add Top Navigation Bar Component 2023-02-22 11:23:08 +01:00
malo 79dc34414c fix(ui_components): add loader to theme data (close #152)
continuous-integration/drone/push Build is passing
2023-02-22 00:02:26 +00:00
malo 349d1ae288 feat(ui_components): add new components to theme data (close #152) 2023-02-22 00:02:26 +00:00
malo 49b534d145 fix(ui_kit): fix tab action focus on textinputs
continuous-integration/drone/push Build is passing
2023-02-21 18:44:11 +01:00
hugo a68da15cdc feat(ui): add some useful text customization in TextWrapper (closes #149)
continuous-integration/drone/push Build is passing
2023-02-21 18:05:56 +01:00
hugo 6037e13f50 fix(ui_component): inverse merge in TextInputStyle
continuous-integration/drone/push Build is passing
2023-02-21 16:08:23 +01:00
hugo 93cc5058d1 refactor(ui_kit): use ThemeHelper in cards 2023-02-21 15:37:42 +01:00
hugo 12d04c91ed fix(ui): use multicolor in cards 2023-02-21 15:17:05 +01:00
hugo 5906d54aad build(ui_component): remove freezed 2023-02-21 15:08:24 +01:00
hugo b077f4baf0 refactor(ui_kit): rename GradientBoxBorder 2023-02-21 15:07:56 +01:00
malo 133e0e910b fix(ui_kit): make card core stateless 2023-02-21 13:34:04 +01:00
malo 25224469b5 fix(ui_components): fix MultiColor lerp method 2023-02-21 13:27:19 +01:00
malo 6537945946 fix(ui_kit): remove null check operator in RichTextBuilder component 2023-02-21 13:23:51 +01:00
malo 702164082a fix(ui_kit): remove null check operator in Loader component 2023-02-21 13:19:11 +01:00
malo f2b8c03dd7 refactor(ui_kit): update textinput component using borderColors as Color 2023-02-21 13:15:47 +01:00
malo 51672cc95a refactor(ui_components): move borderColors type 2023-02-21 13:13:01 +01:00
malo eda643e9b4 chore(ui_components): remove g files and copy with deps 2023-02-21 13:09:20 +01:00
malo cae4b68046 refactor(ui_components): add CopyWith method in ThemeStyle 2023-02-21 12:10:17 +01:00
malo 4030511f4a fix(ui_components-ui_kit): fix, clean and unify logic and code after rebase 2023-02-21 09:54:19 +01:00
malo 8ed8a71c7c fix(ui_kit): fix conflicts in card component after rebase 2023-02-21 08:53:38 +01:00
malo b6d22002ee fix(ui_kit): fix export theme file 2023-02-21 08:52:18 +01:00
malo 9b9339cb56 chore(ui_components): add copywith deps 2023-02-21 08:49:52 +01:00
malo b57500b854 feat(ui_kit): update example (#138) 2023-02-21 08:46:14 +01:00
malo 1edb1f7324 feat(ui_kit): implemement text inputs (#138) 2023-02-21 08:37:36 +01:00
malo edf72cf4c2 feat(ui_components):add text input components, theme extension and worked on utils (#138) 2023-02-21 08:36:58 +01:00
malo f6c16c5dc4 feat(ui_components): add isColor getter in multicolor helper 2023-02-21 08:35:12 +01:00
malo c6beae597b refactor(ui_components): update colors using Multicolor class (#138) 2023-02-21 08:35:12 +01:00
malo c2b60f2d79 feat(ui_kit): add text input theme extension (#138) 2023-02-21 08:35:12 +01:00
malo 1e8d5d088e chore(ui_components): export text inputs (#138) 2023-02-21 08:35:04 +01:00
malo 419c99c103 feat(ui_components): add text input abstract class (#138) 2023-02-21 08:32:38 +01:00
hugo 5387dd6eed build(ui_kit): use hosted version of bloc_helper
continuous-integration/drone/push Build is passing
2023-02-17 17:26:23 +01:00
hugo f67e4aa112 ci: use latest dart version in ci container
continuous-integration/drone/push Build is passing
2023-02-17 16:28:22 +01:00
hugo 2769d45e20 fix(ui_kit): fix text align, add selection and update example for rich text builder
continuous-integration/drone/push Build is failing
2023-02-17 15:57:54 +01:00
hugo 66719732f7 feat(ui_kit): implement rich text builder (closes #141) 2023-02-17 14:49:41 +01:00
hugo 25018dc78a feat(ui_component): add rich text builder / parser 2023-02-17 14:48:49 +01:00
hugo efeb3acff3 build(ui): optimize build runner 2023-02-17 14:48:23 +01:00
hugo ef52015372 refactor(ui): rework text gradient and text wrapper 2023-02-17 14:47:56 +01:00
hugo c5f8b69184 style(ui_kit): add example demo-page auto-generation
continuous-integration/drone/push Build is failing
2023-02-16 15:13:55 +01:00
hugo 33984b1733 feat(ui_kit): add loader implementation 2023-02-16 15:13:21 +01:00
hugo a47c28a4d6 feat(ui_component): add loader component and style 2023-02-16 15:12:40 +01:00
hugo 63bbde8213 refactor(ui_component): remove CopyWith extension 2023-02-16 15:12:18 +01:00
hugo 8070623e88 fix(ui_component): add generated component with theme resolver 2023-02-16 15:11:34 +01:00
hugo 4c08a692d2 refactor(ui_kit): move exportable bloc from mixin to widget
continuous-integration/drone/push Build is failing
2023-02-16 11:55:11 +01:00
hugo 8044d07413 fix(ui_component): add style merge in Theme Resolver 2023-02-16 11:54:42 +01:00
hugo 1af9b0b1f1 refactor(ui_kit): make resolve private and dotter child a widget 2023-02-16 10:23:48 +01:00
hugo 3a7b0abc58 style(ui_kit): fix padding file selection
continuous-integration/drone/push Build is failing
2023-02-15 22:40:19 +01:00
hugo dd198b0e51 feat(ui_kit): update example with full studio button theme 2023-02-15 22:36:26 +01:00
hugo a595183107 fix(ui_component): fix extra value in compute extension function 2023-02-15 22:35:31 +01:00
hugo c786c153e0 feat(ui_kit): add theme control in example 2023-02-15 21:45:46 +01:00
hugo cc71bf7abd feat(ui_kit): finalize material ready buttons 2023-02-15 21:07:53 +01:00
hugo ed06e18043 fix(ui): move theme_resolver in compnoent to fix code generation 2023-02-15 20:35:25 +01:00
hugo 96781880f4 feat(ui): move style implementation from component to ui_kit with theme resolver 2023-02-15 20:14:32 +01:00
hugo c331bc6056 feat(ui_kit): add theme extension support in buttons + theme negociation 2023-02-15 15:57:36 +01:00
hugo 77ce4e33ab feat(ui_kit): add theme extension shortcut 2023-02-15 15:57:04 +01:00
hugo 2806ac5923 feat(ui_component): add copyWith gen and make button style lerping 2023-02-15 15:56:35 +01:00
hugo ed29f39673 refactor(ui_component): move extensions 2023-02-15 15:55:46 +01:00
hugo 7880293723 feat(ui_component): add lerp on multicolor 2023-02-15 15:55:27 +01:00
hugo 5c34528b3d fix(ui_kit): add cacheExtend as a trade-off in listview example 2023-02-14 14:49:39 +01:00
hugo 198d83b663 fix(ui_kit): add local font assets + compress images 2023-02-14 14:48:11 +01:00
hugo bd636e9d24 docs(ui_kit): add theme negociation explaination 2023-02-14 14:20:00 +01:00
hugo c942e2aacf feat(ui_kit): update example with drawer and custom launch parameters 2023-02-14 12:50:46 +01:00
hugo 82eeba4d7d feat(ui_kit): add multicolor support in linear gradient helper 2023-02-14 12:50:17 +01:00
hugo 4695cf0618 feat(ui_kit): implement file selection button with invalid cubit and dotted package 2023-02-14 11:55:34 +01:00
hugo d49a4cad31 feat(ui_component): add file selection component 2023-02-14 11:55:34 +01:00
hugo e4d904eb8d feat(ui_kit): implement simple icon button and use dimension style 2023-02-14 11:55:34 +01:00
hugo 4f1a064298 feat(ui_component): add simple icon button and dimension style 2023-02-14 11:55:34 +01:00
hugo 168d840b87 feat(ui_kit): add symbol button + enhance bloc control over state 2023-02-14 11:55:34 +01:00
hugo aea71fa32c feat(ui_kit): add symbol button 2023-02-14 11:55:34 +01:00
hugo b6f25dd5b5 refactor(ui_kit): use tapped state and merged styles 2023-02-14 11:55:34 +01:00
hugo 61e28ce5e7 refactor(ui_component): merge flat and outline buttons in only one style 2023-02-14 11:55:34 +01:00
hugo 5050e2c2bb feat(ui_component): add tapped control state 2023-02-14 11:55:34 +01:00
hugo 9e1b76e07b feat(ui_kit): use MultiColor in button style 2023-02-14 11:55:34 +01:00
hugo 442baa6882 feat(ui_component): add MultiColor util class 2023-02-14 11:55:34 +01:00
hugo 60126fffc4 feat(ui_kit): implement flat/outlined button 2023-02-14 11:55:34 +01:00
hugo 07572aeca2 feat(ui_component): add flat/outlined button styles 2023-02-14 11:55:34 +01:00
hugo 4332eafda0 feat(ui_kit): implement flat button 2023-02-14 11:55:34 +01:00
hugo 160b30d21b feat(ui_component): add button components 2023-02-14 11:54:48 +01:00
hugo 602a372d7c fix(uikit): remove useless file 2023-02-14 11:54:48 +01:00
hugo 43df087319 chore: update repo bricks 2023-02-14 11:54:48 +01:00
hugo 4f71118a65 chore(uikit): create package with mason 2023-02-14 11:54:48 +01:00
malo 4b37175d17 feat(ui_kit): add card theme extension, fix bugs & update example (close #126)
continuous-integration/drone/push Build is failing
2023-02-14 11:34:45 +01:00
malo ea18d39c44 style(ui_kit): remove cache files
continuous-integration/drone/push Build is failing
2023-02-10 16:23:08 +01:00
malo b9f2305bca build(ui_kit): add firebase config 2023-02-10 16:17:35 +01:00
malo 55822ad870 feat(ui_kit): add quote / skill / portfolio cards (#126)
continuous-integration/drone/push Build is failing
2023-02-10 16:01:07 +01:00
malo a563bd1fe3 style(ui_kit): add macos platform in example
continuous-integration/drone/push Build is failing
2023-02-10 14:19:32 +01:00
malo 5464cd1d40 feat(ui_kit): implement information card (#126)
continuous-integration/drone/push Build is failing
2023-02-10 14:08:04 +01:00
malo ba1c1016e5 style(ui_kit): remove default files 2023-02-10 11:35:51 +01:00
malo 23b608ed10 feat(ui_components): add gradient attribut to text wrapper
continuous-integration/drone/push Build is failing
2023-02-10 11:25:39 +01:00
hugo 44b2b7c27d chore(ui_kit): create package template
continuous-integration/drone/push Build is failing
2023-02-09 18:10:11 +01:00
hugo 6bad9a8a05 fix(ui_layout): fix textwrapper 2023-02-09 18:09:45 +01:00
hugo 5d8f94bee8 fix(cw_gen): fix textwrapper 2023-02-09 18:09:14 +01:00
hugo 75cb341447 fix(bloc_layout): fix textwrapper 2023-02-09 18:08:49 +01:00
hugo efa7ca09dd feat(ui_component): add string extension to easely wrap text 2023-02-09 18:08:03 +01:00
malo ac432f6dc8 feat(ui_components): export cards #126
continuous-integration/drone/push Build is failing
2023-02-09 16:50:48 +00:00
malo 6c85faba82 feat(ui_components): add portfolio & skill cards #126 2023-02-09 16:50:48 +00:00
malo dd75ecfc7a feat: make text wrapper constructor constant 2023-02-09 16:50:48 +00:00
malo 0132771e17 feat(ui_components): add text wrapper instead of String/Widget for Texts 2023-02-09 16:50:48 +00:00
malo 5d5ae145aa feat(ui_components): make fields nullable and not required in quote card 2023-02-09 16:50:48 +00:00
malo 07428a5215 fix(ui_components): remove darkmode enable field in cards 2023-02-09 16:50:48 +00:00
malo c994c822b0 feat(ui_components): export components and add license header 2023-02-09 16:50:48 +00:00
malo bde54e0cf5 feat(ui_components): add information_card & quote_card (#126) 2023-02-09 16:50:48 +00:00
malo f3c3939ba1 docs: update readme
continuous-integration/drone/push Build is failing
2023-02-07 14:26:53 +00:00
hugo 9339100399 chore(release): publish packages
continuous-integration/drone/push Build is failing
- wyatt_analysis@2.4.0
2023-02-07 14:46:21 +01:00
hugo 03725c25c7 feat(analysis): add new lint rules 2023-02-07 14:44:57 +01:00
hugo 588a09e0a1 docs(analysis): add instructions to create a new version (closes #104) 2023-02-07 14:43:52 +01:00
malo bd53d11e0d refactor(bloc_layout): migrate bloc layouts using copywith component method (close #121)
continuous-integration/drone/push Build is failing
2023-02-07 11:46:50 +01:00
malo ee8f08cc32 refactor(ui_layout): update exemple (close #116)
continuous-integration/drone/push Build is failing
2023-02-07 10:49:56 +01:00
malo 413589462b refactor(ui_layout): migrate layouts using copywith component method (#116) 2023-02-07 10:49:09 +01:00
malo ff3f2008de fix(ui_components): generate new files after generator fixes (close #118)
continuous-integration/drone/push Build is failing
2023-02-07 10:25:58 +01:00
malo 0b27a62669 fix(component_copy_with_gen): update example (#118) 2023-02-07 10:24:00 +01:00
malo 6c9b6e239b fix(component_copy_with_gen): copywith method takes non nullable fields too (#118) 2023-02-07 10:22:32 +01:00
malo 576a01512b refactor(ui_components): update example (close #115)
continuous-integration/drone/push Build is failing
2023-02-07 09:44:34 +01:00
malo cd3ed0fe69 refactor(ui_components): migrate components using code generator packages (#115) 2023-02-07 09:44:03 +01:00
AN12345 46c51525e8 feat: add generators for components proxy and mixins to enable copywith methods
continuous-integration/drone/push Build is failing
2023-02-06 18:42:34 +01:00
AN12345 b025247002 feat: add class annotation for component code generators 2023-02-06 18:41:54 +01:00
AN12345 c70d4c6650 build: update mason file to add new tempalte 2023-02-06 18:40:35 +01:00
AN12345 04a87fe32a feat(bloc_layout): make package compatible with crud cubit (close #111)
continuous-integration/drone/push Build is passing
2022-12-19 19:21:38 -05:00
AN12345 f8f367baf6 (feat): rething conception and add missing layouts (close #97)
continuous-integration/drone/push Build is passing
2022-12-13 18:50:47 -05:00
AN12345 e667aa06d0 feat(ui_layout): make field nullable & add new app bar fields (#97) 2022-12-13 18:49:28 -05:00
hugo f6ef5828bb chore(release): publish packages
continuous-integration/drone/push Build is passing
- wyatt_authentication_bloc@0.4.1
2022-12-13 17:29:38 -05:00
Malo Léon f22ba300cb Merge pull request 'authentication/feature/google_signin' (#105) from authentication/feature/google_signin into master
continuous-integration/drone/push Build is passing
Reviewed-on: #105
Reviewed-by: Malo Léon <malo.leon@wyattapp.io>
2022-12-13 22:07:16 +00:00
hugo 5f52b2fc3d refactor(authentication): use fromFirebaseUser factory to parse user 2022-12-13 17:00:26 -05:00
hugo f46707f5c1 style(authentication): Merge 'origin/master' into authentication/feature/google_signin 2022-12-13 16:42:50 -05:00
AN12345 17ff0f8ba1 clean(packages): apply dart fix (close #106)
continuous-integration/drone/push Build is passing
2022-12-13 13:52:49 -05:00
hugo 1a3631f691 feat(authentication): add google sign in in signIn cubit 2022-12-13 00:36:20 -05:00
hugo 197c5d54e6 feat(authentication): add google sign in parameter in firebase data source constructor 2022-12-12 23:47:29 -05:00
hugo c7b241de2d feat(authentication): add google sign_in support (closes #59) 2022-12-12 23:16:10 -05:00
hugo 94d573a584 refactor(authentication): update deps and re-export them 2022-12-12 23:14:55 -05:00
hugo 37e00fe9c4 style(analysis): dart format + follows wyatt analysis 2.3.0 2022-12-12 22:43:54 -05:00
hugo 3c8ff373a1 chore(release): publish packages
continuous-integration/drone/push Build is passing
- wyatt_analysis@2.3.0
2022-12-12 22:17:35 -05:00
hugo 640cfaf118 refactor(analysis): follow melos versioning
continuous-integration/drone/push Build is passing
2022-12-12 22:15:32 -05:00
hugo 7fc3736854 feat(analysis): exclude generated code, and add dart>2.16 rules
continuous-integration/drone/push Build is passing
2022-12-12 22:02:31 -05:00
hugo 29d8ec640f feat(analysis): add overwrite protection 2022-12-12 21:38:57 -05:00
hugo 7f9621b4f6 feat(analysis): add 2.2.2 files for archive 2022-12-12 21:37:20 -05:00
hugo 7b61f3f08a feat(analysis): add utils script to easely bump version 2022-12-12 21:36:39 -05:00
hugo 75a5facfdc fix(analysis): change file include to keep coherence 2022-12-12 21:30:22 -05:00
AN12345 c93b7fb5f7 feat(bloc_layout): export layout_package & adapt imports
continuous-integration/drone/push Build is passing
2022-12-12 20:32:29 -05:00
hugo aee7060a0b ci: fix http client test error
continuous-integration/drone/push Build is passing
2022-12-12 15:20:47 -05:00
AN12345 4f49f4931c refactor(ui_layout): update example (#92)
continuous-integration/drone/push Build is failing
2022-12-12 14:21:48 -05:00
AN12345 e8172004a3 refactor(ui_component): update example (#92) 2022-12-12 14:21:13 -05:00
AN12345 c6d8ca37fe refactor(bloc_layout): update example (#92) 2022-12-12 14:20:20 -05:00
AN12345 e01f47d41a refactor(ui_layout): update package using nullable component data (#92) 2022-12-12 14:14:15 -05:00
AN12345 7a24a36af0 refactor(bloc_layout): update package using nullable component data (#92) 2022-12-12 14:13:00 -05:00
AN12345 244a286509 refactor(ui_components): update example (#92) 2022-12-12 14:10:41 -05:00
AN12345 81a7ca5a1f feat(ui_components): make component data field nullable (#92) 2022-12-12 14:08:36 -05:00
AN12345 45c7bd6fca refactor(ui_layout): update example with components updates (close #90)
continuous-integration/drone/push Build is failing
2022-12-12 12:42:11 -05:00
AN12345 cd2806b07b refactor(bloc_layout): update example with new app bar entity (#90) 2022-12-12 12:36:40 -05:00
AN12345 dd275460f6 feat(ui_components): make app bar leading & actions customizable 2022-12-12 12:34:02 -05:00
AN12345 dc0f0c61c6 feat(bloc_layout): export useful packages (close #88)
continuous-integration/drone/push Build is failing
2022-12-12 11:25:40 -05:00
hugo 1e305c75bd docs: update readme with melos commands
continuous-integration/drone/push Build is failing
2022-12-11 21:28:47 -05:00
hugo 9af76b8e1f ci: add package tests and validation 2022-12-12 01:21:37 +00:00
hugo 5593620181 refactor: change quality check rule name 2022-12-12 01:21:37 +00:00
hugo a19d4bc5ce chore: update melos config 2022-12-12 01:21:37 +00:00
hugo 21b18054ba chore(package): clean unimplemented tests 2022-12-12 01:21:37 +00:00
AN12345 ff90af47cd fix(bloc_layout): update export file 2022-12-11 23:38:54 +00:00
AN12345 3bb57e65f8 fix(bloc_layout): rename file 2022-12-11 23:38:54 +00:00
AN12345 9d0aac7894 feat(bloc_layout): add all layout avalaible with crud bloc 2022-12-11 23:38:54 +00:00
AN12345 a561cbff23 feat(bloc_layout): link error widget to error state 2022-12-11 23:38:54 +00:00
AN12345 fafec78546 clean(bloc_layout): remove test folder 2022-12-11 23:38:54 +00:00
AN12345 feca378131 feat(bloc_layout): add new package to combine bloc_helper, crud_bloc, ui_components, and ui_layout 2022-12-11 23:38:54 +00:00
hugo f223811f4b chore(medium): remove unused package 2022-12-08 14:32:19 -05:00
hugo ed65489316 chore(cli): remove unused package 2022-12-08 14:31:57 -05:00
AN12345 33797e4dbf refactor(ui_layout): update appbar component (close #78) 2022-12-08 18:58:37 +00:00
AN12345 3aa6d03dd6 refactor(crud_bloc): update package using new architecture usecase execute method (close #77) 2022-12-08 13:29:01 -05:00
hugo bf03324fd0 chore: add pre-commit rule (see #72) 2022-12-08 03:46:10 +00:00
hugo 5e83c9e74e docs(auth): add correct header 2022-12-07 19:52:01 -05:00
hugo 672aba7084 fix(auth): fix mock on register 2022-12-07 19:52:00 -05:00
hugo 94d7efbe8c fix(form): fix textController rebuild 2022-12-07 19:51:59 -05:00
hugo 5298bd99ed feat(authentication): add reauthenticate, updateEmail and updatePassword 2022-12-07 19:50:19 -05:00
AN12345 d792f4cbe9 feat(ui_layout): update example & move configure function (#69) 2022-12-07 18:54:48 -05:00
AN12345 098ec9715e feat(ui_layout): add loading & error widget to component theme (close #69) 2022-12-07 18:20:04 -05:00
AN12345 6d3c64d17c feat(ui_layout): add frame layout (close #67) 2022-12-07 17:14:00 -05:00
AN12345 c615186f19 docs(ui_layout): update models 2022-12-07 15:44:05 -05:00
AN12345 55e24fb23b fix(ui_layout): fix emample after splititng packages 2022-12-07 15:37:46 -05:00
AN12345 4d04c3f446 doc: update readme(s) 2022-12-07 15:04:48 -05:00
AN12345 a20e4a1715 refractor: migrate components in right package 2022-12-07 14:56:05 -05:00
AN12345 cf9f1ddb65 feat: create new package to split components and layouts 2022-12-07 14:13:24 -05:00
AN12345 0c141c715e fix(ui_layout): remove unecessary dependencies 2022-12-07 02:38:14 +00:00
AN12345 d0f59bbf29 refactor(ui_layout): update field name 2022-12-07 02:38:14 +00:00
AN12345 562f84dd33 doc(ui_layout): add class models 2022-12-07 02:38:14 +00:00
AN12345 771f600eb7 feat(ui_layout): add new package for app compenant and start implementing layouts 2022-12-07 02:38:14 +00:00
hugo 7fcb9e8ac3 chore(release): publish packages
- wyatt_bloc_helper@2.0.0
 - wyatt_type_utils@0.0.4
 - wyatt_authentication_bloc@0.4.0+3
 - wyatt_crud_bloc@0.1.0+2
 - wyatt_architecture@0.1.0+1
 - wyatt_form_bloc@0.2.0+2
2022-12-04 21:08:15 -05:00
hugo 2a4e29f38c chore(release): publish packages
- wyatt_architecture@0.1.0
 - wyatt_authentication_bloc@0.4.0+2
 - wyatt_crud_bloc@0.1.0+1
 - wyatt_form_bloc@0.2.0+1
2022-12-03 20:40:23 -05:00
hugo ca70f2eb1d feat(authentication)!: add repo in callback usecases (close #55) 2022-12-03 18:53:20 -05:00
hugo f123e537ae fix(authentication): allow email/password validators customization (closes #57) 2022-12-03 18:41:04 -05:00
AN12345 c3315d968c refactor(bloc_helper)!: update onWrap label (close #46) 2022-11-24 18:16:20 -05:00
AN12345 45312473d1 feat: add gen-class-models in melos scripts 2022-11-24 17:55:07 -05:00
AN12345 17e7bce9e6 refactor(architecture): update naming methodes (close #47) 2022-11-24 17:25:44 -05:00
hugo 3886ef080e fix(crud)!: use FutureOrResult extension (close #42) 2022-11-24 15:24:59 -05:00
hugo 626d951443 fix(authentication)!: use FutureOrResult extension (close #41) 2022-11-24 11:18:16 -05:00
hugo f36e0b51e0 feat(type): add Result extension on FutureOr type (close #40) 2022-11-23 19:13:04 -05:00
AN12345 80ce7aff91 fix(architecture): fix execute method on error handler. (#38) 2022-11-23 23:11:04 +00:00
AN12345 a9121b6862 refactor(architecture): update example. (close #38) 2022-11-23 23:11:04 +00:00
AN12345 54f92e8042 docs(architecture): generate class model. (#38) 2022-11-23 23:11:04 +00:00
AN12345 00393a6ba7 docs(architecture): update Readme. (#38) 2022-11-23 23:11:04 +00:00
AN12345 136e0e8c98 chore(architecture)!: update exports. (#38) 2022-11-23 23:11:04 +00:00
AN12345 500a6ae51d feat(architecture): update usecase en add & sepcific case. (#38) 2022-11-23 23:11:04 +00:00
AN12345 79fdde25fc feat(architecture): add obsevers for alternative usecase scenarions (#38) 2022-11-23 23:11:04 +00:00
Malo Léon 742bf1d614 Merge pull request 'config/update_project_management' (#32) from config/update_project_management into master
Reviewed-on: #32
Reviewed-by: Hugo Pointcheval <hugo@noreply@wyatt-studio.fr>
2022-11-22 02:33:48 +00:00
AN12345 0dbde68d7d typo: fix readme typo error 2022-11-21 21:32:36 -05:00
AN12345 cd881da072 doc: update readme 2022-11-21 21:20:25 -05:00
AN12345 5918a5cf1f doc: add simple workflow diagramm 2022-11-21 21:20:01 -05:00
AN12345 775d766d14 build: update melos configuration and update targets 2022-11-21 20:59:36 -05:00
AN12345 383098b147 build: add mason configuration files 2022-11-21 20:59:02 -05:00
AN12345 4d51e2b786 build: add coverage script 2022-11-21 20:58:18 -05:00
AN12345 32cc1f55d9 chore: update gitignore 2022-11-21 20:57:52 -05:00
AN12345 6ee101bf36 doc: update readme 2022-11-21 20:54:57 -05:00
hugo f0ed08bd49 feat(auth): add reloadCache method in AuthenticationCubit 2022-11-16 19:52:24 -05:00
hugo 390fb81b1e fix(auth): fix stream account, now including correctly extra data 2022-11-16 19:51:45 -05:00
hugo 279d451cd8 fix(auth): fix mock isNewUser 2022-11-16 19:48:03 -05:00
hugo a66db23ace chore(release): publish packages
- wyatt_authentication_bloc@0.4.0+1
2022-11-16 17:20:57 -05:00
hugo 3d7af98ac9 fix(auth): add sort of mutex on onAuthChanges callback trigger 2022-11-16 17:16:41 -05:00
AN12345 b033b97917 feat(notification_bloc) add new package for push notification management 2022-11-16 16:58:19 -05:00
hugo 14b7f31b53 chore(form): use hard link for vscode folder 2022-11-16 16:32:05 -05:00
hugo 403bcafe93 chore(form): remove vscode symlink 2022-11-16 16:30:49 -05:00
hugo 21ab6f6021 chore(auth): use hardlink for vscode folder 2022-11-16 16:27:51 -05:00
hugo 198ecac5da chore(auth): remove vscode symlink to fix publish 2022-11-16 16:18:23 -05:00
hugo c945cd435e chore(release): publish packages
- wyatt_authentication_bloc@0.4.0
 - wyatt_form_bloc@0.2.0
2022-11-16 16:03:13 -05:00
hugo 852d29ef0a refactor(auth): update example with new input builders 2022-11-16 16:02:18 -05:00
hugo 08383ec03b refactor(form)!: input builders provides FormInput 2022-11-16 16:00:13 -05:00
hugo ee8ce76839 fix(form): disable status selection and rebuild SubmitBuilder on every state changes #28 2022-11-16 15:51:34 -05:00
hugo f05f2230e9 fix(auth): add initial null account event in stream in the mock authentication 2022-11-16 15:46:07 -05:00
hugo 54002beaab test(auth): add tests for the SignUpCubit update method 2022-11-16 15:45:11 -05:00
hugo d5698fbffc test(form): add formReplace test case #27 2022-11-16 15:43:52 -05:00
hugo 31ad460757 fix(auth)!: add signInWithEmailAndPassword and signInAnonymously methods in SignInCubit #26 2022-11-15 19:25:20 -05:00
hugo 4fd2a2a16c chore(auth): remove old example and rename actual 2022-11-15 18:52:10 -05:00
hugo 6eb40de72c feat(form): add metadata tag to bypass validation #29 2022-11-15 18:48:02 -05:00
hugo cecbc94a95 chore(auth): add global vscode folder symlink 2022-11-15 18:13:56 -05:00
hugo 3820fc4764 chore(auth): remove local vscode folder 2022-11-15 18:13:30 -05:00
hugo 1b893a5b84 test(form): add some tests 2022-11-15 18:10:50 -05:00
hugo 72661a343f fix(form): fix set operations behaviors 2022-11-15 18:10:30 -05:00
hugo 9ebe8e21dc fix(form): add nullable validator on boolean value 2022-11-15 18:09:39 -05:00
hugo 141f15b444 feat(form): add shorthands to access validator status 2022-11-15 18:09:13 -05:00
hugo 3a8a604a48 chore(form): add vscode folder symlink 2022-11-15 18:06:13 -05:00
hugo 41493207b3 chore(form): remove local vscode folder 2022-11-15 18:05:18 -05:00
hugo cbc4a2e149 chore: change vscode global settings 2022-11-15 18:03:30 -05:00
hugo 7345e415a7 chore(release): publish packages
- wyatt_crud_bloc@0.1.0
2022-11-13 20:29:19 -05:00
hugo ff680614aa typo(crud): fix line length 2022-11-13 20:21:20 -05:00
hugo 3e110e2eb5 fix(crud): update example 2022-11-13 20:19:21 -05:00
hugo 1ccb0a540e refactor(crud)!: migrate to wyatt architecture 2022-11-13 20:19:10 -05:00
hugo f9da719b91 refactor(crud): add vscode config 2022-11-13 20:18:10 -05:00
hugo 95f41025f4 chore(release): publish packages
- wyatt_authentication_bloc@0.3.0+1
2022-11-11 19:09:01 -05:00
hugo eceda684f0 fix(auth): fix some bugs to validate publishing 2022-11-11 19:08:28 -05:00
1007 changed files with 34262 additions and 8038 deletions
+36
View File
@@ -0,0 +1,36 @@
# Copyright (C) 2022 WYATT GROUP
# Please see the AUTHORS file for details.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
kind: pipeline
type: docker
name: default
steps:
- name: quality-check
image: git.wyatt-studio.fr/wyatt-foss/flutter-melos:2.9.0-1
commands:
- melos run quality-check
- melos run publish:validate
- name: publish
image: git.wyatt-studio.fr/wyatt-foss/flutter-melos:2.9.0-1
commands:
- melos run publish:validate
trigger:
branch:
- master
event:
- push
+4 -1
View File
@@ -197,4 +197,7 @@ $RECYCLE.BIN/
.idea/ .idea/
*.iml *.iml
google-services.json google-services.json
pubspec_overrides.yaml pubspec_overrides.yaml
# Mason
.mason/
+7
View File
@@ -0,0 +1,7 @@
repos:
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v2.1.1
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
args: [build, ci, docs, feat, fix, perf, refactor, style, test, chore]
+7 -2
View File
@@ -1,4 +1,10 @@
{ {
// Dart
"dart.runPubGetOnPubspecChanges": "never",
// Gitea
"gitea.owner": "Wyatt-FOSS",
"gitea.repo": "wyatt-packages",
// Header
"psi-header.changes-tracking": { "psi-header.changes-tracking": {
"isActive": true "isActive": true
}, },
@@ -67,5 +73,4 @@
], ],
} }
], ],
"dart.runPubGetOnPubspecChanges": false, }
}
+272
View File
@@ -3,6 +3,278 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## 2023-02-24
### Changes
---
Packages with breaking changes:
- There are no breaking changes in this release.
Packages with other changes:
- [`wyatt_analysis` - `v2.4.1`](#wyatt_analysis---v241)
---
#### `wyatt_analysis` - `v2.4.1`
- **FEAT**: add latest version persistence between script executions.
- **FEAT**: ignore todo's.
## 2023-02-07
### Changes
---
Packages with breaking changes:
- There are no breaking changes in this release.
Packages with other changes:
- [`wyatt_analysis` - `v2.4.0`](#wyatt_analysis---v240)
---
#### `wyatt_analysis` - `v2.4.0`
- **FEAT**: add new lint rules.
- **DOCS**: add instructions to create a new version (closes #104).
## 2022-12-13
### Changes
---
Packages with breaking changes:
- There are no breaking changes in this release.
Packages with other changes:
- [`wyatt_authentication_bloc` - `v0.4.1`](#wyatt_authentication_bloc---v041)
---
#### `wyatt_authentication_bloc` - `v0.4.1`
- **REFACTOR**: use fromFirebaseUser factory to parse user.
- **REFACTOR**: update deps and re-export them.
- **FIX**: fix mock on register.
- **FEAT**: add google sign in in signIn cubit.
- **FEAT**: add google sign in parameter in firebase data source constructor.
- **FEAT**: add google sign_in support (closes #59).
- **FEAT**: add reauthenticate, updateEmail and updatePassword.
- **DOCS**: add correct header.
## 2022-12-12
### Changes
---
Packages with breaking changes:
- There are no breaking changes in this release.
Packages with other changes:
- [`wyatt_analysis` - `v2.3.0`](#wyatt_analysis---v230)
---
#### `wyatt_analysis` - `v2.3.0`
- **REFACTOR**: follow melos versioning.
- **FIX**: change file include to keep coherence.
- **FEAT**: exclude generated code, and add dart>2.16 rules.
- **FEAT**: add overwrite protection.
- **FEAT**: add 2.2.2 files for archive.
- **FEAT**: add utils script to easely bump version.
## 2022-12-04
### Changes
---
Packages with breaking changes:
- [`wyatt_bloc_helper` - `v2.0.0`](#wyatt_bloc_helper---v200)
Packages with other changes:
- [`wyatt_type_utils` - `v0.0.4`](#wyatt_type_utils---v004)
- [`wyatt_authentication_bloc` - `v0.4.0+3`](#wyatt_authentication_bloc---v0403)
- [`wyatt_crud_bloc` - `v0.1.0+2`](#wyatt_crud_bloc---v0102)
- [`wyatt_architecture` - `v0.1.0+1`](#wyatt_architecture---v0101)
- [`wyatt_form_bloc` - `v0.2.0+2`](#wyatt_form_bloc---v0202)
Packages with dependency updates only:
> Packages listed below depend on other packages in this workspace that have had changes. Their versions have been incremented to bump the minimum dependency versions of the packages they depend upon in this project.
- `wyatt_authentication_bloc` - `v0.4.0+3`
- `wyatt_crud_bloc` - `v0.1.0+2`
- `wyatt_architecture` - `v0.1.0+1`
- `wyatt_form_bloc` - `v0.2.0+2`
---
#### `wyatt_bloc_helper` - `v2.0.0`
- **BREAKING** **REFACTOR**: update onWrap label (close #46).
#### `wyatt_type_utils` - `v0.0.4`
- **FEAT**: add Result extension on FutureOr type (close #40).
## 2022-12-03
### Changes
---
Packages with breaking changes:
- [`wyatt_architecture` - `v0.1.0`](#wyatt_architecture---v010)
Packages with other changes:
- [`wyatt_authentication_bloc` - `v0.4.0+2`](#wyatt_authentication_bloc---v0402)
- [`wyatt_crud_bloc` - `v0.1.0+1`](#wyatt_crud_bloc---v0101)
- [`wyatt_form_bloc` - `v0.2.0+1`](#wyatt_form_bloc---v0201)
Packages with dependency updates only:
> Packages listed below depend on other packages in this workspace that have had changes. Their versions have been incremented to bump the minimum dependency versions of the packages they depend upon in this project.
- `wyatt_authentication_bloc` - `v0.4.0+2`
- `wyatt_crud_bloc` - `v0.1.0+1`
- `wyatt_form_bloc` - `v0.2.0+1`
---
#### `wyatt_architecture` - `v0.1.0`
- **REFACTOR**: update naming methodes (close #47).
- **REFACTOR**: update example. (close #38).
- **FIX**: fix execute method on error handler. (#38).
- **FEAT**: update usecase en add & sepcific case. (#38).
- **FEAT**: add obsevers for alternative usecase scenarions (#38).
- **DOCS**: generate class model. (#38).
- **DOCS**: update Readme. (#38).
- **BREAKING** **CHORE**: update exports. (#38).
## 2022-11-16
### Changes
---
Packages with breaking changes:
- There are no breaking changes in this release.
Packages with other changes:
- [`wyatt_authentication_bloc` - `v0.4.0+1`](#wyatt_authentication_bloc---v0401)
---
#### `wyatt_authentication_bloc` - `v0.4.0+1`
- **FIX**: add sort of mutex on onAuthChanges callback trigger.
## 2022-11-16
### Changes
---
Packages with breaking changes:
- [`wyatt_authentication_bloc` - `v0.4.0`](#wyatt_authentication_bloc---v040)
- [`wyatt_form_bloc` - `v0.2.0`](#wyatt_form_bloc---v020)
Packages with other changes:
- There are no other changes in this release.
---
#### `wyatt_authentication_bloc` - `v0.4.0`
- **REFACTOR**: update example with new input builders.
- **FIX**: add initial null account event in stream in the mock authentication.
- **BREAKING** **FIX**: add signInWithEmailAndPassword and signInAnonymously methods in SignInCubit #26.
#### `wyatt_form_bloc` - `v0.2.0`
- **FIX**: disable status selection and rebuild SubmitBuilder on every state changes #28.
- **FIX**: fix set operations behaviors.
- **FIX**: add nullable validator on boolean value.
- **FEAT**: add metadata tag to bypass validation #29.
- **FEAT**: add shorthands to access validator status.
- **BREAKING** **REFACTOR**: input builders provides FormInput.
## 2022-11-13
### Changes
---
Packages with breaking changes:
- [`wyatt_crud_bloc` - `v0.1.0`](#wyatt_crud_bloc---v010)
Packages with other changes:
- There are no other changes in this release.
---
#### `wyatt_crud_bloc` - `v0.1.0`
- **REFACTOR**: add vscode config.
- **FIX**: update example.
- **BREAKING** **REFACTOR**: migrate to wyatt architecture.
## 2022-11-11
### Changes
---
Packages with breaking changes:
- There are no breaking changes in this release.
Packages with other changes:
- [`wyatt_authentication_bloc` - `v0.3.0+1`](#wyatt_authentication_bloc---v0301)
---
#### `wyatt_authentication_bloc` - `v0.3.0+1`
- **FIX**: fix some bugs to validate publishing.
## 2022-11-11 ## 2022-11-11
### Changes ### Changes
+146 -38
View File
@@ -1,27 +1,23 @@
<!-- <!--
* Copyright (C) 2022 WYATT GROUP * Copyright (C) 2022 WYATT GROUP
* Please see the AUTHORS file for details. * Please see the AUTHORS file for details.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or * the Free Software Foundation, either version 3 of the License, or
* any later version. * any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
--> -->
<p align="center"> <p align="center">
<a href="https://wyatt-studio.fr">
<a href="https://wyattapp.io">
<img width="150px" src="resources/wyatt-campus-logo.png">
</a>
<a href="https://wyatt-studio.fr">
<img width="150px" src="resources/wyatt-studio-logo.png"> <img width="150px" src="resources/wyatt-studio-logo.png">
</a> </a>
<h1 align="center">Wyatt Packages</h1> <h1 align="center">Wyatt Packages</h1>
@@ -44,64 +40,108 @@
## About ## About
Here is it a set of [Flutter plugins](https://flutter.io/platform-plugins/) that power up your applications. Here is a set of [Flutter plugins](https://flutter.io/platform-plugins/) that enhance your applications.
[Flutter](https://flutter.dev) is Google's UI toolkit for building beautiful, natively compiled applications for mobile, web, and desktop from a single codebase. Flutter is used by developers and organizations around the world, and is free [Flutter](https://flutter.dev) is Google's UI toolkit for building beautiful, natively compiled applications for mobile, web, and desktop using a single codebase. It is used by developers and organizations worldwide and is free and open-source.
and open source.
--- ---
## Development ## Contribution
Clone this repo. Clone this repo.
You have to install [melos](https://github.com/invertase/melos). ```shell
git clone ssh://git@git.wyatt-studio.fr:993/Wyatt-FOSS/wyatt-packages.git
```
### Prerequisite
1. [Flutter](https://github.com/flutter/flutter). It is a UI toolkit developed by Google for building beautiful and natively compiled applications for mobile, web, and desktop from a single codebase.
2. [Melos](https://github.com/invertase/melos). Melos is a tool that helps in managing Dart projects that have multiple packages. It can be installed using the following command:
```shell ```shell
dart pub global activate melos dart pub global activate melos
``` ```
Then bootstrap with `melos bs`. 3. [Mason](https://github.com/felangel/mason). Mason is used for code generation purposes. It can be installed by running the following command:
```shell
dart pub global activate mason_cli
```
4. [Lcov](https://github.com/linux-test-project/lcov). Lcov is a tool used to generate coverage data. It can be installed on macOS by running the following command:
```shell
# on macos
brew install lcov
```
- genhtml. Used to convert coverage data into html pages.
After installation of all these packages, the project can be bootstrapped using the command `melos bs`.
### Create a new package ### Create a new package
Create a new package in `packages/` folder. Create a new package in `packages/` folder.
To create a new package in the packages/ folder, run the following command in the terminal:
```shell ```shell
dart create -t package-simple wyatt_<name> mason make wyatt_package --package_name wyatt_<name> --description A new Wyatt package --flutter_only false
``` ```
Remove any `example/` subfolder. Then create a new sample project. The <name> variable in the above command is important and must be clear and understandable.
```shell After creating the package, bootstrap the project with the `melos bs` command.
flutter create --platforms android --project-name <name>_example example
```
Then bootstrap project with `melos bs` command.
### Convention
#### Naming #### Naming
In the previous instructions `<name>` variable is important. In the previous instructions `<name>` variable is important.
It have to be clear and intelligible. It have to be clear and intelligible.
You **MUST** use underscores. 1. You must use underscores in the name.
2. You must use the wyatt prefix for the package name.
3. You must name the example with a specific name.
You **MUST** use `wyatt` prefix for package. For example, if the name is "CRUD BLOC," the following naming conventions should be used:
You **MUST** name example with specific name. 1. name: crud_bloc
2. package name: wyatt_crud_bloc
3. example name: crud_bloc_example
For example, if name is CRUD BLOC ### Create issues
- name will be crud_bloc
- so the package will be: `wyatt_crud_bloc`
- and the example will be: `crud_bloc_example`
#### Commits Create an issue for each specific feature or task you want to work on and label it correctly using the following format:
```
Type(scope): issue.
```
For example, on notification bloc package :
- `Feature(notification_bloc): add firebase messaging data source.`
- `Test(notification_bloc): add test for pushwoosh datasource.`
### Branches
The master branch is protected and cannot be pushed to directly. Please create a separate branch for each feature or task, with a name that corresponds to the related issue. The branch name should follow this format:
`type(scope):issue`
Example :
For the issue:
- `Feature(notification_bloc): add firebase messaging data source.`
The related branch should be named:
- `notification_bloc/feat/add_firebase_messaging_data_source`
### Commits
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
tl;dr : `type(scope): description`. tl;dr : `type(scope): description #issue`.
Here allowed <type> values: Here allowed <type> values:
- **feat** for a new feature for the user, not a new feature for build script. Such commit will trigger a release bumping a MINOR version. - **feat** for a new feature for the user, not a new feature for build script. Such commit will trigger a release bumping a MINOR version.
@@ -115,11 +155,72 @@ Here allowed <type> values:
Some examples : Some examples :
- `feat(auth): add AWS support.` = add a feature in authentication_bloc package. - `feat(auth): add AWS support. (#31)` = add a feature in authentication_bloc package, linked to the 31st issue.
- `docs: update readme.` = update **this** readme file. - `docs: update readme.` = update **this** readme file.
- `fix(crud)!: fix bug in awesome() function.` = fix a bug, `!` is important and indicate `BREAKING CHANGES`. - `fix(crud)!: fix bug in awesome() function. (#32)` = fix a bug, `!` is important and indicate `BREAKING CHANGES` linked with the 32nd issue.
Conventional commits are important for `melos version` command ! When you have completed your development work and are ready to resolve the related issue, you can close it via your commit message by including (close #issue_number). For example:
```shell
feat(auth): add AWS support. (close #31)
```
```shell
melos run test:all # this will run all tests in this project
melos run gen-coverage # this will generate coverage report
melos run gen-class-models # this will generate plantuml class diagrams
melos run quality-check # this will run all targets generally expected in CI
melos run publish:validate # this will run a validation before publish packages
melos run publish # this will publish packages
```
Please note that the issue will only be closed after it has been merged into the master branch. Before closing the issue, it is important to verify that all tests have been run and that coverage has been updated.
#### Merge your work
When you have completed your work and closed the related issue, it's possible that some changes may have been made to the master branch in the meantime. To maintain a clean Git history, it's recommended to rebase before creating a change request (pull request).
Two situations :
- You haven't created a branch yet and have made local commits:
```shell
git pull --rebase
```
- You are already working on a branch:
```shell
git rebase -i master
```
It's recommended to use the `--fixup` option during the interactive rebase to keep the Git history clean.
Once you have rebased, you can create a pull request, receive the necessary approvals, and then merge your work. And with that, you're done! 🎉
#### Update version.
When your work has been merged into the master branch, it's time to update the package version. To update only your specific package, use the --scope option. For example, after merging changes into the `wyatt_notification_bloc` package, you can run the following command:
```shell
melos version --scope="*wyatt_notification_bloc*"
```
This will filter all packages that match the `wyatt_notification_bloc` pattern and update only that package.
You can then verify that all packages and their tests are working correctly by running:
```shell
melos run test:all
```
#### Publish your package
If package is ready for procution, publish it runnig :
```shell
melos publish --scope"*package*"
```
#### Badging #### Badging
@@ -130,7 +231,8 @@ In the package `readme.md` file, please specify the supported SDK:
```markdown ```markdown
![SDK: Dart & Flutter](https://img.shields.io/badge/SDK-Dart%20%7C%20Flutter-blue?style=flat-square) ![SDK: Dart & Flutter](https://img.shields.io/badge/SDK-Dart%20%7C%20Flutter-blue?style=flat-square)
``` ```
or
or
![SDK: Dart](https://img.shields.io/badge/SDK-Dart-blue?style=flat-square) ![SDK: Dart](https://img.shields.io/badge/SDK-Dart-blue?style=flat-square)
@@ -157,8 +259,14 @@ Here you can change `package name` and `package version`.
--- ---
## Simple work flow diagramm
To sum up, here a simple work flow diagramm.
![Dev Wokflow](doc/workflow.svg)
## Status ## Status
![Status: Experimental](https://img.shields.io/badge/Status-WIP-red?style=flat-square) ![Status: Experimental](https://img.shields.io/badge/Status-WIP-red?style=flat-square)
This repository is maintained by Wyatt Studio but work is in progress. This repository is maintained by Wyatt Studio but work is in progress.
+14
View File
@@ -0,0 +1,14 @@
#!/usr/bin/env bash
escapedPath="$(echo `pwd` | sed 's/\//\\\//g')"
if grep flutter pubspec.yaml > /dev/null; then
if [ -d "coverage" ]; then
# combine line coverage info from package tests to a common file
if [ ! -d "$MELOS_ROOT_PATH/coverage" ]; then
mkdir "$MELOS_ROOT_PATH/coverage"
fi
sed "s/^SF:lib/SF:$escapedPath\/lib/g" coverage/lcov.info >> "$MELOS_ROOT_PATH/coverage/lcov.info"
rm -rf "coverage"
fi
fi
+15
View File
@@ -0,0 +1,15 @@
@startuml Simple Developpment Workflow
start
:Create an issue;
:Create branch related to the issue;
repeat :Commit related to the issue;
repeat while (feature is done)
:Update coverage;
:Close issue via last commit;
:Rebase from `master`;
:Create pull request;
:Merge branches;
:Update version;
:Publish package;
stop
@enduml
+25
View File
File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 7.5 KiB

+1
View File
@@ -0,0 +1 @@
{"bricks":{"wyatt_component_template":{"git":{"url":"ssh://git@git.wyatt-studio.fr:993/Wyatt-FOSS/wyatt-bricks.git","path":"bricks/wyatt_component_template","ref":"7cea909470ce75b91840f479649b93f953ded596"}}}}
+25
View File
@@ -0,0 +1,25 @@
# Copyright (C) 2023 WYATT GROUP
# Please see the AUTHORS file for details.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
bricks:
wyatt_package_template:
git:
url: "ssh://git@git.wyatt-studio.fr:993/Wyatt-FOSS/wyatt-bricks.git"
path: bricks/wyatt_package_template
wyatt_component_template:
git:
url: "ssh://git@git.wyatt-studio.fr:993/Wyatt-FOSS/wyatt-bricks.git"
path: bricks/wyatt_component_template
+44 -7
View File
@@ -21,21 +21,58 @@ scripts:
analyze: analyze:
run: | run: |
melos exec -c 10 -- \ melos exec -c 1 -- flutter analyze --fatal-infos
flutter analyze --fatal-infos
description: Run `flutter analyze` for all packages. description: Run `flutter analyze` for all packages.
format: fix:
run: melos exec flutter format . --fix run: melos exec dart fix . --apply
description: Run `flutter format` for all packages. description: Run `dart fix` for all packages.
format:
run: melos exec dart format .
description: Run `dart format` for all packages.
format-check: format-check:
run: melos exec flutter format . --set-exit-if-changed run: melos exec dart fix . --set-exit-if-changed
description: Run `flutter format` checks for all packages. description: Run `dart fix` checks for all packages.
clean:deep: clean:deep:
run: git clean -x -d -f -q run: git clean -x -d -f -q
description: Clean things very deeply with `git clean`. description: Clean things very deeply with `git clean`.
test:selective_unit_test:
run: melos exec -- flutter test --no-pub --coverage
description: Run Flutter tests for a specific package in this project.
select-package:
dir-exists:
- test
ignore:
- '*example*'
test:all:
run: melos run test:selective_unit_test --no-select
description: Run all Flutter tests in this project.
gen-coverage: melos exec -- sh "\$MELOS_ROOT_PATH/combine_coverage.sh" && genhtml coverage/lcov.info -o coverage/html
gen-class-models:
run: melos exec -- dart pub global run dcdg -o models/class-models.puml
select-package:
ignore:
- '*example*'
quality-check:
run: |
melos clean && \
melos bootstrap && \
melos run test:all
description: Run all targets generally expected in CI for a full local quality check.
publish:validate:
run: melos publish --diff="origin/$DRONE_COMMIT_BRANCH...HEAD" --yes
# publish:
# run: melos publish --diff="origin/$DRONE_COMMIT_BRANCH...HEAD" --no-dry-run --yes
# Additional cleanup lifecycle script, executed when `melos clean` is run. # Additional cleanup lifecycle script, executed when `melos clean` is run.
postclean: > postclean: >
+1
View File
@@ -0,0 +1 @@
2.4.1
+2
View File
@@ -0,0 +1,2 @@
new_version.sh
.latest_version
+1 -1
View File
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 WYATT GROUP * Copyright (C) 2023 WYATT GROUP
* Please see the AUTHORS file for details. * Please see the AUTHORS file for details.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
+19
View File
@@ -1,3 +1,22 @@
## 2.4.1
- **FEAT**: add latest version persistence between script executions.
- **FEAT**: ignore todo's.
## 2.4.0
- **FEAT**: add new lint rules.
- **DOCS**: add instructions to create a new version (closes #104).
## 2.3.0
- **REFACTOR**: follow melos versioning.
- **FIX**: change file include to keep coherence.
- **FEAT**: exclude generated code, and add dart>2.16 rules.
- **FEAT**: add overwrite protection.
- **FEAT**: add 2.2.2 files for archive.
- **FEAT**: add utils script to easely bump version.
## 2.2.2 ## 2.2.2
- **DOCS**: add publish_to self hosted pub server. - **DOCS**: add publish_to self hosted pub server.
+33 -17
View File
@@ -1,5 +1,5 @@
<!-- <!--
* Copyright (C) 2022 WYATT GROUP * Copyright (C) 2023 WYATT GROUP
* Please see the AUTHORS file for details. * Please see the AUTHORS file for details.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
@@ -7,7 +7,7 @@
* the Free Software Foundation, either version 3 of the License, or * the Free Software Foundation, either version 3 of the License, or
* any later version. * any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
@@ -20,24 +20,29 @@
![SDK: Dart & Flutter](https://img.shields.io/badge/SDK-Dart%20%7C%20Flutter-blue?style=flat-square) ![SDK: Dart & Flutter](https://img.shields.io/badge/SDK-Dart%20%7C%20Flutter-blue?style=flat-square)
This package provides lint rules for Dart and Flutter which are used at [Wyatt](https://wyattapp.io) and [Wyatt Studio](https://wyatt-studio.fr). For more information, see the complete list of options in **lib/analysis_options.2.0.0.yaml**. This package provides lint rules for Dart and Flutter which are used at [Wyatt](https://wyattapp.io) and [Wyatt Studio](https://wyatt-studio.fr). For more information, see the complete list of options in **lib/analysis_options.2.4.1.yaml**.
**Note**: This package was heavily inspired by [pedantic](https://github.com/dart-lang/pedantic), [Very Good Analysis](https://github.com/VeryGoodOpenSource/very_good_analysis) and the official [flutter_lints](https://pub.dev/packages/flutter_lints). **Note**: This package was heavily inspired by [pedantic](https://github.com/dart-lang/pedantic), [Very Good Analysis](https://github.com/VeryGoodOpenSource/very_good_analysis) and the official [flutter_lints](https://pub.dev/packages/flutter_lints).
## Usage ## Adding Wyatt Analysis to your project
To use the lints, add a dependency in your `pubspec.yaml`: Using CLI:
```yaml ```sh
dev_dependencies: dart pub add wyatt_analysis:2.4.1 --dev --hosted-url=https://git.wyatt-studio.fr/api/packages/Wyatt-FOSS/pub/
wyatt_analysis:
git:
url: https://git.wyatt-studio.fr/Wyatt-FOSS/wyatt-packages
ref: wyatt_analysis-v2.0.0
path: packages/wyatt_analysis
``` ```
Then, add an include in `analysis_options.yaml`: ## Usage
To use the lints, add a dependency in your `pubspec.yaml` :
```yaml
wyatt_analysis:
hosted: https://git.wyatt-studio.fr/api/packages/Wyatt-FOSS/pub/
version: 2.4.1
```
Then, add an include in `analysis_options.yaml` :
```yaml ```yaml
include: package:wyatt_analysis/analysis_options.yaml include: package:wyatt_analysis/analysis_options.yaml
@@ -52,13 +57,13 @@ include: package:wyatt_analysis/analysis_options.flutter.yaml
If you wish to restrict the lint version, specify a version of `analysis_options.yaml` instead: If you wish to restrict the lint version, specify a version of `analysis_options.yaml` instead:
```yaml ```yaml
include: package:wyatt_analysis/analysis_options.flutter.2.0.0.yaml include: package:wyatt_analysis/analysis_options.flutter.2.4.1.yaml
``` ```
If you just want **Dart** version: If you just want **Dart** version:
```yaml ```yaml
include: package:wyatt_analysis/analysis_options.2.0.0.yaml include: package:wyatt_analysis/analysis_options.2.4.1.yaml
``` ```
## Suppressing Lints ## Suppressing Lints
@@ -90,7 +95,7 @@ class B {}
### Project Level ### Project Level
To surpress a specific lint rule for an entire project, modify `analysis_options.yaml`: To surpress a specific lint rule for an entire project, modify `analysis_options.yaml` :
```yaml ```yaml
include: package:wyatt_analysis/analysis_options.yaml include: package:wyatt_analysis/analysis_options.yaml
@@ -107,6 +112,17 @@ To indicate your project is using `wyatt_analysis` → [![style: wyatt analysis]
[![style: wyatt analysis](https://img.shields.io/badge/Style-Wyatt%20Analysis-blue)](https://git.wyatt-studio.fr/Wyatt-FOSS/wyatt-packages/src/branch/master/packages/wyatt_analysis) [![style: wyatt analysis](https://img.shields.io/badge/Style-Wyatt%20Analysis-blue)](https://git.wyatt-studio.fr/Wyatt-FOSS/wyatt-packages/src/branch/master/packages/wyatt_analysis)
``` ```
## Development
When you want to create a new version of the plugin. Before any modification, execute the following command to create new files:
```sh
./new_version.sh <new_version>
```
The previous version is automatically detected thanks to the `.latest_version` file.
So `.latest_version` needs to be versioned!
## Notes ## Notes
You can explore every lint rules [here](https://dart-lang.github.io/linter/lints/). You can explore every lint rules [here](https://dart-lang.github.io/linter/lints/).
@@ -0,0 +1,206 @@
# Copyright (C) 2022 WYATT GROUP
# Please see the AUTHORS file for details.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
analyzer:
language:
strict-casts: true
strict-inference: true
strict-raw-types: true
errors:
todo: ignore
close_sinks: ignore
missing_required_param: error
missing_return: error
exclude:
- example/**
- lib/l10n/**
- lib/generated/**
- lib/generated_plugin_registrant.dart
- test/.test_coverage.dart
linter:
rules:
- always_declare_return_types
- always_require_non_null_named_parameters
- always_put_control_body_on_new_line
- always_put_required_named_parameters_first
- always_use_package_imports
- annotate_overrides
- avoid_bool_literals_in_conditional_expressions
- avoid_catching_errors
- avoid_double_and_int_checks
- avoid_dynamic_calls
- avoid_empty_else
- avoid_equals_and_hash_code_on_mutable_classes
- avoid_escaping_inner_quotes
- avoid_field_initializers_in_const_classes
- avoid_function_literals_in_foreach_calls
- avoid_init_to_null
- avoid_js_rounded_ints
- avoid_null_checks_in_equality_operators
- avoid_positional_boolean_parameters
- avoid_private_typedef_functions
- avoid_redundant_argument_values
- avoid_relative_lib_imports
- avoid_renaming_method_parameters
- avoid_return_types_on_setters
- avoid_returning_null
- avoid_returning_null_for_future
- avoid_returning_null_for_void
- avoid_returning_this
- avoid_setters_without_getters
- avoid_shadowing_type_parameters
- avoid_single_cascade_in_expression_statements
- avoid_slow_async_io
- avoid_type_to_string
- avoid_types_as_parameter_names
- avoid_types_on_closure_parameters
- avoid_unused_constructor_parameters
- avoid_void_async
- await_only_futures
- camel_case_extensions
- camel_case_types
- cancel_subscriptions
- cascade_invocations
- cast_nullable_to_non_nullable
- comment_references
- conditional_uri_does_not_exist
- constant_identifier_names
- control_flow_in_finally
- curly_braces_in_flow_control_structures
- depend_on_referenced_packages
- deprecated_consistency
- directives_ordering
- empty_catches
- empty_constructor_bodies
- empty_statements
- eol_at_end_of_file
- exhaustive_cases
- file_names
- flutter_style_todos
- hash_and_equals
- implementation_imports
- iterable_contains_unrelated_type
- join_return_with_assignment
- leading_newlines_in_multiline_strings
- library_names
- library_prefixes
- library_private_types_in_public_api
- lines_longer_than_80_chars
- list_remove_unrelated_type
- literal_only_boolean_expressions
- missing_whitespace_between_adjacent_strings
- no_adjacent_strings_in_list
- no_default_cases
- no_duplicate_case_values
- no_leading_underscores_for_local_identifiers
- no_runtimeType_toString
- non_constant_identifier_names
- noop_primitive_operations
- null_check_on_nullable_type_parameter
- null_closures
- one_member_abstracts
- only_throw_errors
- overridden_fields
- package_api_docs
- package_names
- package_prefixed_library_names
- parameter_assignments
- prefer_adjacent_string_concatenation
- prefer_asserts_in_initializer_lists
- prefer_asserts_with_message
- prefer_collection_literals
- prefer_conditional_assignment
- prefer_const_constructors
- prefer_const_constructors_in_immutables
- prefer_const_declarations
- prefer_const_literals_to_create_immutables
- prefer_constructors_over_static_methods
- prefer_contains
- prefer_equal_for_default_values
- prefer_expression_function_bodies
- prefer_final_fields
- prefer_final_in_for_each
- prefer_final_locals
- prefer_for_elements_to_map_fromIterable
- prefer_function_declarations_over_variables
- prefer_generic_function_type_aliases
- prefer_if_elements_to_conditional_expressions
- prefer_if_null_operators
- prefer_initializing_formals
- prefer_inlined_adds
- prefer_int_literals
- prefer_interpolation_to_compose_strings
- prefer_is_empty
- prefer_is_not_empty
- prefer_is_not_operator
- prefer_iterable_whereType
- prefer_mixin
- prefer_null_aware_operators
- prefer_null_aware_method_calls
- prefer_single_quotes
- prefer_spread_collections
- prefer_typing_uninitialized_variables
- prefer_void_to_null
- provide_deprecation_message
- recursive_getters
- require_trailing_commas
- slash_for_doc_comments
- sort_unnamed_constructors_first
- test_types_in_equals
- throw_in_finally
- tighten_type_of_initializing_formals
- type_annotate_public_apis
- type_init_formals
- unawaited_futures
- unnecessary_await_in_return
- unnecessary_brace_in_string_interps
- unnecessary_const
- unnecessary_constructor_name
- unnecessary_getters_setters
- unnecessary_lambdas
- unnecessary_late
- unnecessary_new
- unnecessary_null_aware_assignments
- unnecessary_null_checks
- unnecessary_null_in_if_null_operators
- unnecessary_nullable_for_final_variable_declarations
- unnecessary_overrides
- unnecessary_parenthesis
- unnecessary_raw_strings
- unnecessary_statements
- unnecessary_string_escapes
- unnecessary_string_interpolations
- unnecessary_this
- unrelated_type_equality_checks
- unsafe_html
- use_enums
- use_function_type_syntax_for_parameters
- use_if_null_to_convert_nulls_to_bools
- use_is_even_rather_than_modulo
- use_late_for_private_fields_and_variables
- use_named_constants
- use_raw_strings
- use_rethrow_when_possible
- use_setters_to_change_properties
- use_string_buffers
- use_super_parameters
- use_test_throws_matchers
- use_to_and_as_if_applicable
- valid_regexps
- void_checks
@@ -0,0 +1,213 @@
# Copyright (C) 2022 WYATT GROUP
# Please see the AUTHORS file for details.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
analyzer:
language:
strict-casts: true
strict-inference: true
strict-raw-types: true
errors:
todo: info
close_sinks: ignore
missing_required_param: error
missing_return: error
exclude:
- lib/l10n/**
- lib/generated/**
- lib/gen/**
- lib/generated_plugin_registrant.dart
- test/.test_coverage.dart
- '**/*.g.dart'
- '**/*.freezed.dart'
linter:
rules:
- always_declare_return_types
- always_put_control_body_on_new_line
- always_put_required_named_parameters_first
- always_require_non_null_named_parameters
- always_use_package_imports
- annotate_overrides
- avoid_bool_literals_in_conditional_expressions
- avoid_catching_errors
- avoid_double_and_int_checks
- avoid_dynamic_calls
- avoid_empty_else
- avoid_equals_and_hash_code_on_mutable_classes
- avoid_escaping_inner_quotes
- avoid_field_initializers_in_const_classes
- avoid_final_parameters
- avoid_function_literals_in_foreach_calls
- avoid_init_to_null
- avoid_js_rounded_ints
- avoid_multiple_declarations_per_line
- avoid_null_checks_in_equality_operators
- avoid_positional_boolean_parameters
- avoid_private_typedef_functions
- avoid_redundant_argument_values
- avoid_relative_lib_imports
- avoid_renaming_method_parameters
- avoid_return_types_on_setters
- avoid_returning_null
- avoid_returning_null_for_future
- avoid_returning_null_for_void
- avoid_returning_this
- avoid_setters_without_getters
- avoid_shadowing_type_parameters
- avoid_single_cascade_in_expression_statements
- avoid_slow_async_io
- avoid_type_to_string
- avoid_types_as_parameter_names
- avoid_types_on_closure_parameters
- avoid_unused_constructor_parameters
- avoid_void_async
- await_only_futures
- camel_case_extensions
- camel_case_types
- cancel_subscriptions
- cascade_invocations
- cast_nullable_to_non_nullable
- comment_references
- conditional_uri_does_not_exist
- constant_identifier_names
- control_flow_in_finally
- curly_braces_in_flow_control_structures
- depend_on_referenced_packages
- deprecated_consistency
- directives_ordering
- empty_catches
- empty_constructor_bodies
- empty_statements
- eol_at_end_of_file
- exhaustive_cases
- file_names
- flutter_style_todos
- hash_and_equals
- implementation_imports
- iterable_contains_unrelated_type
- join_return_with_assignment
- leading_newlines_in_multiline_strings
- library_names
- library_prefixes
- library_private_types_in_public_api
- lines_longer_than_80_chars
- list_remove_unrelated_type
- literal_only_boolean_expressions
- missing_whitespace_between_adjacent_strings
- no_adjacent_strings_in_list
- no_default_cases
- no_duplicate_case_values
- no_leading_underscores_for_library_prefixes
- no_leading_underscores_for_local_identifiers
- no_runtimeType_toString
- non_constant_identifier_names
- noop_primitive_operations
- null_check_on_nullable_type_parameter
- null_closures
- one_member_abstracts
- only_throw_errors
- overridden_fields
- package_api_docs
- package_names
- package_prefixed_library_names
- parameter_assignments
- prefer_adjacent_string_concatenation
- prefer_asserts_in_initializer_lists
- prefer_asserts_with_message
- prefer_collection_literals
- prefer_conditional_assignment
- prefer_const_constructors
- prefer_const_constructors_in_immutables
- prefer_const_declarations
- prefer_const_literals_to_create_immutables
- prefer_constructors_over_static_methods
- prefer_contains
- prefer_equal_for_default_values
- prefer_expression_function_bodies
- prefer_final_fields
- prefer_final_in_for_each
- prefer_final_locals
- prefer_for_elements_to_map_fromIterable
- prefer_function_declarations_over_variables
- prefer_generic_function_type_aliases
- prefer_if_elements_to_conditional_expressions
- prefer_if_null_operators
- prefer_initializing_formals
- prefer_inlined_adds
- prefer_int_literals
- prefer_interpolation_to_compose_strings
- prefer_is_empty
- prefer_is_not_empty
- prefer_is_not_operator
- prefer_iterable_whereType
- prefer_mixin
- prefer_null_aware_method_calls
- prefer_null_aware_operators
- prefer_single_quotes
- prefer_spread_collections
- prefer_typing_uninitialized_variables
- prefer_void_to_null
- provide_deprecation_message
- recursive_getters
- require_trailing_commas
- slash_for_doc_comments
- sort_constructors_first
- sort_unnamed_constructors_first
- test_types_in_equals
- throw_in_finally
- tighten_type_of_initializing_formals
- type_annotate_public_apis
- type_init_formals
- unawaited_futures
- unnecessary_await_in_return
- unnecessary_brace_in_string_interps
- unnecessary_const
- unnecessary_constructor_name
- unnecessary_getters_setters
- unnecessary_lambdas
- unnecessary_late
- unnecessary_new
- unnecessary_null_aware_assignments
- unnecessary_null_checks
- unnecessary_null_in_if_null_operators
- unnecessary_nullable_for_final_variable_declarations
- unnecessary_overrides
- unnecessary_parenthesis
- unnecessary_raw_strings
- unnecessary_statements
- unnecessary_string_escapes
- unnecessary_string_interpolations
- unnecessary_this
- unnecessary_to_list_in_spreads
- unrelated_type_equality_checks
- unsafe_html
- use_enums
- use_function_type_syntax_for_parameters
- use_if_null_to_convert_nulls_to_bools
- use_is_even_rather_than_modulo
- use_late_for_private_fields_and_variables
- use_named_constants
- use_raw_strings
- use_rethrow_when_possible
- use_setters_to_change_properties
- use_string_buffers
- use_super_parameters
- use_test_throws_matchers
- use_to_and_as_if_applicable
- valid_regexps
- void_checks
@@ -0,0 +1,217 @@
# Copyright (C) 2023 WYATT GROUP
# Please see the AUTHORS file for details.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
analyzer:
language:
strict-casts: true
strict-inference: true
strict-raw-types: true
errors:
todo: info
close_sinks: ignore
missing_required_param: error
missing_return: error
exclude:
- lib/l10n/**
- lib/generated/**
- lib/gen/**
- lib/generated_plugin_registrant.dart
- test/.test_coverage.dart
- '**/*.g.dart'
- '**/*.freezed.dart'
linter:
rules:
- always_declare_return_types
- always_put_control_body_on_new_line
- always_put_required_named_parameters_first
- always_require_non_null_named_parameters
- always_use_package_imports
- annotate_overrides
- avoid_bool_literals_in_conditional_expressions
- avoid_catching_errors
- avoid_double_and_int_checks
- avoid_dynamic_calls
- avoid_empty_else
- avoid_equals_and_hash_code_on_mutable_classes
- avoid_escaping_inner_quotes
- avoid_field_initializers_in_const_classes
- avoid_final_parameters
- avoid_function_literals_in_foreach_calls
- avoid_init_to_null
- avoid_js_rounded_ints
- avoid_multiple_declarations_per_line
- avoid_null_checks_in_equality_operators
- avoid_positional_boolean_parameters
- avoid_private_typedef_functions
- avoid_redundant_argument_values
- avoid_relative_lib_imports
- avoid_renaming_method_parameters
- avoid_return_types_on_setters
- avoid_returning_null
- avoid_returning_null_for_future
- avoid_returning_null_for_void
- avoid_returning_this
- avoid_setters_without_getters
- avoid_shadowing_type_parameters
- avoid_single_cascade_in_expression_statements
- avoid_slow_async_io
- avoid_type_to_string
- avoid_types_as_parameter_names
- avoid_types_on_closure_parameters
- avoid_unused_constructor_parameters
- avoid_void_async
- await_only_futures
- camel_case_extensions
- camel_case_types
- cancel_subscriptions
- cascade_invocations
- cast_nullable_to_non_nullable
- collection_methods_unrelated_type
- combinators_ordering
- comment_references
- conditional_uri_does_not_exist
- constant_identifier_names
- control_flow_in_finally
- curly_braces_in_flow_control_structures
- depend_on_referenced_packages
- deprecated_consistency
- directives_ordering
- empty_catches
- empty_constructor_bodies
- empty_statements
- eol_at_end_of_file
- exhaustive_cases
- file_names
- flutter_style_todos
- hash_and_equals
- implementation_imports
- implicit_call_tearoffs
- iterable_contains_unrelated_type
- join_return_with_assignment
- leading_newlines_in_multiline_strings
- library_names
- library_prefixes
- library_private_types_in_public_api
- lines_longer_than_80_chars
- list_remove_unrelated_type
- literal_only_boolean_expressions
- missing_whitespace_between_adjacent_strings
- no_adjacent_strings_in_list
- no_default_cases
- no_duplicate_case_values
- no_leading_underscores_for_library_prefixes
- no_leading_underscores_for_local_identifiers
- no_runtimeType_toString
- non_constant_identifier_names
- noop_primitive_operations
- null_check_on_nullable_type_parameter
- null_closures
- one_member_abstracts
- only_throw_errors
- overridden_fields
- package_api_docs
- package_names
- package_prefixed_library_names
- parameter_assignments
- prefer_adjacent_string_concatenation
- prefer_asserts_in_initializer_lists
- prefer_asserts_with_message
- prefer_collection_literals
- prefer_conditional_assignment
- prefer_const_constructors
- prefer_const_constructors_in_immutables
- prefer_const_declarations
- prefer_const_literals_to_create_immutables
- prefer_constructors_over_static_methods
- prefer_contains
- prefer_equal_for_default_values
- prefer_expression_function_bodies
- prefer_final_fields
- prefer_final_in_for_each
- prefer_final_locals
- prefer_for_elements_to_map_fromIterable
- prefer_function_declarations_over_variables
- prefer_generic_function_type_aliases
- prefer_if_elements_to_conditional_expressions
- prefer_if_null_operators
- prefer_initializing_formals
- prefer_inlined_adds
- prefer_int_literals
- prefer_interpolation_to_compose_strings
- prefer_is_empty
- prefer_is_not_empty
- prefer_is_not_operator
- prefer_iterable_whereType
- prefer_mixin
- prefer_null_aware_method_calls
- prefer_null_aware_operators
- prefer_single_quotes
- prefer_spread_collections
- prefer_typing_uninitialized_variables
- prefer_void_to_null
- provide_deprecation_message
- recursive_getters
- require_trailing_commas
- slash_for_doc_comments
- sort_constructors_first
- sort_unnamed_constructors_first
- test_types_in_equals
- throw_in_finally
- tighten_type_of_initializing_formals
- type_annotate_public_apis
- type_init_formals
- unawaited_futures
- unnecessary_await_in_return
- unnecessary_brace_in_string_interps
- unnecessary_const
- unnecessary_constructor_name
- unnecessary_getters_setters
- unnecessary_lambdas
- unnecessary_late
- unnecessary_new
- unnecessary_null_aware_assignments
- unnecessary_null_checks
- unnecessary_null_in_if_null_operators
- unnecessary_nullable_for_final_variable_declarations
- unnecessary_overrides
- unnecessary_parenthesis
- unnecessary_raw_strings
- unnecessary_statements
- unnecessary_string_escapes
- unnecessary_string_interpolations
- unnecessary_this
- unnecessary_to_list_in_spreads
- unrelated_type_equality_checks
- unsafe_html
- use_enums
- use_function_type_syntax_for_parameters
- use_if_null_to_convert_nulls_to_bools
- use_is_even_rather_than_modulo
- use_late_for_private_fields_and_variables
- use_named_constants
- use_raw_strings
- use_rethrow_when_possible
- use_setters_to_change_properties
- use_string_buffers
- use_string_in_part_of_directives
- use_super_parameters
- use_test_throws_matchers
- use_to_and_as_if_applicable
- valid_regexps
- void_checks
@@ -0,0 +1,217 @@
# Copyright (C) 2023 WYATT GROUP
# Please see the AUTHORS file for details.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
analyzer:
language:
strict-casts: true
strict-inference: true
strict-raw-types: true
errors:
todo: ignore
close_sinks: ignore
missing_required_param: error
missing_return: error
exclude:
- lib/l10n/**
- lib/generated/**
- lib/gen/**
- lib/generated_plugin_registrant.dart
- test/.test_coverage.dart
- "**/*.g.dart"
- "**/*.freezed.dart"
linter:
rules:
- always_declare_return_types
- always_put_control_body_on_new_line
- always_put_required_named_parameters_first
- always_require_non_null_named_parameters
- always_use_package_imports
- annotate_overrides
- avoid_bool_literals_in_conditional_expressions
- avoid_catching_errors
- avoid_double_and_int_checks
- avoid_dynamic_calls
- avoid_empty_else
- avoid_equals_and_hash_code_on_mutable_classes
- avoid_escaping_inner_quotes
- avoid_field_initializers_in_const_classes
- avoid_final_parameters
- avoid_function_literals_in_foreach_calls
- avoid_init_to_null
- avoid_js_rounded_ints
- avoid_multiple_declarations_per_line
- avoid_null_checks_in_equality_operators
- avoid_positional_boolean_parameters
- avoid_private_typedef_functions
- avoid_redundant_argument_values
- avoid_relative_lib_imports
- avoid_renaming_method_parameters
- avoid_return_types_on_setters
- avoid_returning_null
- avoid_returning_null_for_future
- avoid_returning_null_for_void
- avoid_returning_this
- avoid_setters_without_getters
- avoid_shadowing_type_parameters
- avoid_single_cascade_in_expression_statements
- avoid_slow_async_io
- avoid_type_to_string
- avoid_types_as_parameter_names
- avoid_types_on_closure_parameters
- avoid_unused_constructor_parameters
- avoid_void_async
- await_only_futures
- camel_case_extensions
- camel_case_types
- cancel_subscriptions
- cascade_invocations
- cast_nullable_to_non_nullable
- collection_methods_unrelated_type
- combinators_ordering
- comment_references
- conditional_uri_does_not_exist
- constant_identifier_names
- control_flow_in_finally
- curly_braces_in_flow_control_structures
- depend_on_referenced_packages
- deprecated_consistency
- directives_ordering
- empty_catches
- empty_constructor_bodies
- empty_statements
- eol_at_end_of_file
- exhaustive_cases
- file_names
- flutter_style_todos
- hash_and_equals
- implementation_imports
- implicit_call_tearoffs
- iterable_contains_unrelated_type
- join_return_with_assignment
- leading_newlines_in_multiline_strings
- library_names
- library_prefixes
- library_private_types_in_public_api
- lines_longer_than_80_chars
- list_remove_unrelated_type
- literal_only_boolean_expressions
- missing_whitespace_between_adjacent_strings
- no_adjacent_strings_in_list
- no_default_cases
- no_duplicate_case_values
- no_leading_underscores_for_library_prefixes
- no_leading_underscores_for_local_identifiers
- no_runtimeType_toString
- non_constant_identifier_names
- noop_primitive_operations
- null_check_on_nullable_type_parameter
- null_closures
- one_member_abstracts
- only_throw_errors
- overridden_fields
- package_api_docs
- package_names
- package_prefixed_library_names
- parameter_assignments
- prefer_adjacent_string_concatenation
- prefer_asserts_in_initializer_lists
- prefer_asserts_with_message
- prefer_collection_literals
- prefer_conditional_assignment
- prefer_const_constructors
- prefer_const_constructors_in_immutables
- prefer_const_declarations
- prefer_const_literals_to_create_immutables
- prefer_constructors_over_static_methods
- prefer_contains
- prefer_equal_for_default_values
- prefer_expression_function_bodies
- prefer_final_fields
- prefer_final_in_for_each
- prefer_final_locals
- prefer_for_elements_to_map_fromIterable
- prefer_function_declarations_over_variables
- prefer_generic_function_type_aliases
- prefer_if_elements_to_conditional_expressions
- prefer_if_null_operators
- prefer_initializing_formals
- prefer_inlined_adds
- prefer_int_literals
- prefer_interpolation_to_compose_strings
- prefer_is_empty
- prefer_is_not_empty
- prefer_is_not_operator
- prefer_iterable_whereType
- prefer_mixin
- prefer_null_aware_method_calls
- prefer_null_aware_operators
- prefer_single_quotes
- prefer_spread_collections
- prefer_typing_uninitialized_variables
- prefer_void_to_null
- provide_deprecation_message
- recursive_getters
- require_trailing_commas
- slash_for_doc_comments
- sort_constructors_first
- sort_unnamed_constructors_first
- test_types_in_equals
- throw_in_finally
- tighten_type_of_initializing_formals
- type_annotate_public_apis
- type_init_formals
- unawaited_futures
- unnecessary_await_in_return
- unnecessary_brace_in_string_interps
- unnecessary_const
- unnecessary_constructor_name
- unnecessary_getters_setters
- unnecessary_lambdas
- unnecessary_late
- unnecessary_new
- unnecessary_null_aware_assignments
- unnecessary_null_checks
- unnecessary_null_in_if_null_operators
- unnecessary_nullable_for_final_variable_declarations
- unnecessary_overrides
- unnecessary_parenthesis
- unnecessary_raw_strings
- unnecessary_statements
- unnecessary_string_escapes
- unnecessary_string_interpolations
- unnecessary_this
- unnecessary_to_list_in_spreads
- unrelated_type_equality_checks
- unsafe_html
- use_enums
- use_function_type_syntax_for_parameters
- use_if_null_to_convert_nulls_to_bools
- use_is_even_rather_than_modulo
- use_late_for_private_fields_and_variables
- use_named_constants
- use_raw_strings
- use_rethrow_when_possible
- use_setters_to_change_properties
- use_string_buffers
- use_string_in_part_of_directives
- use_super_parameters
- use_test_throws_matchers
- use_to_and_as_if_applicable
- valid_regexps
- void_checks
@@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>. # along with this program. If not, see <https://www.gnu.org/licenses/>.
include: package:wyatt_analysis/analysis_options.2.1.1.yaml include: package:wyatt_analysis/analysis_options.2.2.0.yaml
linter: linter:
rules: rules:
@@ -0,0 +1,32 @@
# Copyright (C) 2022 WYATT GROUP
# Please see the AUTHORS file for details.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
include: package:wyatt_analysis/analysis_options.2.2.2.yaml
linter:
rules:
- avoid_print
- avoid_unnecessary_containers
- avoid_web_libraries_in_flutter
- no_logic_in_create_state
- sized_box_for_whitespace
- sized_box_shrink_expand
- sort_child_properties_last
- use_build_context_synchronously
- use_colored_box
- use_decorated_box
- use_full_hex_values_for_flutter_colors
- use_key_in_widget_constructors
@@ -0,0 +1,32 @@
# Copyright (C) 2022 WYATT GROUP
# Please see the AUTHORS file for details.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
include: package:wyatt_analysis/analysis_options.2.3.0.yaml
linter:
rules:
- avoid_print
- avoid_unnecessary_containers
- avoid_web_libraries_in_flutter
- no_logic_in_create_state
- sized_box_for_whitespace
- sized_box_shrink_expand
- sort_child_properties_last
- use_build_context_synchronously
- use_colored_box
- use_decorated_box
- use_full_hex_values_for_flutter_colors
- use_key_in_widget_constructors
@@ -0,0 +1,32 @@
# Copyright (C) 2023 WYATT GROUP
# Please see the AUTHORS file for details.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
include: package:wyatt_analysis/analysis_options.2.4.0.yaml
linter:
rules:
- avoid_print
- avoid_unnecessary_containers
- avoid_web_libraries_in_flutter
- no_logic_in_create_state
- sized_box_for_whitespace
- sized_box_shrink_expand
- sort_child_properties_last
- use_build_context_synchronously
- use_colored_box
- use_decorated_box
- use_full_hex_values_for_flutter_colors
- use_key_in_widget_constructors
@@ -0,0 +1,32 @@
# Copyright (C) 2023 WYATT GROUP
# Please see the AUTHORS file for details.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
include: package:wyatt_analysis/analysis_options.2.4.1.yaml
linter:
rules:
- avoid_print
- avoid_unnecessary_containers
- avoid_web_libraries_in_flutter
- no_logic_in_create_state
- sized_box_for_whitespace
- sized_box_shrink_expand
- sort_child_properties_last
- use_build_context_synchronously
- use_colored_box
- use_decorated_box
- use_full_hex_values_for_flutter_colors
- use_key_in_widget_constructors
@@ -1,4 +1,4 @@
# Copyright (C) 2022 WYATT GROUP # Copyright (C) 2023 WYATT GROUP
# Please see the AUTHORS file for details. # Please see the AUTHORS file for details.
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
@@ -14,4 +14,4 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>. # along with this program. If not, see <https://www.gnu.org/licenses/>.
include: package:wyatt_analysis/analysis_options.flutter.2.2.1.yaml include: package:wyatt_analysis/analysis_options.flutter.2.4.1.yaml
@@ -1,4 +1,4 @@
# Copyright (C) 2022 WYATT GROUP # Copyright (C) 2023 WYATT GROUP
# Please see the AUTHORS file for details. # Please see the AUTHORS file for details.
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
@@ -14,4 +14,4 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>. # along with this program. If not, see <https://www.gnu.org/licenses/>.
include: package:wyatt_analysis/analysis_options.2.2.1.yaml include: package:wyatt_analysis/analysis_options.2.4.1.yaml
@@ -1,4 +1,4 @@
// Copyright (C) 2022 WYATT GROUP // Copyright (C) 2023 WYATT GROUP
// Please see the AUTHORS file for details. // Please see the AUTHORS file for details.
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
@@ -15,8 +15,7 @@
// along with this program. If not, see <https://www.gnu.org/licenses/>. // along with this program. If not, see <https://www.gnu.org/licenses/>.
/// Wyatt analyzer settings and best practices /// Wyatt analyzer settings and best practices
/// used internally at [Wyatt](https://wyattapp.io) /// used internally at [Wyatt Studio](https://wyatt-studio.fr).
/// and [Wyatt Studio](https://wyatt-studio.fr).
library wyatt_analysis; library wyatt_analysis;
const String wyattAnalysisVersion = '2.2.1'; const String wyattAnalysisVersion = '2.4.1';
+142
View File
@@ -0,0 +1,142 @@
#!/usr/bin/env sh
# Copyright (C) 2022 WYATT GROUP
# Please see the AUTHORS file for details.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
usage="
usage:
$(basename "$0") <new_version> -- create new analyzer files.
where:
new_version: new version, for example \`2.4.0\`"
new=$1
if [ -z "$new" ]; then
echo "new_version cannot be null"
echo "${usage}"
exit 1
fi
SCRIPT_PATH="${BASH_SOURCE:-$0}"
ABS_SCRIPT_PATH="$(realpath "${SCRIPT_PATH}")"
ABS_DIRECTORY="$(dirname "${ABS_SCRIPT_PATH}")"
LATEST_VERSION="${ABS_DIRECTORY}/.latest_version"
# Read latest version
if [ -e "$LATEST_VERSION" ]; then
old=$(cat "$LATEST_VERSION")
echo "> latest package version is: $old"
echo "> new package version is: $new"
else
echo "latest version is not set"
echo "create a file named \`.latest_version\` in the root of the project"
exit 1
fi
LIB="${ABS_DIRECTORY}/lib/wyatt_analysis.dart"
OPTIONS="${ABS_DIRECTORY}/lib/analysis_options.yaml"
OLD_OPTIONS="${ABS_DIRECTORY}/lib/analysis_options.${old}.yaml"
NEW_OPTIONS="${ABS_DIRECTORY}/lib/analysis_options.${new}.yaml"
OPTIONS_FLUTTER="${ABS_DIRECTORY}/lib/analysis_options.flutter.yaml"
OLD_OPTIONS_FLUTTER="${ABS_DIRECTORY}/lib/analysis_options.flutter.${old}.yaml"
NEW_OPTIONS_FLUTTER="${ABS_DIRECTORY}/lib/analysis_options.flutter.${new}.yaml"
if [ ! -e "$OLD_OPTIONS" ]; then
echo "analysis_options.${old}.yaml doesn't exists"
echo "${usage}"
exit 1
fi
if [ ! -e "$OLD_OPTIONS_FLUTTER" ]; then
echo "analysis_options.flutter.${old}.yaml doesn't exists"
echo "${usage}"
exit 1
fi
if [ -e "$NEW_OPTIONS" ]; then
echo "analysis_options.${new}.yaml already exists"
echo "${usage}"
exit 1
fi
if [ -e "$NEW_OPTIONS_FLUTTER" ]; then
echo "analysis_options.flutter.${old}.yaml already exists"
echo "${usage}"
exit 1
fi
# Copy previous version files
cp "${OLD_OPTIONS}" "${NEW_OPTIONS}"
cp "${OLD_OPTIONS_FLUTTER}" "${NEW_OPTIONS_FLUTTER}"
# Search and replace old version string occurences in new files
sed -e "s/${old}/${new}/g" "${NEW_OPTIONS_FLUTTER}" > tempfile.tmp
mv -f tempfile.tmp "${NEW_OPTIONS_FLUTTER}"
sed -e "s/${old}/${new}/g" "${LIB}" > tempfile.tmp
mv -f tempfile.tmp "${LIB}"
sed -e "s/${old}/${new}/g" "README.md" > tempfile.tmp
mv -f tempfile.tmp "README.md"
echo "
# Copyright (C) 2023 WYATT GROUP
# Please see the AUTHORS file for details.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
include: package:wyatt_analysis/analysis_options.${new}.yaml
" > "${OPTIONS}"
echo "
# Copyright (C) 2023 WYATT GROUP
# Please see the AUTHORS file for details.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
include: package:wyatt_analysis/analysis_options.flutter.${new}.yaml
" > "${OPTIONS_FLUTTER}"
# Update latest version
echo "${new}" > "$LATEST_VERSION"
exit 0
+19 -3
View File
@@ -1,9 +1,25 @@
# Copyright (C) 2023 WYATT GROUP
# Please see the AUTHORS file for details.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
name: wyatt_analysis name: wyatt_analysis
description: Lint rules for Dart and Flutter used internally at Wyatt and Wyatt Studio. description: Lint rules for Dart and Flutter used internally at Wyatt Studio.
repository: https://git.wyatt-studio.fr/Wyatt-FOSS/wyatt-packages/src/branch/master/packages/wyatt_analysis repository: https://git.wyatt-studio.fr/Wyatt-FOSS/wyatt-packages/src/branch/master/packages/wyatt_analysis
version: 2.2.2 version: 2.4.1
publish_to: https://git.wyatt-studio.fr/api/packages/Wyatt-FOSS/pub publish_to: https://git.wyatt-studio.fr/api/packages/Wyatt-FOSS/pub
environment: environment:
sdk: '>=2.12.0 <3.0.0' sdk: ">=2.12.0 <3.0.0"
+17
View File
@@ -1,3 +1,20 @@
## 0.1.0+1
- Update a dependency to the latest release.
## 0.1.0
> Note: This release has breaking changes.
- **REFACTOR**: update naming methodes (close #47).
- **REFACTOR**: update example. (close #38).
- **FIX**: fix execute method on error handler. (#38).
- **FEAT**: update usecase en add & sepcific case. (#38).
- **FEAT**: add obsevers for alternative usecase scenarions (#38).
- **DOCS**: generate class model. (#38).
- **DOCS**: update Readme. (#38).
- **BREAKING** **CHORE**: update exports. (#38).
## 0.0.2 ## 0.0.2
- Graduate package to a stable release. See pre-releases prior to this version for changelog entries. - Graduate package to a stable release. See pre-releases prior to this version for changelog entries.
+63 -14
View File
@@ -7,7 +7,7 @@
* the Free Software Foundation, either version 3 of the License, or * the Free Software Foundation, either version 3 of the License, or
* any later version. * any later version.
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
@@ -31,10 +31,10 @@ The Wyatt Architecture for Flutter.
## Features ## Features
* Usecase - Usecase
* Repository - Repository
* DataSource - DataSource
* Entity - Entity
## Usage ## Usage
@@ -73,19 +73,20 @@ abstract class PhotoRepository extends BaseRepository {
} }
``` ```
> Here the repository is just a proxy of the data sources with result type (to have beautiful error handling). > Here the repository is just a proxy of the data sources with result type (to have beautiful error handling).
And finaly create your different usecases by using `UseCase<Parameters, ReturnType>` : And finaly create your different usecases :
Several use cases are supported :
- Classic usecase :
```dart ```dart
class RetrieveAllPhoto extends UseCase<QueryParameters, List<Photo>> { class Test extends AsyncUseCase<QueryParameters, List<Photo>>> {
final PhotoRepository _photoRepository;
RetrieveAllPhotos(this._photoRepository);
@override @override
FutureResult<List<Photo>> call(QueryParameters params) { FuturOrResult<List<Photo>>> call(QueryParameters? params) {
final photos = _photoRepository.getAllPhotos( final photos = _photoRepository.getAllPhotos(
start: params.start, start: params.start,
limit: params.limit, limit: params.limit,
); );
@@ -94,6 +95,54 @@ class RetrieveAllPhoto extends UseCase<QueryParameters, List<Photo>> {
} }
``` ```
You can add alternatve scenarios and check pre/post conditions using our extensions :
```dart
class SearchPhotos extends AsyncUseCase<QueryParameters, List<Photo>>> {
@override
FutureOrResult<List<Photo>>> call(QueryParameters? params) {
final photos = _photoRepository.getAllPhotos(
start: params.start,
limit: params.limit,
);
return photos;
}
@override
FutureOr<void> onStart(QueryParameters? params) {
if(params.start == null || params.limit == null){
throw ClientException('Préconndition non valides');
}
}
}
```
You can implement error scenarios overriding `onError`, or check postconditions by overriding `onComplete` .
- Stream usecase :
```dart
class SearchPhotos extends StreamUseCase<QueryParameters, List<Photo>>> {
@override
FutureOrResult<Stream<List<Photo>>>> call(QueryParameters? params) {
final photos = _photoRepository.getAllPhotos(
start: params.start,
limit: params.limit,
);
return photos;
}
}
```
On this case, observers allow you to add alternative scénarios when data changed, overriding `onData` or `onDone`.
Please note that to use handlers, call `call` method and not `execute`.
> In fact, here we need a new parameter object, so let's create it: > In fact, here we need a new parameter object, so let's create it:
```dart ```dart
@@ -171,4 +220,4 @@ class PhotoRepositoryImpl extends PhotoRepository {
} }
``` ```
That's all. That's all.
@@ -24,9 +24,8 @@ import 'package:wyatt_http_client/wyatt_http_client.dart';
import 'package:wyatt_type_utils/wyatt_type_utils.dart'; import 'package:wyatt_type_utils/wyatt_type_utils.dart';
class AlbumApiDataSourceImpl extends AlbumRemoteDataSource { class AlbumApiDataSourceImpl extends AlbumRemoteDataSource {
final MiddlewareClient _client;
AlbumApiDataSourceImpl(this._client); AlbumApiDataSourceImpl(this._client);
final MiddlewareClient _client;
@override @override
Future<Album> getAlbum(int id) async { Future<Album> getAlbum(int id) async {
@@ -24,9 +24,8 @@ import 'package:wyatt_http_client/wyatt_http_client.dart';
import 'package:wyatt_type_utils/wyatt_type_utils.dart'; import 'package:wyatt_type_utils/wyatt_type_utils.dart';
class PhotoApiDataSourceImpl extends PhotoRemoteDataSource { class PhotoApiDataSourceImpl extends PhotoRemoteDataSource {
final MiddlewareClient _client;
PhotoApiDataSourceImpl(this._client); PhotoApiDataSourceImpl(this._client);
final MiddlewareClient _client;
@override @override
Future<Photo> getPhoto(int id) async { Future<Photo> getPhoto(int id) async {
@@ -15,7 +15,6 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>. // along with this program. If not, see <https://www.gnu.org/licenses/>.
import 'package:architecture_example/data/models/photo_model.dart'; import 'package:architecture_example/data/models/photo_model.dart';
import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:freezed_annotation/freezed_annotation.dart';
@@ -24,57 +24,57 @@ import 'package:wyatt_architecture/wyatt_architecture.dart';
import 'package:wyatt_type_utils/wyatt_type_utils.dart'; import 'package:wyatt_type_utils/wyatt_type_utils.dart';
class PhotoRepositoryImpl extends PhotoRepository { class PhotoRepositoryImpl extends PhotoRepository {
final PhotoRemoteDataSource _photoRemoteDataSource;
final AlbumRemoteDataSource _albumRemoteDataSource;
final FavoriteLocalDataSource _favoriteLocalDataSource;
PhotoRepositoryImpl( PhotoRepositoryImpl(
this._photoRemoteDataSource, this._photoRemoteDataSource,
this._albumRemoteDataSource, this._albumRemoteDataSource,
this._favoriteLocalDataSource, this._favoriteLocalDataSource,
); );
final PhotoRemoteDataSource _photoRemoteDataSource;
final AlbumRemoteDataSource _albumRemoteDataSource;
final FavoriteLocalDataSource _favoriteLocalDataSource;
@override @override
FutureResult<void> addPhotoToFavorites(Photo photo) => Result.tryCatchAsync( FutureOrResult<void> addPhotoToFavorites(Photo photo) => Result.tryCatchAsync(
() => _favoriteLocalDataSource.addPhotoToFavorites(photo), () => _favoriteLocalDataSource.addPhotoToFavorites(photo),
(error) => ClientException('Cannot add photo to favorites.'), (error) => ClientException('Cannot add photo to favorites.'),
); );
@override @override
FutureResult<bool> checkIfPhotoIsInFavorites(int id) => Result.tryCatchAsync( FutureOrResult<bool> checkIfPhotoIsInFavorites(int id) =>
Result.tryCatchAsync(
() => _favoriteLocalDataSource.checkIfPhotoIsInFavorites(id), () => _favoriteLocalDataSource.checkIfPhotoIsInFavorites(id),
(error) => (error) =>
ClientException('Cannot check if photo `$id` is in favorites.'), ClientException('Cannot check if photo `$id` is in favorites.'),
); );
@override @override
FutureResult<void> deletePhotoFromFavorites(int id) => Result.tryCatchAsync( FutureOrResult<void> deletePhotoFromFavorites(int id) => Result.tryCatchAsync(
() => _favoriteLocalDataSource.deletePhotoFromFavorites(id), () => _favoriteLocalDataSource.deletePhotoFromFavorites(id),
(error) => ClientException('Cannot delete photo `$id` from favorites.'), (error) => ClientException('Cannot delete photo `$id` from favorites.'),
); );
@override @override
FutureResult<Album> getAlbum(int id) => Result.tryCatchAsync( FutureOrResult<Album> getAlbum(int id) => Result.tryCatchAsync(
() => _albumRemoteDataSource.getAlbum(id), () => _albumRemoteDataSource.getAlbum(id),
(error) => ServerException('Cannot retrieve album $id.'), (error) => ServerException('Cannot retrieve album $id.'),
); );
@override @override
FutureResult<List<Album>> getAllAlbums({int? start, int? limit}) => FutureOrResult<List<Album>> getAllAlbums({int? start, int? limit}) =>
Result.tryCatchAsync( Result.tryCatchAsync(
() => _albumRemoteDataSource.getAllAlbums(start: start, limit: limit), () => _albumRemoteDataSource.getAllAlbums(start: start, limit: limit),
(error) => ServerException('Cannot retrieve all albums.'), (error) => ServerException('Cannot retrieve all albums.'),
); );
@override @override
FutureResult<List<Photo>> getAllPhotos({int? start, int? limit}) async => FutureOrResult<List<Photo>> getAllPhotos({int? start, int? limit}) async =>
Result.tryCatchAsync( Result.tryCatchAsync(
() => _photoRemoteDataSource.getAllPhotos(start: start, limit: limit), () => _photoRemoteDataSource.getAllPhotos(start: start, limit: limit),
(error) => ServerException('Cannot retrieve all photos.'), (error) => ServerException('Cannot retrieve all photos.'),
); );
@override @override
FutureResult<List<Photo>> getAllPhotosFromFavorites() async { FutureOrResult<List<Photo>> getAllPhotosFromFavorites() async {
try { try {
final response = <Photo>[]; final response = <Photo>[];
final favorites = final favorites =
@@ -95,13 +95,13 @@ class PhotoRepositoryImpl extends PhotoRepository {
} }
@override @override
FutureResult<Photo> getPhoto(int id) => Result.tryCatchAsync( FutureOrResult<Photo> getPhoto(int id) => Result.tryCatchAsync(
() => _photoRemoteDataSource.getPhoto(id), () => _photoRemoteDataSource.getPhoto(id),
(error) => ServerException('Cannot retrieve photo $id.'), (error) => ServerException('Cannot retrieve photo $id.'),
); );
@override @override
FutureResult<List<Photo>> getPhotosFromAlbum( FutureOrResult<List<Photo>> getPhotosFromAlbum(
int albumId, { int albumId, {
int? start, int? start,
int? limit, int? limit,
@@ -1,16 +1,16 @@
// Copyright (C) 2022 WYATT GROUP // Copyright (C) 2022 WYATT GROUP
// Please see the AUTHORS file for details. // Please see the AUTHORS file for details.
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by // it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// any later version. // any later version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>. // along with this program. If not, see <https://www.gnu.org/licenses/>.
@@ -1,16 +1,16 @@
// Copyright (C) 2022 WYATT GROUP // Copyright (C) 2022 WYATT GROUP
// Please see the AUTHORS file for details. // Please see the AUTHORS file for details.
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by // it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// any later version. // any later version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>. // along with this program. If not, see <https://www.gnu.org/licenses/>.
@@ -1,16 +1,16 @@
// Copyright (C) 2022 WYATT GROUP // Copyright (C) 2022 WYATT GROUP
// Please see the AUTHORS file for details. // Please see the AUTHORS file for details.
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by // it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// any later version. // any later version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>. // along with this program. If not, see <https://www.gnu.org/licenses/>.
@@ -19,17 +19,17 @@ import 'package:architecture_example/domain/entities/photo.dart';
import 'package:wyatt_architecture/wyatt_architecture.dart'; import 'package:wyatt_architecture/wyatt_architecture.dart';
abstract class PhotoRepository extends BaseRepository { abstract class PhotoRepository extends BaseRepository {
FutureResult<Album> getAlbum(int id); FutureOrResult<Album> getAlbum(int id);
FutureResult<List<Album>> getAllAlbums({int? start, int? limit}); FutureOrResult<List<Album>> getAllAlbums({int? start, int? limit});
FutureResult<Photo> getPhoto(int id); FutureOrResult<Photo> getPhoto(int id);
FutureResult<List<Photo>> getAllPhotos({int? start, int? limit}); FutureOrResult<List<Photo>> getAllPhotos({int? start, int? limit});
FutureResult<List<Photo>> getPhotosFromAlbum( FutureOrResult<List<Photo>> getPhotosFromAlbum(
int albumId, { int albumId, {
int? start, int? start,
int? limit, int? limit,
}); });
FutureResult<void> addPhotoToFavorites(Photo photo); FutureOrResult<void> addPhotoToFavorites(Photo photo);
FutureResult<void> deletePhotoFromFavorites(int id); FutureOrResult<void> deletePhotoFromFavorites(int id);
FutureResult<List<Photo>> getAllPhotosFromFavorites(); FutureOrResult<List<Photo>> getAllPhotosFromFavorites();
FutureResult<bool> checkIfPhotoIsInFavorites(int id); FutureOrResult<bool> checkIfPhotoIsInFavorites(int id);
} }
@@ -1,31 +1,39 @@
// Copyright (C) 2022 WYATT GROUP // Copyright (C) 2022 WYATT GROUP
// Please see the AUTHORS file for details. // Please see the AUTHORS file for details.
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by // it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// any later version. // any later version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>. // along with this program. If not, see <https://www.gnu.org/licenses/>.
import 'dart:async';
import 'package:architecture_example/domain/entities/photo.dart'; import 'package:architecture_example/domain/entities/photo.dart';
import 'package:architecture_example/domain/repositories/photo_repository.dart'; import 'package:architecture_example/domain/repositories/photo_repository.dart';
import 'package:wyatt_architecture/wyatt_architecture.dart'; import 'package:wyatt_architecture/wyatt_architecture.dart';
class AddPhotoToFavorites extends UseCase<Photo, List<Photo>> { class AddPhotoToFavorites extends AsyncUseCase<Photo, List<Photo>> {
AddPhotoToFavorites(this._photoRepository);
final PhotoRepository _photoRepository; final PhotoRepository _photoRepository;
AddPhotoToFavorites(this._photoRepository);
@override @override
FutureResult<List<Photo>> call(Photo params) async { FutureOrResult<List<Photo>> execute(Photo? params) async {
await _photoRepository.addPhotoToFavorites(params); await _photoRepository.addPhotoToFavorites(params!);
return _photoRepository.getAllPhotosFromFavorites(); return _photoRepository.getAllPhotosFromFavorites();
} }
@override
FutureOr<void> onStart(Photo? params) {
if (params == null) {
throw ClientException('Photo cannot be null');
}
}
} }
@@ -14,15 +14,23 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>. // along with this program. If not, see <https://www.gnu.org/licenses/>.
import 'dart:async';
import 'package:architecture_example/domain/repositories/photo_repository.dart'; import 'package:architecture_example/domain/repositories/photo_repository.dart';
import 'package:wyatt_architecture/wyatt_architecture.dart'; import 'package:wyatt_architecture/wyatt_architecture.dart';
class CheckIfPhotoIsInFavorites extends UseCase<int, bool> { class CheckIfPhotoIsInFavorites extends AsyncUseCase<int, bool> {
CheckIfPhotoIsInFavorites(this._photoRepository);
final PhotoRepository _photoRepository; final PhotoRepository _photoRepository;
CheckIfPhotoIsInFavorites(this._photoRepository); @override
FutureOrResult<bool> execute(int? params) async =>
_photoRepository.checkIfPhotoIsInFavorites(params!);
@override @override
FutureResult<bool> call(int params) async => FutureOr<void> onStart(int? params) {
_photoRepository.checkIfPhotoIsInFavorites(params); if (params == null) {
throw ClientException('id cannot be null');
}
}
} }
@@ -1,16 +1,16 @@
// Copyright (C) 2022 WYATT GROUP // Copyright (C) 2022 WYATT GROUP
// Please see the AUTHORS file for details. // Please see the AUTHORS file for details.
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by // it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// any later version. // any later version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>. // along with this program. If not, see <https://www.gnu.org/licenses/>.
@@ -18,13 +18,12 @@ import 'package:architecture_example/domain/entities/photo.dart';
import 'package:architecture_example/domain/repositories/photo_repository.dart'; import 'package:architecture_example/domain/repositories/photo_repository.dart';
import 'package:wyatt_architecture/wyatt_architecture.dart'; import 'package:wyatt_architecture/wyatt_architecture.dart';
class DisplayFavorites extends UseCase<void, List<Photo>> { class DisplayFavorites extends AsyncUseCase<NoParam, List<Photo>> {
DisplayFavorites(this._photoRepository);
final PhotoRepository _photoRepository; final PhotoRepository _photoRepository;
DisplayFavorites(this._photoRepository);
@override @override
FutureResult<List<Photo>> call(void params) { FutureOrResult<List<Photo>> execute(void params) {
final photos = _photoRepository.getAllPhotosFromFavorites(); final photos = _photoRepository.getAllPhotosFromFavorites();
return photos; return photos;
} }
@@ -14,18 +14,26 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>. // along with this program. If not, see <https://www.gnu.org/licenses/>.
import 'dart:async';
import 'package:architecture_example/domain/entities/photo.dart'; import 'package:architecture_example/domain/entities/photo.dart';
import 'package:architecture_example/domain/repositories/photo_repository.dart'; import 'package:architecture_example/domain/repositories/photo_repository.dart';
import 'package:wyatt_architecture/wyatt_architecture.dart'; import 'package:wyatt_architecture/wyatt_architecture.dart';
class DisplayPhoto extends UseCase<int, Photo> { class DisplayPhoto extends AsyncUseCase<int, Photo> {
DisplayPhoto(this._photoRepository);
final PhotoRepository _photoRepository; final PhotoRepository _photoRepository;
DisplayPhoto(this._photoRepository);
@override @override
FutureResult<Photo> call(int params) { FutureOrResult<Photo> execute(int? params) {
final photo = _photoRepository.getPhoto(params); final photo = _photoRepository.getPhoto(params!);
return photo; return photo;
} }
@override
FutureOr<void> onStart(int? params) {
if (params == null) {
throw ClientException('id cannot be null');
}
}
} }
@@ -14,24 +14,32 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>. // along with this program. If not, see <https://www.gnu.org/licenses/>.
import 'dart:async';
import 'package:architecture_example/domain/entities/photo.dart'; import 'package:architecture_example/domain/entities/photo.dart';
import 'package:architecture_example/domain/repositories/photo_repository.dart'; import 'package:architecture_example/domain/repositories/photo_repository.dart';
import 'package:architecture_example/domain/usecases/photos/params/query_parameters.dart'; import 'package:architecture_example/domain/usecases/photos/params/query_parameters.dart';
import 'package:wyatt_architecture/wyatt_architecture.dart'; import 'package:wyatt_architecture/wyatt_architecture.dart';
class OpenAlbum extends UseCase<QueryParameters, List<Photo>> { class OpenAlbum extends AsyncUseCase<QueryParameters, List<Photo>> {
OpenAlbum(this._photoRepository);
final PhotoRepository _photoRepository; final PhotoRepository _photoRepository;
OpenAlbum(this._photoRepository);
@override @override
FutureResult<List<Photo>> call(QueryParameters params) { FutureOrResult<List<Photo>> execute(QueryParameters? params) {
final photos = _photoRepository.getPhotosFromAlbum( final photos = _photoRepository.getPhotosFromAlbum(
params.albumId, params!.albumId,
start: params.start, start: params.start,
limit: params.limit, limit: params.limit,
); );
return photos; return photos;
} }
@override
FutureOr<void> onStart(QueryParameters? params) {
if (params == null) {
throw ClientException('params cannot be null');
}
}
} }
@@ -15,9 +15,8 @@
// along with this program. If not, see <https://www.gnu.org/licenses/>. // along with this program. If not, see <https://www.gnu.org/licenses/>.
class QueryParameters { class QueryParameters {
QueryParameters(this.start, this.limit, {this.albumId = -1});
final int albumId; final int albumId;
final int? start; final int? start;
final int? limit; final int? limit;
QueryParameters(this.start, this.limit, {this.albumId = -1});
} }
@@ -14,18 +14,26 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>. // along with this program. If not, see <https://www.gnu.org/licenses/>.
import 'dart:async';
import 'package:architecture_example/domain/entities/photo.dart'; import 'package:architecture_example/domain/entities/photo.dart';
import 'package:architecture_example/domain/repositories/photo_repository.dart'; import 'package:architecture_example/domain/repositories/photo_repository.dart';
import 'package:wyatt_architecture/wyatt_architecture.dart'; import 'package:wyatt_architecture/wyatt_architecture.dart';
class RemovePhotoFromFavorites extends UseCase<int, List<Photo>> { class RemovePhotoFromFavorites extends AsyncUseCase<int, List<Photo>> {
RemovePhotoFromFavorites(this._photoRepository);
final PhotoRepository _photoRepository; final PhotoRepository _photoRepository;
RemovePhotoFromFavorites(this._photoRepository);
@override @override
FutureResult<List<Photo>> call(int params) async { FutureOrResult<List<Photo>> execute(int? params) async {
await _photoRepository.deletePhotoFromFavorites(params); await _photoRepository.deletePhotoFromFavorites(params!);
return _photoRepository.getAllPhotosFromFavorites(); return _photoRepository.getAllPhotosFromFavorites();
} }
@override
FutureOr<void> onStart(int? params) {
if (params == null) {
throw ClientException('id cannot be null');
}
}
} }
@@ -14,22 +14,30 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>. // along with this program. If not, see <https://www.gnu.org/licenses/>.
import 'dart:async';
import 'package:architecture_example/domain/entities/album.dart'; import 'package:architecture_example/domain/entities/album.dart';
import 'package:architecture_example/domain/repositories/photo_repository.dart'; import 'package:architecture_example/domain/repositories/photo_repository.dart';
import 'package:architecture_example/domain/usecases/photos/params/query_parameters.dart'; import 'package:architecture_example/domain/usecases/photos/params/query_parameters.dart';
import 'package:wyatt_architecture/wyatt_architecture.dart'; import 'package:wyatt_architecture/wyatt_architecture.dart';
class RetrieveAllAlbums extends UseCase<QueryParameters, List<Album>> { class RetrieveAllAlbums extends AsyncUseCase<QueryParameters, List<Album>> {
RetrieveAllAlbums(this._photoRepository);
final PhotoRepository _photoRepository; final PhotoRepository _photoRepository;
RetrieveAllAlbums(this._photoRepository);
@override @override
FutureResult<List<Album>> call(QueryParameters params) { FutureOrResult<List<Album>> execute(QueryParameters? params) {
final albums = _photoRepository.getAllAlbums( final albums = _photoRepository.getAllAlbums(
start: params.start, start: params!.start,
limit: params.limit, limit: params.limit,
); );
return albums; return albums;
} }
@override
FutureOr<void> onStart(QueryParameters? params) {
if (params == null) {
throw ClientException('params cannot be null');
}
}
} }
@@ -33,14 +33,13 @@ EventTransformer<E> throttleDroppable<E>(Duration duration) =>
(events, mapper) => droppable<E>().call(events.throttle(duration), mapper); (events, mapper) => droppable<E>().call(events.throttle(duration), mapper);
class AlbumBloc extends Bloc<AlbumEvent, AlbumState> { class AlbumBloc extends Bloc<AlbumEvent, AlbumState> {
final RetrieveAllAlbums _retrieveAllAlbums;
AlbumBloc(this._retrieveAllAlbums) : super(const AlbumState()) { AlbumBloc(this._retrieveAllAlbums) : super(const AlbumState()) {
on<AlbumFetched>( on<AlbumFetched>(
_onAlbumFetched, _onAlbumFetched,
transformer: throttleDroppable(throttleDuration), transformer: throttleDroppable(throttleDuration),
); );
} }
final RetrieveAllAlbums _retrieveAllAlbums;
Future<void> _onAlbumFetched( Future<void> _onAlbumFetched(
AlbumFetched event, AlbumFetched event,
@@ -35,7 +35,7 @@ class AlbumsScreen extends BlocScreen<AlbumBloc, AlbumEvent, AlbumState> {
bloc..add(AlbumFetched()); bloc..add(AlbumFetched());
@override @override
Widget onWrap(BuildContext context, Widget child) => AlbumsWrapperWidget( Widget parent(BuildContext context, Widget child) => AlbumsWrapperWidget(
child: child, child: child,
); );
@@ -22,8 +22,11 @@ import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_bloc/flutter_bloc.dart';
class AlbumsList extends StatefulWidget { class AlbumsList extends StatefulWidget {
const AlbumsList( const AlbumsList({
{required this.albums, required this.hasReachedMax, super.key,}); required this.albums,
required this.hasReachedMax,
super.key,
});
final List<Album> albums; final List<Album> albums;
final bool hasReachedMax; final bool hasReachedMax;
@@ -26,19 +26,17 @@ abstract class PhotoDetailsState extends Equatable {
class PhotoDetailsInitial extends PhotoDetailsState {} class PhotoDetailsInitial extends PhotoDetailsState {}
class PhotoDetailsSuccess extends PhotoDetailsState { class PhotoDetailsSuccess extends PhotoDetailsState {
const PhotoDetailsSuccess(this.photo, {required this.isFavorite});
final Photo photo; final Photo photo;
final bool isFavorite; final bool isFavorite;
const PhotoDetailsSuccess(this.photo, {required this.isFavorite});
@override @override
List<Object> get props => [photo, isFavorite]; List<Object> get props => [photo, isFavorite];
} }
class PhotoDetailsFailure extends PhotoDetailsState { class PhotoDetailsFailure extends PhotoDetailsState {
final String error;
const PhotoDetailsFailure(this.error); const PhotoDetailsFailure(this.error);
final String error;
@override @override
List<Object> get props => [error]; List<Object> get props => [error];
@@ -43,7 +43,7 @@ class PhotoDetailsScreen
bloc..load(photoId); bloc..load(photoId);
@override @override
Widget onWrap(BuildContext context, Widget child) => Widget parent(BuildContext context, Widget child) =>
PhotoDetailsWrapperWidget(child: child); PhotoDetailsWrapperWidget(child: child);
@override @override
@@ -23,10 +23,9 @@ import 'package:flutter_bloc/flutter_bloc.dart';
part 'favorite_checker_state.dart'; part 'favorite_checker_state.dart';
class FavoriteCheckerCubit extends Cubit<FavoriteCheckerState> { class FavoriteCheckerCubit extends Cubit<FavoriteCheckerState> {
final CheckIfPhotoIsInFavorites _checkIfPhotoIsInFavorites;
FavoriteCheckerCubit(this._checkIfPhotoIsInFavorites) FavoriteCheckerCubit(this._checkIfPhotoIsInFavorites)
: super(FavoriteCheckerInitial()); : super(FavoriteCheckerInitial());
final CheckIfPhotoIsInFavorites _checkIfPhotoIsInFavorites;
FutureOr<void> checkIfPhotoIsInFavorites(int photoId) async { FutureOr<void> checkIfPhotoIsInFavorites(int photoId) async {
final response = await _checkIfPhotoIsInFavorites.call(photoId); final response = await _checkIfPhotoIsInFavorites.call(photoId);
@@ -10,19 +10,17 @@ abstract class FavoriteCheckerState extends Equatable {
class FavoriteCheckerInitial extends FavoriteCheckerState {} class FavoriteCheckerInitial extends FavoriteCheckerState {}
class FavoriteCheckerSuccess extends FavoriteCheckerState { class FavoriteCheckerSuccess extends FavoriteCheckerState {
const FavoriteCheckerSuccess(this.photoId, {required this.isFavorite});
final int photoId; final int photoId;
final bool isFavorite; final bool isFavorite;
const FavoriteCheckerSuccess(this.photoId, {required this.isFavorite});
@override @override
List<Object> get props => [photoId, isFavorite]; List<Object> get props => [photoId, isFavorite];
} }
class FavoriteCheckerFailure extends FavoriteCheckerState { class FavoriteCheckerFailure extends FavoriteCheckerState {
final String error;
const FavoriteCheckerFailure(this.error); const FavoriteCheckerFailure(this.error);
final String error;
@override @override
List<Object> get props => [error]; List<Object> get props => [error];
@@ -33,14 +33,13 @@ EventTransformer<E> throttleDroppable<E>(Duration duration) =>
(events, mapper) => droppable<E>().call(events.throttle(duration), mapper); (events, mapper) => droppable<E>().call(events.throttle(duration), mapper);
class PhotoBloc extends Bloc<PhotoEvent, PhotoState> { class PhotoBloc extends Bloc<PhotoEvent, PhotoState> {
final OpenAlbum _openAlbum;
PhotoBloc(this._openAlbum) : super(const PhotoState()) { PhotoBloc(this._openAlbum) : super(const PhotoState()) {
on<PhotoFetched>( on<PhotoFetched>(
_onPhotoFetched, _onPhotoFetched,
transformer: throttleDroppable(throttleDuration), transformer: throttleDroppable(throttleDuration),
); );
} }
final OpenAlbum _openAlbum;
Future<void> _onPhotoFetched( Future<void> _onPhotoFetched(
PhotoFetched event, PhotoFetched event,
@@ -24,7 +24,6 @@ abstract class PhotoEvent extends Equatable {
} }
class PhotoFetched extends PhotoEvent { class PhotoFetched extends PhotoEvent {
final int albumId;
const PhotoFetched(this.albumId); const PhotoFetched(this.albumId);
final int albumId;
} }
@@ -37,7 +37,7 @@ class PhotosScreen extends BlocScreen<PhotoBloc, PhotoEvent, PhotoState> {
bloc..add(PhotoFetched(albumId)); bloc..add(PhotoFetched(albumId));
@override @override
Widget onWrap(BuildContext context, Widget child) => PhotosWrapperWidget( Widget parent(BuildContext context, Widget child) => PhotosWrapperWidget(
child: child, child: child,
); );
@@ -71,17 +71,17 @@ class _PhotosGridState extends State<PhotosGrid> {
@override @override
Widget build(BuildContext context) => GridView.builder( Widget build(BuildContext context) => GridView.builder(
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount( gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
crossAxisSpacing: 4, crossAxisSpacing: 4,
mainAxisSpacing: 4, mainAxisSpacing: 4,
crossAxisCount: 4, crossAxisCount: 4,
), ),
itemCount: widget.hasReachedMax itemCount: widget.hasReachedMax
? widget.photos.length ? widget.photos.length
: widget.photos.length + 1, : widget.photos.length + 1,
controller: _scrollController, controller: _scrollController,
itemBuilder: (context, index) => index >= widget.photos.length itemBuilder: (context, index) => index >= widget.photos.length
? const BottomLoader() ? const BottomLoader()
: PhotosGridThumbnail(photo: widget.photos[index]), : PhotosGridThumbnail(photo: widget.photos[index]),
); );
} }
@@ -55,7 +55,10 @@ class PhotosGridThumbnail
), ),
if (state is FavoriteCheckerSuccess && state.isFavorite) ...[ if (state is FavoriteCheckerSuccess && state.isFavorite) ...[
const Positioned( const Positioned(
bottom: 10, right: 10, child: Icon(Icons.favorite),) bottom: 10,
right: 10,
child: Icon(Icons.favorite),
)
] ]
], ],
), ),
@@ -36,7 +36,7 @@ dependencies:
wyatt_type_utils: wyatt_type_utils:
hosted: https://git.wyatt-studio.fr/api/packages/Wyatt-FOSS/pub hosted: https://git.wyatt-studio.fr/api/packages/Wyatt-FOSS/pub
version: ^0.0.3+1 version: ^0.0.4
wyatt_http_client: wyatt_http_client:
git: git:
@@ -49,7 +49,7 @@ dependencies:
wyatt_bloc_helper: wyatt_bloc_helper:
hosted: https://git.wyatt-studio.fr/api/packages/Wyatt-FOSS/pub/ hosted: https://git.wyatt-studio.fr/api/packages/Wyatt-FOSS/pub/
version: ^1.2.0 version: ^2.0.0
equatable: ^2.0.5 equatable: ^2.0.5
stream_transform: ^2.1.0 stream_transform: ^2.1.0
bloc_concurrency: ^0.2.0 bloc_concurrency: ^0.2.0
@@ -67,7 +67,7 @@ dev_dependencies:
wyatt_analysis: wyatt_analysis:
git: git:
url: https://git.wyatt-studio.fr/Wyatt-FOSS/wyatt-packages url: https://git.wyatt-studio.fr/Wyatt-FOSS/wyatt-packages
ref: wyatt_analysis-v2.2.2 ref: wyatt_analysis-v2.4.1
path: packages/wyatt_analysis path: packages/wyatt_analysis
# For information on the generic Dart part of this file, see the # For information on the generic Dart part of this file, see the
@@ -17,9 +17,8 @@
import 'package:wyatt_type_utils/wyatt_type_utils.dart'; import 'package:wyatt_type_utils/wyatt_type_utils.dart';
abstract class AppException implements Exception { abstract class AppException implements Exception {
final String? message;
AppException([this.message]); AppException([this.message]);
final String? message;
@override @override
String toString() { String toString() {
@@ -1,16 +1,16 @@
// Copyright (C) 2022 WYATT GROUP // Copyright (C) 2022 WYATT GROUP
// Please see the AUTHORS file for details. // Please see the AUTHORS file for details.
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by // it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// any later version. // any later version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>. // along with this program. If not, see <https://www.gnu.org/licenses/>.
@@ -1,16 +1,16 @@
// Copyright (C) 2022 WYATT GROUP // Copyright (C) 2022 WYATT GROUP
// Please see the AUTHORS file for details. // Please see the AUTHORS file for details.
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by // it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// any later version. // any later version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>. // along with this program. If not, see <https://www.gnu.org/licenses/>.
@@ -1,16 +1,16 @@
// Copyright (C) 2022 WYATT GROUP // Copyright (C) 2022 WYATT GROUP
// Please see the AUTHORS file for details. // Please see the AUTHORS file for details.
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by // it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// any later version. // any later version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>. // along with this program. If not, see <https://www.gnu.org/licenses/>.
@@ -1,16 +1,16 @@
// Copyright (C) 2022 WYATT GROUP // Copyright (C) 2022 WYATT GROUP
// Please see the AUTHORS file for details. // Please see the AUTHORS file for details.
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by // it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// any later version. // any later version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>. // along with this program. If not, see <https://www.gnu.org/licenses/>.
@@ -1,16 +1,16 @@
// Copyright (C) 2022 WYATT GROUP // Copyright (C) 2022 WYATT GROUP
// Please see the AUTHORS file for details. // Please see the AUTHORS file for details.
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by // it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// any later version. // any later version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>. // along with this program. If not, see <https://www.gnu.org/licenses/>.
@@ -1,16 +1,16 @@
// Copyright (C) 2022 WYATT GROUP // Copyright (C) 2022 WYATT GROUP
// Please see the AUTHORS file for details. // Please see the AUTHORS file for details.
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by // it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// any later version. // any later version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>. // along with this program. If not, see <https://www.gnu.org/licenses/>.
@@ -1,16 +1,16 @@
// Copyright (C) 2022 WYATT GROUP // Copyright (C) 2022 WYATT GROUP
// Please see the AUTHORS file for details. // Please see the AUTHORS file for details.
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by // it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// any later version. // any later version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>. // along with this program. If not, see <https://www.gnu.org/licenses/>.
@@ -1,16 +1,16 @@
// Copyright (C) 2022 WYATT GROUP // Copyright (C) 2022 WYATT GROUP
// Please see the AUTHORS file for details. // Please see the AUTHORS file for details.
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by // it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// any later version. // any later version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>. // along with this program. If not, see <https://www.gnu.org/licenses/>.
@@ -1,16 +1,16 @@
// Copyright (C) 2022 WYATT GROUP // Copyright (C) 2022 WYATT GROUP
// Please see the AUTHORS file for details. // Please see the AUTHORS file for details.
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by // it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// any later version. // any later version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>. // along with this program. If not, see <https://www.gnu.org/licenses/>.
@@ -0,0 +1,44 @@
// Copyright (C) 2022 WYATT GROUP
// Please see the AUTHORS file for details.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
import 'dart:async';
import 'package:wyatt_architecture/wyatt_architecture.dart';
/// Usecase observers
mixin Observer<Parameters, ReturnType> {
/// Called before usecase is runned.
/// Usefull to check the preconditions
FutureOr<void> onStart(Parameters? params) {}
/// Called when error occures during main scenario
/// Usefull to run alternative scenario
FutureOr<void> onError(AppException? error) {}
}
/// Specific observer for classic usecase
mixin AsyncObserver<ReturnType> {
FutureOr<void> onComplete(ReturnType? data) {}
}
/// Specific observer for stream case usecase
mixin StreamObserver<ReturnType> {
/// Replaces the data event handler of this subscription.
void onDone() {}
/// Replaces the done event handler of this subscription.
void onData(ReturnType? data) {}
}
@@ -1,27 +1,80 @@
// Copyright (C) 2022 WYATT GROUP // Copyright (C) 2022 WYATT GROUP
// Please see the AUTHORS file for details. // Please see the AUTHORS file for details.
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by // it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// any later version. // any later version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>. // along with this program. If not, see <https://www.gnu.org/licenses/>.
import 'dart:async';
import 'package:wyatt_architecture/src/core/exceptions/exceptions.dart'; import 'package:wyatt_architecture/src/core/exceptions/exceptions.dart';
import 'package:wyatt_architecture/src/domain/usecases/observers.dart';
import 'package:wyatt_type_utils/wyatt_type_utils.dart'; import 'package:wyatt_type_utils/wyatt_type_utils.dart';
typedef FutureResult<T> = Future<Result<T, AppException>>; typedef FutureOrResult<T> = FutureOr<Result<T, AppException>>;
typedef StreamResult<T> = Stream<Result<T, AppException>>; typedef StreamResult<T> = Stream<Result<T, AppException>>;
typedef Res<T> = Result<T, AppException>;
// ignore: one_member_abstracts /// Abstract class of a use case
abstract class UseCase<Parameters, ReturnType> { abstract class BaseUseCase<Parameters, ReturnType> {
FutureResult<ReturnType> call(Parameters params); /// Run use case scenarios
ReturnType call(Parameters parameters);
/// Private function to implement main scenario
/// of your usecase.
ReturnType execute(Parameters params);
}
/// Abstract class of a use case that deals specifically
/// with the response and its state.
abstract class UseCase<Parameters, ReturnType>
extends BaseUseCase<Parameters?, FutureOrResult<ReturnType>>
with Observer<Parameters, ReturnType> {
FutureOr<void> _onSuccess(ReturnType data);
/// Supports the result of the main scenario and integrates
/// some alternative scenarios if necessary.
@override
FutureOrResult<ReturnType> call(Parameters? parameters) async {
try {
await onStart(parameters);
final response = await execute(parameters);
if (response.isErr) {
await onError(response.err);
} else if (response.isOk && response.ok != null) {
await _onSuccess(response.ok as ReturnType);
}
return response;
} catch (e) {
return Err(ClientException(e.toString()));
}
}
}
/// Abtstract classic usecase.
abstract class AsyncUseCase<Parameters, ReturnType>
extends UseCase<Parameters?, ReturnType> with AsyncObserver<ReturnType> {
@override
FutureOr<void> _onSuccess(ReturnType data) => onComplete(data);
}
/// Abstract specific usecase bases on streams
abstract class StreamUseCase<Parameters, ReturnType>
extends UseCase<Parameters?, Stream<ReturnType>>
with StreamObserver<ReturnType> {
@override
FutureOr<void> _onSuccess(Stream<ReturnType> data) {
data.listen(
onData,
onDone: onDone,
);
}
} }
@@ -15,4 +15,5 @@
// along with this program. If not, see <https://www.gnu.org/licenses/>. // along with this program. If not, see <https://www.gnu.org/licenses/>.
export 'no_param.dart'; export 'no_param.dart';
export 'observers.dart';
export 'usecase.dart'; export 'usecase.dart';
+3 -3
View File
@@ -1,16 +1,16 @@
// Copyright (C) 2022 WYATT GROUP // Copyright (C) 2022 WYATT GROUP
// Please see the AUTHORS file for details. // Please see the AUTHORS file for details.
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by // it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// any later version. // any later version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>. // along with this program. If not, see <https://www.gnu.org/licenses/>.
Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

@@ -0,0 +1,86 @@
@startuml
set namespaceSeparator ::
abstract class "wyatt_architecture::src::core::exceptions::exceptions.dart::AppException" {
+String? message
+String toString()
}
"dart::core::Exception" <|-- "wyatt_architecture::src::core::exceptions::exceptions.dart::AppException"
class "wyatt_architecture::src::core::exceptions::exceptions.dart::ClientException" {
}
"wyatt_architecture::src::core::exceptions::exceptions.dart::AppException" <|-- "wyatt_architecture::src::core::exceptions::exceptions.dart::ClientException"
class "wyatt_architecture::src::core::exceptions::exceptions.dart::ServerException" {
}
"wyatt_architecture::src::core::exceptions::exceptions.dart::AppException" <|-- "wyatt_architecture::src::core::exceptions::exceptions.dart::ServerException"
abstract class "wyatt_architecture::src::domain::repositories::base_repository.dart::BaseRepository" {
}
abstract class "wyatt_architecture::src::domain::data_sources::local::base_local_data_source.dart::BaseLocalDataSource" {
}
"wyatt_architecture::src::domain::data_sources::base_data_source.dart::BaseDataSource" <|-- "wyatt_architecture::src::domain::data_sources::local::base_local_data_source.dart::BaseLocalDataSource"
abstract class "wyatt_architecture::src::domain::data_sources::base_data_source.dart::BaseDataSource" {
}
abstract class "wyatt_architecture::src::domain::data_sources::remote::base_remote_data_source.dart::BaseRemoteDataSource" {
}
"wyatt_architecture::src::domain::data_sources::base_data_source.dart::BaseDataSource" <|-- "wyatt_architecture::src::domain::data_sources::remote::base_remote_data_source.dart::BaseRemoteDataSource"
class "wyatt_architecture::src::domain::usecases::no_param.dart::NoParam" {
}
"wyatt_architecture::src::domain::entities::entity.dart::Entity" <|-- "wyatt_architecture::src::domain::usecases::no_param.dart::NoParam"
abstract class "wyatt_architecture::src::domain::usecases::observers.dart::Observer" {
+FutureOr<void> onStart()
+FutureOr<void> onError()
}
abstract class "wyatt_architecture::src::domain::usecases::observers.dart::AsyncObserver" {
+FutureOr<void> onComplete()
}
abstract class "wyatt_architecture::src::domain::usecases::observers.dart::StreamObserver" {
+void onDone()
+void onData()
}
abstract class "wyatt_architecture::src::domain::usecases::usecase.dart::BaseUseCase" {
+ReturnType execute()
+ReturnType call()
}
abstract class "wyatt_architecture::src::domain::usecases::usecase.dart::UseCase" {
-FutureOr<void> _onSuccess()
+FutureOr<Result<ReturnType, AppException>> execute()
}
"wyatt_architecture::src::domain::usecases::usecase.dart::BaseUseCase" <|-- "wyatt_architecture::src::domain::usecases::usecase.dart::UseCase"
"wyatt_architecture::src::domain::usecases::observers.dart::Observer" <|-- "wyatt_architecture::src::domain::usecases::usecase.dart::UseCase"
abstract class "wyatt_architecture::src::domain::usecases::usecase.dart::AsyncUseCase" {
-FutureOr<void> _onSuccess()
}
"wyatt_architecture::src::domain::usecases::usecase.dart::UseCase" <|-- "wyatt_architecture::src::domain::usecases::usecase.dart::AsyncUseCase"
"wyatt_architecture::src::domain::usecases::observers.dart::AsyncObserver" <|-- "wyatt_architecture::src::domain::usecases::usecase.dart::AsyncUseCase"
abstract class "wyatt_architecture::src::domain::usecases::usecase.dart::StreamUseCase" {
-FutureOr<void> _onSuccess()
}
"wyatt_architecture::src::domain::usecases::usecase.dart::UseCase" <|-- "wyatt_architecture::src::domain::usecases::usecase.dart::StreamUseCase"
"wyatt_architecture::src::domain::usecases::observers.dart::StreamObserver" <|-- "wyatt_architecture::src::domain::usecases::usecase.dart::StreamUseCase"
abstract class "wyatt_architecture::src::domain::entities::entity.dart::Entity" {
}
@enduml
+3 -3
View File
@@ -1,7 +1,7 @@
name: wyatt_architecture name: wyatt_architecture
description: A new Wyatt package description: A new Wyatt package
repository: https://git.wyatt-studio.fr/Wyatt-FOSS/wyatt-packages/src/branch/master/packages/wyatt_architecture repository: https://git.wyatt-studio.fr/Wyatt-FOSS/wyatt-packages/src/branch/master/packages/wyatt_architecture
version: 0.0.2 version: 0.1.0+1
publish_to: https://git.wyatt-studio.fr/api/packages/Wyatt-FOSS/pub publish_to: https://git.wyatt-studio.fr/api/packages/Wyatt-FOSS/pub
@@ -15,7 +15,7 @@ dependencies:
wyatt_type_utils: wyatt_type_utils:
hosted: https://git.wyatt-studio.fr/api/packages/Wyatt-FOSS/pub hosted: https://git.wyatt-studio.fr/api/packages/Wyatt-FOSS/pub
version: ^0.0.3+1 version: ^0.0.4
dev_dependencies: dev_dependencies:
@@ -24,4 +24,4 @@ dev_dependencies:
wyatt_analysis: wyatt_analysis:
hosted: https://git.wyatt-studio.fr/api/packages/Wyatt-FOSS/pub hosted: https://git.wyatt-studio.fr/api/packages/Wyatt-FOSS/pub
version: ^2.2.2 version: ^2.4.1
@@ -0,0 +1,2 @@
firebase_options.dart
.vscode
+7 -2
View File
@@ -1,4 +1,10 @@
{ {
// Dart
"dart.runPubGetOnPubspecChanges": "never",
// Gitea
"gitea.owner": "Wyatt-FOSS",
"gitea.repo": "wyatt-packages",
// Header
"psi-header.changes-tracking": { "psi-header.changes-tracking": {
"isActive": true "isActive": true
}, },
@@ -67,5 +73,4 @@
], ],
} }
], ],
"dart.runPubGetOnPubspecChanges": false, }
}
@@ -1,3 +1,38 @@
## 0.4.1
- **REFACTOR**: use fromFirebaseUser factory to parse user.
- **REFACTOR**: update deps and re-export them.
- **FIX**: fix mock on register.
- **FEAT**: add google sign in in signIn cubit.
- **FEAT**: add google sign in parameter in firebase data source constructor.
- **FEAT**: add google sign_in support (closes #59).
- **FEAT**: add reauthenticate, updateEmail and updatePassword.
- **DOCS**: add correct header.
## 0.4.0+3
- Update a dependency to the latest release.
## 0.4.0+2
- Update a dependency to the latest release.
## 0.4.0+1
- **FIX**: add sort of mutex on onAuthChanges callback trigger.
## 0.4.0
> Note: This release has breaking changes.
- **REFACTOR**: update example with new input builders.
- **FIX**: add initial null account event in stream in the mock authentication.
- **BREAKING** **FIX**: add signInWithEmailAndPassword and signInAnonymously methods in SignInCubit #26.
## 0.3.0+1
- **FIX**: fix some bugs to validate publishing.
## 0.3.0 ## 0.3.0
> Note: This release has breaking changes. > Note: This release has breaking changes.
@@ -8,6 +8,7 @@
.buildlog/ .buildlog/
.history .history
.svn/ .svn/
migrate_working_dir/
# IntelliJ related # IntelliJ related
*.iml *.iml
@@ -43,6 +44,4 @@ app.*.map.json
# Android Studio will place build artifacts here # Android Studio will place build artifacts here
/android/app/debug /android/app/debug
/android/app/profile /android/app/profile
/android/app/release /android/app/release
lib/firebase_options.dart
@@ -1,10 +1,30 @@
# This file tracks properties of this Flutter project. # This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc. # Used by Flutter tool to assess capabilities and perform upgrades etc.
# #
# This file should be version controlled and should not be manually edited. # This file should be version controlled.
version: version:
revision: 5464c5bac742001448fe4fc0597be939379f88ea revision: e99c9c7cd9f6c0b2f8ae6e3ebfd585239f5568f4
channel: stable channel: stable
project_type: app project_type: app
# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: e99c9c7cd9f6c0b2f8ae6e3ebfd585239f5568f4
base_revision: e99c9c7cd9f6c0b2f8ae6e3ebfd585239f5568f4
- platform: ios
create_revision: e99c9c7cd9f6c0b2f8ae6e3ebfd585239f5568f4
base_revision: e99c9c7cd9f6c0b2f8ae6e3ebfd585239f5568f4
# User provided section
# List of Local paths (relative to this file) that should be
# ignored by the migrate tool.
#
# Files that are not part of the templates will be ignored by default.
unmanaged_files:
- 'lib/main.dart'
- 'ios/Runner.xcodeproj/project.pbxproj'
@@ -4,7 +4,7 @@
* ----- * -----
* File: launch.json * File: launch.json
* Created Date: 19/08/2022 15:12:25 * Created Date: 19/08/2022 15:12:25
* Last Modified: 19/08/2022 15:22:02 * Last Modified: Tue Dec 13 2022
* ----- * -----
* Copyright (c) 2022 * Copyright (c) 2022
*/ */
@@ -15,11 +15,18 @@
"version": "0.2.0", "version": "0.2.0",
"configurations": [ "configurations": [
{ {
"name": "example_router", "name": "Mock",
"request": "launch", "request": "launch",
"type": "dart", "type": "dart",
"program": "lib/main.dart", "program": "lib/main.dart",
"flutterMode": "debug" "flutterMode": "debug"
},
{
"name": "Firebase",
"request": "launch",
"type": "dart",
"program": "lib/main_firebase.dart",
"flutterMode": "debug"
} }
] ]
} }
@@ -1,4 +0,0 @@
## 1.0.1
- Update a dependency to the latest release.
@@ -1,4 +1,4 @@
# authentication_bloc_example # example_router
A new Flutter project. A new Flutter project.
@@ -8,9 +8,9 @@ This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project: A few resources to get you started if this is your first Flutter project:
- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) - [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) - [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
For help getting started with Flutter, view our For help getting started with Flutter development, view the
[online documentation](https://flutter.dev/docs), which offers tutorials, [online documentation](https://docs.flutter.dev/), which offers tutorials,
samples, guidance on mobile development, and a full API reference. samples, guidance on mobile development, and a full API reference.
@@ -30,6 +30,7 @@ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android { android {
compileSdkVersion flutter.compileSdkVersion compileSdkVersion flutter.compileSdkVersion
ndkVersion flutter.ndkVersion
compileOptions { compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8 sourceCompatibility JavaVersion.VERSION_1_8
@@ -46,7 +47,9 @@ android {
defaultConfig { defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.authentication_bloc_example" applicationId "com.example.example_router"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
minSdkVersion 21 minSdkVersion 21
targetSdkVersion flutter.targetSdkVersion targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger() versionCode flutterVersionCode.toInteger()
@@ -1,91 +0,0 @@
{
"project_info": {
"project_number": "136771801992",
"firebase_url": "https://tchat-beta.firebaseio.com",
"project_id": "tchat-beta",
"storage_bucket": "tchat-beta.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:136771801992:android:4ff419f07afdad6097203d",
"android_client_info": {
"package_name": "com.example.authentication_bloc_example"
}
},
"oauth_client": [
{
"client_id": "136771801992-nps7ic22shstvgdv0c2ojvbkj3dkntum.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.example.authentication_bloc_example",
"certificate_hash": "5d8790309e13b68c35e5d4d8437c35c6d15e6131"
}
},
{
"client_id": "136771801992-ncuib3rbu7p4ro4eo5su4vaudn2u4qrv.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyAYS14uXupkS158Q5QAFP1864UrUN_yDSk"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "136771801992-ncuib3rbu7p4ro4eo5su4vaudn2u4qrv.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "136771801992-e585bm1n9b3lv89t4phrl9u0glsg52ua.apps.googleusercontent.com",
"client_type": 2,
"ios_info": {
"bundle_id": "com.example.example"
}
}
]
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:136771801992:android:8482c9b90bc29de697203d",
"android_client_info": {
"package_name": "com.example.crud_bloc_example"
}
},
"oauth_client": [
{
"client_id": "136771801992-ncuib3rbu7p4ro4eo5su4vaudn2u4qrv.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyAYS14uXupkS158Q5QAFP1864UrUN_yDSk"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "136771801992-ncuib3rbu7p4ro4eo5su4vaudn2u4qrv.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "136771801992-e585bm1n9b3lv89t4phrl9u0glsg52ua.apps.googleusercontent.com",
"client_type": 2,
"ios_info": {
"bundle_id": "com.example.example"
}
}
]
}
}
}
],
"configuration_version": "1"
}
@@ -1,6 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.authentication_bloc_example"> package="com.example.example_router">
<!-- Flutter needs it to communicate with the running application <!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc. to allow setting breakpoints, to provide hot reload, etc.
--> -->
<uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.INTERNET"/>
@@ -1,7 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.authentication_bloc_example"> package="com.example.example_router">
<application <application
android:label="authentication_bloc_example" android:label="example_router"
android:name="${applicationName}" android:name="${applicationName}"
android:icon="@mipmap/ic_launcher"> android:icon="@mipmap/ic_launcher">
<activity <activity
@@ -3,7 +3,7 @@
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on --> <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar"> <style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when <!-- Show a splash screen on the activity. Automatically removed when
Flutter draws its first frame --> the Flutter engine draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item> <item name="android:windowBackground">@drawable/launch_background</item>
</style> </style>
<!-- Theme applied to the Android Window as soon as the process has started. <!-- Theme applied to the Android Window as soon as the process has started.
@@ -3,7 +3,7 @@
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off --> <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar"> <style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when <!-- Show a splash screen on the activity. Automatically removed when
Flutter draws its first frame --> the Flutter engine draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item> <item name="android:windowBackground">@drawable/launch_background</item>
</style> </style>
<!-- Theme applied to the Android Window as soon as the process has started. <!-- Theme applied to the Android Window as soon as the process has started.
@@ -1,6 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.authentication_bloc_example"> package="com.example.example_router">
<!-- Flutter needs it to communicate with the running application <!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc. to allow setting breakpoints, to provide hot reload, etc.
--> -->
<uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.INTERNET"/>
@@ -6,7 +6,7 @@ buildscript {
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:4.1.0' classpath 'com.android.tools.build:gradle:7.1.2'
// START: FlutterFire Configuration // START: FlutterFire Configuration
classpath 'com.google.gms:google-services:4.3.10' classpath 'com.google.gms:google-services:4.3.10'
// END: FlutterFire Configuration // END: FlutterFire Configuration
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip

Some files were not shown because too many files have changed in this diff Show More