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
528 changed files with 19825 additions and 1167 deletions
+2 -2
View File
@@ -20,12 +20,12 @@ name: default
steps:
- name: quality-check
image: git.wyatt-studio.fr/wyatt-foss/flutter-melos:2.9.0
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
image: git.wyatt-studio.fr/wyatt-foss/flutter-melos:2.9.0-1
commands:
- melos run publish:validate
+44
View File
@@ -3,6 +3,50 @@
All notable changes to this project will be documented in this file.
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
+44 -50
View File
@@ -17,11 +17,7 @@
-->
<p align="center">
<a href="https://wyattapp.io">
<img width="150px" src="resources/wyatt-campus-logo.png">
</a>
<a href="https://wyatt-studio.fr">
<a href="https://wyatt-studio.fr">
<img width="150px" src="resources/wyatt-studio-logo.png">
</a>
<h1 align="center">Wyatt Packages</h1>
@@ -44,10 +40,9 @@
## 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
and open source.
[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.
---
@@ -61,21 +56,21 @@ git clone ssh://git@git.wyatt-studio.fr:993/Wyatt-FOSS/wyatt-packages.git
### Prerequisite
- [Flutter](https://github.com/flutter/flutter).
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.
- [Melos](https://github.com/invertase/melos). Used to manage Dart projects with multiple packages.
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
dart pub global activate melos
```
- [Mason](https://github.com/felangel/mason). Used for code generation.
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
```
- [Lcov](https://github.com/linux-test-project/lcov). Used to generate coverage data.
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
@@ -84,38 +79,39 @@ brew install lcov
- genhtml. Used to convert coverage data into html pages.
After installing all these packages, bootstrap with `melos bs`.
After installation of all these packages, the project can be bootstrapped using the command `melos bs`.
### Create a new package
Create a new package in `packages/` folder.
To create a new package in the packages/ folder, run the following command in the terminal:
```shell
mason make wyatt_package --package_name wyatt_<name> --description A new Wyatt package --flutter_only false
```
Then bootstrap project with `melos bs` command.
The <name> variable in the above command is important and must be clear and understandable.
After creating the package, bootstrap the project with the `melos bs` command.
#### Naming
In the previous instructions `<name>` variable is important.
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.
For example, if name is CRUD BLOC
- name will be crud_bloc
- so the package will be: `wyatt_crud_bloc`
- and the example will be: `crud_bloc_example`
1. name: crud_bloc
2. package name: wyatt_crud_bloc
3. example name: crud_bloc_example
### Create issues
Add the issues directly related to what you want to develop and label them correctly.
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.
@@ -128,18 +124,18 @@ For example, on notification bloc package :
### Branches
Master is protected. You can't push on it. Please develop your feature on another branch. The name of your branch has to match with the issue opened.
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 :
Issue :
For the issue:
- `Feature(notification_bloc): add firebase messaging data source.`
Branch related to this issue :
The related branch should be named:
- `feature(notification_bloc)/add_firebase_messaging_data_source`
- `notification_bloc/feat/add_firebase_messaging_data_source`
### Commits
@@ -163,12 +159,11 @@ Some examples :
- `docs: update readme.` = update **this** readme file.
- `fix(crud)!: fix bug in awesome() function. (#32)` = fix a bug, `!` is important and indicate `BREAKING CHANGES` linked with the 32nd issue.
When you have finished developing, and are ready to close the issue, close it via your commit :
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:
`feat(auth): add AWS support. (close #31)`
Note that your issue will be close after merging on master.
Before closing the issue, please check tests and update coverage. You might run :
```shell
feat(auth): add AWS support. (close #31)
```
```shell
melos run test:all # this will run all tests in this project
@@ -179,45 +174,44 @@ melos run publish:validate # this will run a validation before publish packages
melos run publish # this will publish packages
```
> Note that only modified package will be verified and published.
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
After closing your issue, some work may have been done on master in the meantime. To keep a clean git history, please rebase before opening a change request.
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 have not yet created your branch and have committed locally :
- You haven't created a branch yet and have made local commits:
```shell
git pull --rebase
```
- You are already working on your branch :
- You are already working on a branch:
```shell
git rebase -i master
```
If possible, please use `--fixup` on your commit in interactive rebase.
It's recommended to use the `--fixup` option during the interactive rebase to keep the Git history clean.
Then, opend your PR, get the necessary approval and merge your work. Then you're done ✅.
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.
Once your work is on the master, you can update your package version. Please filter packages to update only your package. `--scope` is used to do it.
For example, after merging changes on `wyatt_otification_bloc` package, you might run :
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*"
```
In fact, melos will filter all packages that match the `wyatt_notification_block` pattern.
This will filter all packages that match the `wyatt_notification_bloc` pattern and update only that package.
You can update check all packages tests by running :
You can then verify that all packages and their tests are working correctly by running:
```shell
melos run test
melos run test:all
```
#### Publish your package
@@ -265,14 +259,14 @@ Here you can change `package name` and `package version`.
---
## Status
![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.
## Simple work flow diagramm
To sum up, here a simple work flow diagramm.
![Dev Wokflow](doc/workflow.svg)
## Status
![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.
+1 -1
View File
@@ -1 +1 @@
{"bricks":{"wyatt_clean_code":{"git":{"url":"ssh://git@git.wyatt-studio.fr:993/Wyatt-FOSS/wyatt-bricks.git","path":"bricks/wyatt_clean_code","ref":"033baa65408ec6b68e6a2ef43e64c24708ef16a1"}},"wyatt_feature_brick":{"git":{"url":"ssh://git@git.wyatt-studio.fr:993/Wyatt-FOSS/wyatt-bricks.git","path":"bricks/wyatt_feature_brick","ref":"033baa65408ec6b68e6a2ef43e64c24708ef16a1"}},"wyatt_package":{"git":{"url":"ssh://git@git.wyatt-studio.fr:993/Wyatt-FOSS/wyatt-bricks.git","path":"bricks/wyatt_package","ref":"033baa65408ec6b68e6a2ef43e64c24708ef16a1"}}}}
{"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"}}}}
+22 -10
View File
@@ -1,13 +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_clean_code:
wyatt_package_template:
git:
url: ssh://git@git.wyatt-studio.fr:993/Wyatt-FOSS/wyatt-bricks.git
path: bricks/wyatt_clean_code
wyatt_feature_brick:
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_feature_brick
wyatt_package:
git:
url: ssh://git@git.wyatt-studio.fr:993/Wyatt-FOSS/wyatt-bricks.git
path: bricks/wyatt_package
url: "ssh://git@git.wyatt-studio.fr:993/Wyatt-FOSS/wyatt-bricks.git"
path: bricks/wyatt_component_template
+8 -4
View File
@@ -24,13 +24,17 @@ scripts:
melos exec -c 1 -- flutter analyze --fatal-infos
description: Run `flutter analyze` for all packages.
fix:
run: melos exec dart fix . --apply
description: Run `dart fix` for all packages.
format:
run: melos exec flutter format . --fix
description: Run `flutter format` for all packages.
run: melos exec dart format .
description: Run `dart format` for all packages.
format-check:
run: melos exec flutter format . --set-exit-if-changed
description: Run `flutter format` checks for all packages.
run: melos exec dart fix . --set-exit-if-changed
description: Run `dart fix` checks for all packages.
clean:deep:
run: git clean -x -d -f -q
+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.
*
* This program is free software: you can redistribute it and/or modify
+10
View File
@@ -1,3 +1,13 @@
## 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.
+27 -8
View File
@@ -1,5 +1,5 @@
<!--
* Copyright (C) 2022 WYATT GROUP
* Copyright (C) 2023 WYATT GROUP
* Please see the AUTHORS file for details.
*
* This program is free software: you can redistribute it and/or modify
@@ -20,21 +20,29 @@
![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.3.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).
## Adding Wyatt Analysis to your project
Using CLI:
```sh
dart pub add wyatt_analysis:2.4.1 --dev --hosted-url=https://git.wyatt-studio.fr/api/packages/Wyatt-FOSS/pub/
```
## Usage
To use the lints, add a dependency in your `pubspec.yaml`:
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.3.0
version: 2.4.1
```
Then, add an include in `analysis_options.yaml`:
Then, add an include in `analysis_options.yaml` :
```yaml
include: package:wyatt_analysis/analysis_options.yaml
@@ -49,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:
```yaml
include: package:wyatt_analysis/analysis_options.flutter.2.3.0.yaml
include: package:wyatt_analysis/analysis_options.flutter.2.4.1.yaml
```
If you just want **Dart** version:
```yaml
include: package:wyatt_analysis/analysis_options.2.3.0.yaml
include: package:wyatt_analysis/analysis_options.2.4.1.yaml
```
## Suppressing Lints
@@ -87,7 +95,7 @@ class B {}
### 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
include: package:wyatt_analysis/analysis_options.yaml
@@ -104,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)
```
## 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
You can explore every lint rules [here](https://dart-lang.github.io/linter/lints/).
@@ -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
@@ -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,5 +1,4 @@
# Copyright (C) 2022 WYATT GROUP
# Copyright (C) 2023 WYATT GROUP
# Please see the AUTHORS file for details.
#
# This program is free software: you can redistribute it and/or modify
@@ -15,5 +14,4 @@
# 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.2.3.0.yaml
include: package:wyatt_analysis/analysis_options.flutter.2.4.1.yaml
@@ -1,5 +1,4 @@
# Copyright (C) 2022 WYATT GROUP
# Copyright (C) 2023 WYATT GROUP
# Please see the AUTHORS file for details.
#
# This program is free software: you can redistribute it and/or modify
@@ -15,5 +14,4 @@
# 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
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.
//
// This program is free software: you can redistribute it and/or modify
@@ -18,4 +18,4 @@
/// used internally at [Wyatt Studio](https://wyatt-studio.fr).
library wyatt_analysis;
const String wyattAnalysisVersion = '2.3.0';
const String wyattAnalysisVersion = '2.4.1';
+21 -12
View File
@@ -18,20 +18,12 @@
usage="
usage:
$(basename "$0") <previous_version> <new_version> -- create new analyzer files.
$(basename "$0") <new_version> -- create new analyzer files.
where:
previous_version: last version, for example \`2.3.0\`
new_version: new version, for example \`2.4.0\`"
old=$1
new=$2
if [ -z "$old" ]; then
echo "previous_version cannot be null"
echo "${usage}"
exit 1
fi
new=$1
if [ -z "$new" ]; then
echo "new_version cannot be null"
@@ -43,6 +35,19 @@ 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"
@@ -52,6 +57,7 @@ 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}"
@@ -91,7 +97,7 @@ sed -e "s/${old}/${new}/g" "README.md" > tempfile.tmp
mv -f tempfile.tmp "README.md"
echo "
# Copyright (C) 2022 WYATT GROUP
# Copyright (C) 2023 WYATT GROUP
# Please see the AUTHORS file for details.
#
# This program is free software: you can redistribute it and/or modify
@@ -111,7 +117,7 @@ include: package:wyatt_analysis/analysis_options.${new}.yaml
" > "${OPTIONS}"
echo "
# Copyright (C) 2022 WYATT GROUP
# Copyright (C) 2023 WYATT GROUP
# Please see the AUTHORS file for details.
#
# This program is free software: you can redistribute it and/or modify
@@ -130,4 +136,7 @@ echo "
include: package:wyatt_analysis/analysis_options.flutter.${new}.yaml
" > "${OPTIONS_FLUTTER}"
# Update latest version
echo "${new}" > "$LATEST_VERSION"
exit 0
+18 -2
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
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
version: 2.3.0
version: 2.4.1
publish_to: https://git.wyatt-studio.fr/api/packages/Wyatt-FOSS/pub
environment:
sdk: '>=2.12.0 <3.0.0'
sdk: ">=2.12.0 <3.0.0"
@@ -15,7 +15,6 @@
// 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 'package:architecture_example/data/models/photo_model.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
@@ -24,7 +24,6 @@ import 'package:wyatt_architecture/wyatt_architecture.dart';
import 'package:wyatt_type_utils/wyatt_type_utils.dart';
class PhotoRepositoryImpl extends PhotoRepository {
PhotoRepositoryImpl(
this._photoRemoteDataSource,
this._albumRemoteDataSource,
@@ -21,7 +21,6 @@ import 'package:architecture_example/domain/repositories/photo_repository.dart';
import 'package:wyatt_architecture/wyatt_architecture.dart';
class AddPhotoToFavorites extends AsyncUseCase<Photo, List<Photo>> {
AddPhotoToFavorites(this._photoRepository);
final PhotoRepository _photoRepository;
@@ -20,7 +20,6 @@ import 'package:architecture_example/domain/repositories/photo_repository.dart';
import 'package:wyatt_architecture/wyatt_architecture.dart';
class CheckIfPhotoIsInFavorites extends AsyncUseCase<int, bool> {
CheckIfPhotoIsInFavorites(this._photoRepository);
final PhotoRepository _photoRepository;
@@ -19,7 +19,6 @@ import 'package:architecture_example/domain/repositories/photo_repository.dart';
import 'package:wyatt_architecture/wyatt_architecture.dart';
class DisplayFavorites extends AsyncUseCase<NoParam, List<Photo>> {
DisplayFavorites(this._photoRepository);
final PhotoRepository _photoRepository;
@@ -21,7 +21,6 @@ import 'package:architecture_example/domain/repositories/photo_repository.dart';
import 'package:wyatt_architecture/wyatt_architecture.dart';
class DisplayPhoto extends AsyncUseCase<int, Photo> {
DisplayPhoto(this._photoRepository);
final PhotoRepository _photoRepository;
@@ -22,7 +22,6 @@ import 'package:architecture_example/domain/usecases/photos/params/query_paramet
import 'package:wyatt_architecture/wyatt_architecture.dart';
class OpenAlbum extends AsyncUseCase<QueryParameters, List<Photo>> {
OpenAlbum(this._photoRepository);
final PhotoRepository _photoRepository;
@@ -15,7 +15,6 @@
// along with this program. If not, see <https://www.gnu.org/licenses/>.
class QueryParameters {
QueryParameters(this.start, this.limit, {this.albumId = -1});
final int albumId;
final int? start;
@@ -21,7 +21,6 @@ import 'package:architecture_example/domain/repositories/photo_repository.dart';
import 'package:wyatt_architecture/wyatt_architecture.dart';
class RemovePhotoFromFavorites extends AsyncUseCase<int, List<Photo>> {
RemovePhotoFromFavorites(this._photoRepository);
final PhotoRepository _photoRepository;
@@ -22,7 +22,6 @@ import 'package:architecture_example/domain/usecases/photos/params/query_paramet
import 'package:wyatt_architecture/wyatt_architecture.dart';
class RetrieveAllAlbums extends AsyncUseCase<QueryParameters, List<Album>> {
RetrieveAllAlbums(this._photoRepository);
final PhotoRepository _photoRepository;
@@ -33,7 +33,6 @@ EventTransformer<E> throttleDroppable<E>(Duration duration) =>
(events, mapper) => droppable<E>().call(events.throttle(duration), mapper);
class AlbumBloc extends Bloc<AlbumEvent, AlbumState> {
AlbumBloc(this._retrieveAllAlbums) : super(const AlbumState()) {
on<AlbumFetched>(
_onAlbumFetched,
@@ -35,7 +35,7 @@ class AlbumsScreen extends BlocScreen<AlbumBloc, AlbumEvent, AlbumState> {
bloc..add(AlbumFetched());
@override
Widget onWrap(BuildContext context, Widget child) => AlbumsWrapperWidget(
Widget parent(BuildContext context, Widget child) => AlbumsWrapperWidget(
child: child,
);
@@ -22,8 +22,11 @@ import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
class AlbumsList extends StatefulWidget {
const AlbumsList(
{required this.albums, required this.hasReachedMax, super.key,});
const AlbumsList({
required this.albums,
required this.hasReachedMax,
super.key,
});
final List<Album> albums;
final bool hasReachedMax;
@@ -26,7 +26,6 @@ abstract class PhotoDetailsState extends Equatable {
class PhotoDetailsInitial extends PhotoDetailsState {}
class PhotoDetailsSuccess extends PhotoDetailsState {
const PhotoDetailsSuccess(this.photo, {required this.isFavorite});
final Photo photo;
final bool isFavorite;
@@ -36,7 +35,6 @@ class PhotoDetailsSuccess extends PhotoDetailsState {
}
class PhotoDetailsFailure extends PhotoDetailsState {
const PhotoDetailsFailure(this.error);
final String error;
@@ -43,7 +43,7 @@ class PhotoDetailsScreen
bloc..load(photoId);
@override
Widget onWrap(BuildContext context, Widget child) =>
Widget parent(BuildContext context, Widget child) =>
PhotoDetailsWrapperWidget(child: child);
@override
@@ -23,7 +23,6 @@ import 'package:flutter_bloc/flutter_bloc.dart';
part 'favorite_checker_state.dart';
class FavoriteCheckerCubit extends Cubit<FavoriteCheckerState> {
FavoriteCheckerCubit(this._checkIfPhotoIsInFavorites)
: super(FavoriteCheckerInitial());
final CheckIfPhotoIsInFavorites _checkIfPhotoIsInFavorites;
@@ -10,7 +10,6 @@ abstract class FavoriteCheckerState extends Equatable {
class FavoriteCheckerInitial extends FavoriteCheckerState {}
class FavoriteCheckerSuccess extends FavoriteCheckerState {
const FavoriteCheckerSuccess(this.photoId, {required this.isFavorite});
final int photoId;
final bool isFavorite;
@@ -20,7 +19,6 @@ class FavoriteCheckerSuccess extends FavoriteCheckerState {
}
class FavoriteCheckerFailure extends FavoriteCheckerState {
const FavoriteCheckerFailure(this.error);
final String error;
@@ -33,7 +33,6 @@ EventTransformer<E> throttleDroppable<E>(Duration duration) =>
(events, mapper) => droppable<E>().call(events.throttle(duration), mapper);
class PhotoBloc extends Bloc<PhotoEvent, PhotoState> {
PhotoBloc(this._openAlbum) : super(const PhotoState()) {
on<PhotoFetched>(
_onPhotoFetched,
@@ -24,7 +24,6 @@ abstract class PhotoEvent extends Equatable {
}
class PhotoFetched extends PhotoEvent {
const PhotoFetched(this.albumId);
final int albumId;
}
@@ -37,7 +37,7 @@ class PhotosScreen extends BlocScreen<PhotoBloc, PhotoEvent, PhotoState> {
bloc..add(PhotoFetched(albumId));
@override
Widget onWrap(BuildContext context, Widget child) => PhotosWrapperWidget(
Widget parent(BuildContext context, Widget child) => PhotosWrapperWidget(
child: child,
);
@@ -71,17 +71,17 @@ class _PhotosGridState extends State<PhotosGrid> {
@override
Widget build(BuildContext context) => GridView.builder(
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
crossAxisSpacing: 4,
mainAxisSpacing: 4,
crossAxisCount: 4,
),
itemCount: widget.hasReachedMax
? widget.photos.length
: widget.photos.length + 1,
controller: _scrollController,
itemBuilder: (context, index) => index >= widget.photos.length
? const BottomLoader()
: PhotosGridThumbnail(photo: widget.photos[index]),
);
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
crossAxisSpacing: 4,
mainAxisSpacing: 4,
crossAxisCount: 4,
),
itemCount: widget.hasReachedMax
? widget.photos.length
: widget.photos.length + 1,
controller: _scrollController,
itemBuilder: (context, index) => index >= widget.photos.length
? const BottomLoader()
: PhotosGridThumbnail(photo: widget.photos[index]),
);
}
@@ -55,7 +55,10 @@ class PhotosGridThumbnail
),
if (state is FavoriteCheckerSuccess && state.isFavorite) ...[
const Positioned(
bottom: 10, right: 10, child: Icon(Icons.favorite),)
bottom: 10,
right: 10,
child: Icon(Icons.favorite),
)
]
],
),
@@ -67,7 +67,7 @@ dev_dependencies:
wyatt_analysis:
git:
url: https://git.wyatt-studio.fr/Wyatt-FOSS/wyatt-packages
ref: wyatt_analysis-v2.3.0
ref: wyatt_analysis-v2.4.1
path: packages/wyatt_analysis
# For information on the generic Dart part of this file, see the
@@ -17,7 +17,6 @@
import 'package:wyatt_type_utils/wyatt_type_utils.dart';
abstract class AppException implements Exception {
AppException([this.message]);
final String? message;
+1 -1
View File
@@ -24,4 +24,4 @@ dev_dependencies:
wyatt_analysis:
hosted: https://git.wyatt-studio.fr/api/packages/Wyatt-FOSS/pub
version: ^2.3.0
version: ^2.4.1
@@ -35,7 +35,7 @@ class EditProfileCubit extends FormDataCubitImpl {
status: FormStatus.submissionInProgress,
),
);
final user = (await authenticationRepository.getAccount()).ok;
// final user = (await authenticationRepository.getAccount()).ok;
final form = state.form;
final email = form.valueOf<String?>(AuthFormField.email);
@@ -37,4 +37,4 @@ dev_dependencies:
wyatt_analysis:
hosted: https://git.wyatt-studio.fr/api/packages/Wyatt-FOSS/pub/
version: 2.3.0
version: 2.4.1
@@ -25,8 +25,8 @@ import 'package:wyatt_type_utils/wyatt_type_utils.dart';
class MockAuthenticationRepository extends Mock
implements AuthenticationRepository<int> {}
class MockAuthenticationCubit extends Mock implements AuthenticationCubit<int> {
}
class MockAuthenticationCubit extends Mock
implements AuthenticationCubit<int> {}
class MockAccount extends Mock implements Account {}
@@ -25,8 +25,8 @@ import 'package:wyatt_type_utils/wyatt_type_utils.dart';
class MockAuthenticationRepository extends Mock
implements AuthenticationRepository<int> {}
class MockAuthenticationCubit extends Mock implements AuthenticationCubit<int> {
}
class MockAuthenticationCubit extends Mock
implements AuthenticationCubit<int> {}
class MockAccount extends Mock implements Account {}
@@ -25,8 +25,8 @@ import 'package:wyatt_type_utils/wyatt_type_utils.dart';
class MockAuthenticationRepository extends Mock
implements AuthenticationRepository<int> {}
class MockAuthenticationCubit extends Mock implements AuthenticationCubit<int> {
}
class MockAuthenticationCubit extends Mock
implements AuthenticationCubit<int> {}
class MockAccount extends Mock implements Account {}
@@ -25,8 +25,8 @@ import 'package:wyatt_type_utils/wyatt_type_utils.dart';
class MockAuthenticationRepository extends Mock
implements AuthenticationRepository<int> {}
class MockAuthenticationCubit extends Mock implements AuthenticationCubit<int> {
}
class MockAuthenticationCubit extends Mock
implements AuthenticationCubit<int> {}
class MockAccount extends Mock implements Account {}
@@ -25,7 +25,6 @@ class CounterBloc extends Bloc<CounterEvent, CounterState> {
final CounterRepository counterRepository;
CounterBloc(this.counterRepository) : super(const CounterInitial()) {
on<CounterIncrement>((event, emit) {
emit(CounterModified(counterRepository.increment(state.count)));
});
@@ -32,4 +32,3 @@ class CounterInitial extends CounterState {
class CounterModified extends CounterState {
const CounterModified(super.count);
}
@@ -24,14 +24,16 @@ class CounterBlocPage
const CounterBlocPage({super.key});
@override
CounterBloc create(BuildContext context) => CounterBloc(repo<CounterRepository>(context));
CounterBloc create(BuildContext context) =>
CounterBloc(repo<CounterRepository>(context));
@override
Widget onBuild(BuildContext context, CounterState state) {
final textTheme = Theme.of(context).textTheme;
return Scaffold(
appBar: AppBar(title: const Text('Counter with Bloc')),
body: Center(child: Text('${state.count}', style: textTheme.headline2)),
body:
Center(child: Text('${state.count}', style: textTheme.displayMedium)),
floatingActionButton: Column(
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.end,
@@ -28,7 +28,8 @@ class CounterConsumerPage
final textTheme = Theme.of(context).textTheme;
return Scaffold(
appBar: AppBar(title: const Text('Counter with Consumer')),
body: Center(child: Text('${state.count}', style: textTheme.headline2)),
body:
Center(child: Text('${state.count}', style: textTheme.displayMedium)),
floatingActionButton: Column(
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.end,
@@ -19,19 +19,20 @@ import 'package:bloc_helper_example/counter/repository/counter_repository.dart';
import 'package:flutter/material.dart';
import 'package:wyatt_bloc_helper/wyatt_bloc_helper.dart';
class CounterCubitPage
extends CubitScreen<CounterCubit, CounterState> {
class CounterCubitPage extends CubitScreen<CounterCubit, CounterState> {
const CounterCubitPage({super.key});
@override
CounterCubit create(BuildContext context) => CounterCubit(repo<CounterRepository>(context));
CounterCubit create(BuildContext context) =>
CounterCubit(repo<CounterRepository>(context));
@override
Widget onBuild(BuildContext context, CounterState state) {
final textTheme = Theme.of(context).textTheme;
return Scaffold(
appBar: AppBar(title: const Text('Counter with Cubit')),
body: Center(child: Text('${state.count}', style: textTheme.headline2)),
body:
Center(child: Text('${state.count}', style: textTheme.displayMedium)),
floatingActionButton: Column(
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.end,
@@ -35,7 +35,7 @@ class CounterProviderPage
appBar: AppBar(title: const Text('Counter with Provider')),
body: Center(child: BlocBuilder<CounterBloc, CounterState>(
builder: (context, state) {
return Text('${state.count}', style: textTheme.headline2);
return Text('${state.count}', style: textTheme.displayMedium);
},
)),
floatingActionButton: Column(
@@ -32,4 +32,3 @@ class CounterInitial extends CounterState {
class CounterModified extends CounterState {
const CounterModified(super.count);
}
@@ -20,6 +20,6 @@ import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
void main() {
BlocOverrides.runZoned(() => runApp(const CounterRepositoryProviderPage()),
blocObserver: CounterObserver());
Bloc.observer = CounterObserver();
runApp(const CounterRepositoryProviderPage());
}
@@ -56,7 +56,8 @@ class MainPage extends StatelessWidget {
onPressed: () => Navigator.of(context)
.push(MaterialPageRoute(builder: (context) {
return BlocProvider<CounterCubit>(
create: (context) => CounterCubit(context.read<CounterRepository>()),
create: (context) =>
CounterCubit(context.read<CounterRepository>()),
child: const CounterConsumerPage(),
);
})),
+1 -1
View File
@@ -22,4 +22,4 @@ dev_dependencies:
wyatt_analysis:
hosted: https://git.wyatt-studio.fr/api/packages/Wyatt-FOSS/pub
version: ^2.3.0
version: ^2.4.1
@@ -1,4 +1,4 @@
# Copyright (C) 2022 WYATT GROUP
# Copyright (C) 2023 WYATT GROUP
# Please see the AUTHORS file for details.
#
# This program is free software: you can redistribute it and/or modify
@@ -14,6 +14,4 @@
# 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.experimental.yaml
include: package:wyatt_analysis/analysis_options.flutter.yaml
@@ -7,31 +7,33 @@ class ExampleCubit extends Cubit<CrudState> {
FutureOr<void> run() async {
while (true) {
await Future.delayed(const Duration(seconds: 1));
await Future<void>.delayed(const Duration(seconds: 1));
emit(CrudLoading());
await Future.delayed(const Duration(seconds: 1));
emit(CrudError('Cubit Error'));
await Future.delayed(const Duration(seconds: 1));
emit(CrudLoaded<String>('DATA LOADED'));
await Future.delayed(const Duration(seconds: 1));
await Future<void>.delayed(const Duration(seconds: 1));
emit(const CrudError('Cubit Error'));
await Future<void>.delayed(const Duration(seconds: 1));
emit(const CrudLoaded<String>('DATA LOADED'));
await Future<void>.delayed(const Duration(seconds: 1));
emit(CrudInitial());
}
}
FutureOr<void> runList() async {
while (true) {
await Future.delayed(const Duration(seconds: 1));
await Future<void>.delayed(const Duration(seconds: 1));
emit(CrudLoading());
await Future.delayed(const Duration(seconds: 1));
emit(CrudError('Cubit Error'));
await Future.delayed(const Duration(seconds: 1));
emit(CrudListLoaded<String>([
'DATA LOADED 1',
'DATA LOADED 2',
'DATA LOADED 3',
'DATA LOADED 4'
]));
await Future.delayed(const Duration(seconds: 1));
await Future<void>.delayed(const Duration(seconds: 1));
emit(const CrudError('Cubit Error'));
await Future<void>.delayed(const Duration(seconds: 1));
emit(
const CrudListLoaded<String>([
'DATA LOADED 1',
'DATA LOADED 2',
'DATA LOADED 3',
'DATA LOADED 4'
]),
);
await Future<void>.delayed(const Duration(seconds: 1));
emit(CrudInitial());
}
}
@@ -0,0 +1,15 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
import 'package:wyatt_component_copy_with_extension/component_copy_with_extension.dart';
part 'custom_app_bar.g.dart';
@ComponentCopyWithExtension()
class CustomAppBar extends TopAppBarComponent with $CustomAppBarCWMixin {
const CustomAppBar({super.key, super.title});
@override
Widget build(BuildContext context) => AppBar(
title: Text(title?.data ?? 'Title'),
);
}
@@ -0,0 +1,98 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'custom_app_bar.dart';
// **************************************************************************
// ComponentCopyWithGenerator
// **************************************************************************
class $CustomAppBarCWProxyImpl implements $TopAppBarComponentCWProxy {
const $CustomAppBarCWProxyImpl(this._value);
final CustomAppBar _value;
@override
CustomAppBar title(TextWrapper? title) => this(title: title);
@override
CustomAppBar centerTitle(bool? centerTitle) => this(centerTitle: centerTitle);
@override
CustomAppBar shape(ShapeBorder? shape) => this(shape: shape);
@override
CustomAppBar systemOverlayStyle(SystemUiOverlayStyle? systemOverlayStyle) =>
this(systemOverlayStyle: systemOverlayStyle);
@override
CustomAppBar automaticallyImplyLeading(bool? automaticallyImplyLeading) =>
this(automaticallyImplyLeading: automaticallyImplyLeading);
@override
CustomAppBar flexibleSpace(Widget? flexibleSpace) =>
this(flexibleSpace: flexibleSpace);
@override
CustomAppBar bottom(PreferredSizeWidget? bottom) => this(bottom: bottom);
@override
CustomAppBar elevation(double? elevation) => this(elevation: elevation);
@override
CustomAppBar scrolledUnderElevation(double? scrolledUnderElevation) =>
this(scrolledUnderElevation: scrolledUnderElevation);
@override
CustomAppBar shadowColor(Color? shadowColor) =>
this(shadowColor: shadowColor);
@override
CustomAppBar surfaceTintColor(Color? surfaceTintColor) =>
this(surfaceTintColor: surfaceTintColor);
@override
CustomAppBar backgroundColor(MultiColor? backgroundColor) =>
this(backgroundColor: backgroundColor);
@override
CustomAppBar iconTheme(IconThemeData? iconTheme) =>
this(iconTheme: iconTheme);
@override
CustomAppBar primary(bool? primary) => this(primary: primary);
@override
CustomAppBar excludeHeaderSemantics(bool? excludeHeaderSemantics) =>
this(excludeHeaderSemantics: excludeHeaderSemantics);
@override
CustomAppBar toolbarHeight(double? toolbarHeight) =>
this(toolbarHeight: toolbarHeight);
@override
CustomAppBar leadingWidth(double? leadingWidth) =>
this(leadingWidth: leadingWidth);
@override
CustomAppBar leading(Widget? leading) => this(leading: leading);
@override
CustomAppBar actions(List<Widget>? actions) => this(actions: actions);
@override
CustomAppBar expandedWidget(List<Widget>? expandedWidget) =>
this(expandedWidget: expandedWidget);
@override
CustomAppBar key(Key? key) => this(key: key);
@override
CustomAppBar call({
TextWrapper? title,
bool? centerTitle,
ShapeBorder? shape,
SystemUiOverlayStyle? systemOverlayStyle,
bool? automaticallyImplyLeading,
Widget? flexibleSpace,
PreferredSizeWidget? bottom,
double? elevation,
double? scrolledUnderElevation,
Color? shadowColor,
Color? surfaceTintColor,
MultiColor? backgroundColor,
IconThemeData? iconTheme,
bool? primary,
bool? excludeHeaderSemantics,
double? toolbarHeight,
double? leadingWidth,
Widget? leading,
List<Widget>? actions,
List<Widget>? expandedWidget,
Key? key,
}) =>
CustomAppBar(
title: title ?? _value.title,
);
}
mixin $CustomAppBarCWMixin on Component {
$TopAppBarComponentCWProxy get copyWith =>
$CustomAppBarCWProxyImpl(this as CustomAppBar);
}
@@ -0,0 +1,30 @@
import 'package:flutter/material.dart';
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
import 'package:wyatt_component_copy_with_extension/component_copy_with_extension.dart';
part 'custom_bottom_bar.g.dart';
@ComponentCopyWithExtension()
class CustomBottomBar extends BottomNavigationBarComponent
with $CustomBottomBarCWMixin {
const CustomBottomBar({super.key});
@override
Widget build(BuildContext context) => BottomNavigationBar(
items: const [
BottomNavigationBarItem(
icon: Icon(
Icons.e_mobiledata,
),
label: 'Icon 1',
),
BottomNavigationBarItem(
icon: Icon(
Icons.do_not_disturb_off,
),
label: 'Icon 2',
),
],
backgroundColor: Colors.blue,
);
}
@@ -0,0 +1,33 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'custom_bottom_bar.dart';
// **************************************************************************
// ComponentCopyWithGenerator
// **************************************************************************
class $CustomBottomBarCWProxyImpl
implements $BottomNavigationBarComponentCWProxy {
const $CustomBottomBarCWProxyImpl(this._value);
final CustomBottomBar _value;
@override
CustomBottomBar onTap(void Function(BuildContext, int)? onTap) =>
this(onTap: onTap);
@override
CustomBottomBar currentIndex(int? currentIndex) =>
this(currentIndex: currentIndex);
@override
CustomBottomBar key(Key? key) => this(key: key);
@override
CustomBottomBar call({
void Function(BuildContext, int)? onTap,
int? currentIndex,
Key? key,
}) =>
CustomBottomBar();
}
mixin $CustomBottomBarCWMixin on Component {
$BottomNavigationBarComponentCWProxy get copyWith =>
$CustomBottomBarCWProxyImpl(this as CustomBottomBar);
}
@@ -0,0 +1,17 @@
import 'package:flutter/material.dart';
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
import 'package:wyatt_component_copy_with_extension/component_copy_with_extension.dart';
part 'custom_error_widget.g.dart';
@ComponentCopyWithExtension()
class CustomErrorWidget extends ErrorWidgetComponent
with $CustomErrorWidgetCWMixin {
CustomErrorWidget({super.key, super.error});
@override
Widget build(BuildContext context) => ColoredBox(
color: Colors.red,
child: Center(child: Text(error?.data ?? 'Error')),
);
}
@@ -0,0 +1,29 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'custom_error_widget.dart';
// **************************************************************************
// ComponentCopyWithGenerator
// **************************************************************************
class $CustomErrorWidgetCWProxyImpl implements $ErrorWidgetComponentCWProxy {
const $CustomErrorWidgetCWProxyImpl(this._value);
final CustomErrorWidget _value;
@override
CustomErrorWidget error(TextWrapper? error) => this(error: error);
@override
CustomErrorWidget key(Key? key) => this(key: key);
@override
CustomErrorWidget call({
TextWrapper? error,
Key? key,
}) =>
CustomErrorWidget(
error: error ?? _value.error,
);
}
mixin $CustomErrorWidgetCWMixin on Component {
$ErrorWidgetComponentCWProxy get copyWith =>
$CustomErrorWidgetCWProxyImpl(this as CustomErrorWidget);
}
@@ -0,0 +1,15 @@
import 'package:flutter/material.dart';
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
import 'package:wyatt_component_copy_with_extension/component_copy_with_extension.dart';
part 'custom_loading_widget.g.dart';
@ComponentCopyWithExtension()
class CustomLoadingWidget extends LoadingWidgetComponent
with $CustomLoadingWidgetCWMixin {
CustomLoadingWidget({super.key, super.color});
@override
Widget build(BuildContext context) =>
Center(child: CircularProgressIndicator(color: color));
}
@@ -0,0 +1,30 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'custom_loading_widget.dart';
// **************************************************************************
// ComponentCopyWithGenerator
// **************************************************************************
class $CustomLoadingWidgetCWProxyImpl
implements $LoadingWidgetComponentCWProxy {
const $CustomLoadingWidgetCWProxyImpl(this._value);
final CustomLoadingWidget _value;
@override
CustomLoadingWidget color(Color? color) => this(color: color);
@override
CustomLoadingWidget key(Key? key) => this(key: key);
@override
CustomLoadingWidget call({
Color? color,
Key? key,
}) =>
CustomLoadingWidget(
color: color ?? _value.color,
);
}
mixin $CustomLoadingWidgetCWMixin on Component {
$LoadingWidgetComponentCWProxy get copyWith =>
$CustomLoadingWidgetCWProxyImpl(this as CustomLoadingWidget);
}
@@ -1,79 +1,14 @@
import 'package:flutter/material.dart';
import 'package:bloc_layout_example/components/custom_app_bar.dart';
import 'package:bloc_layout_example/components/custom_bottom_bar.dart';
import 'package:bloc_layout_example/components/custom_error_widget.dart';
import 'package:bloc_layout_example/components/custom_loading_widget.dart';
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
class AppThemeComponent {
static ComponentThemeData get components => ComponentThemeData.raw(
appBar: CustomAppBar(),
bottomNavigationBar: CustomBottomBar(),
appBar: const CustomAppBar(),
bottomNavigationBar: const CustomBottomBar(),
loadingWidget: CustomLoadingWidget(),
errorWidget: CustomErrorWidget(),
);
}
class CustomAppBar extends AppBarComponent {
const CustomAppBar({super.title});
@override
Widget build(BuildContext context) => AppBar(
title: Text(title ?? 'Title'),
);
@override
AppBarComponent? configure(
{String? title, Widget? leading, List<Widget>? actions}) =>
CustomAppBar(
title: title ?? this.title,
);
}
class CustomBottomBar extends BottomNavigationBarComponent {
@override
Widget build(BuildContext context) => BottomNavigationBar(
items: [
BottomNavigationBarItem(
icon: Icon(
Icons.e_mobiledata,
),
label: 'Icon 1'),
BottomNavigationBarItem(
icon: Icon(
Icons.do_not_disturb_off,
),
label: 'Icon 2'),
],
backgroundColor: Colors.blue,
);
@override
BottomNavigationBarComponent? configure(
{void Function(BuildContext p1, int p2)? onTap,
int currentIndex = 0}) =>
this;
}
class CustomLoadingWidget extends LoadingWidgetComponent {
CustomLoadingWidget({super.color});
@override
Widget build(BuildContext context) =>
Center(child: CircularProgressIndicator(color: color));
@override
LoadingWidgetComponent? configure({Color? color}) => CustomLoadingWidget(
color: color ?? this.color,
);
}
class CustomErrorWidget extends ErrorWidgetComponent {
CustomErrorWidget({super.error});
@override
Widget build(BuildContext context) => ColoredBox(
color: Colors.red,
child: Center(child: Text(error ?? 'Error')),
);
@override
ErrorWidgetComponent? configure({String? error}) => CustomErrorWidget(
error: error ?? this.error,
);
}
@@ -28,61 +28,63 @@ class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return ComponentTheme(
componentThemeWidget: AppThemeComponent.components,
child: MaterialApp(
title: 'Bloc Layout Example',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: Scaffold(
body: Column(
children: [
Expanded(
child: Row(
children: [
Expanded(
child: BlocProvider(
create: (_) => ExampleCubit()..run(),
child: ExampleCrudStateManagement(),
),
),
Expanded(
child: BlocProvider(
create: (_) => ExampleCubit()..runList(),
child: ExampleListCrudStateManagement(),
),
),
],
),
),
Expanded(
child: Row(
children: [
Expanded(
child: BlocProvider(
Widget build(BuildContext context) => ComponentTheme(
componentThemeWidget: AppThemeComponent.components,
child: MaterialApp(
title: 'Bloc Layout Example',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: Scaffold(
body: Column(
children: [
Expanded(
child: Row(
children: [
Expanded(
child: BlocProvider(
create: (_) => ExampleCubit()..run(),
child: ExampleFrameLayoutCrudConsumer()),
),
Expanded(
child: BlocProvider(
child: const ExampleCrudStateManagement(),
),
),
Expanded(
child: BlocProvider(
create: (_) => ExampleCubit()..runList(),
child: ExampleFrameLayoutCrudListConsumer()),
),
],
child: const ExampleListCrudStateManagement(),
),
),
],
),
),
),
],
Expanded(
child: Row(
children: [
Expanded(
child: BlocProvider(
create: (_) => ExampleCubit()..run(),
child: const ExampleFrameLayoutCrudConsumer(),
),
),
Expanded(
child: BlocProvider(
create: (_) => ExampleCubit()..runList(),
child: const ExampleFrameLayoutCrudListConsumer(),
),
),
],
),
),
],
),
),
),
),
);
}
);
}
class ExampleCrudStateManagement
extends CrudCubitConsumerScreen<ExampleCubit, String> {
const ExampleCrudStateManagement({super.key});
@override
Widget initialBuilder(BuildContext context, CrudInitial state) =>
Container(color: Colors.yellow);
@@ -93,6 +95,8 @@ class ExampleCrudStateManagement
class ExampleListCrudStateManagement
extends CrudListCubitConsumerScreen<ExampleCubit, String> {
const ExampleListCrudStateManagement({super.key});
@override
Widget initialBuilder(BuildContext context, CrudInitial state) =>
Container(color: Colors.green);
@@ -105,8 +109,8 @@ class ExampleListCrudStateManagement
}
class ExampleFrameLayoutCrudConsumer
extends FrameLayoutCrudConsumerScreen<ExampleCubit, String> {
const ExampleFrameLayoutCrudConsumer()
extends FrameLayoutCrudCubitConsumerScreen<ExampleCubit, String> {
const ExampleFrameLayoutCrudConsumer({super.key})
: super(
title: 'Example Title',
currentIndex: 0,
@@ -118,8 +122,8 @@ class ExampleFrameLayoutCrudConsumer
}
class ExampleFrameLayoutCrudListConsumer
extends FrameLayoutCrudListConsumerScreen<ExampleCubit, String> {
const ExampleFrameLayoutCrudListConsumer()
extends FrameLayoutCrudListCubitConsumerScreen<ExampleCubit, String> {
const ExampleFrameLayoutCrudListConsumer({super.key})
: super(
title: 'Example Title',
currentIndex: 0,
@@ -3,7 +3,7 @@ description: A new Flutter project.
# The following line prevents the package from being accidentally published to
# pub.dev using `flutter pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
publish_to: "none" # Remove this line if you wish to publish to pub.dev
# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
@@ -27,33 +27,38 @@ environment:
# the latest version available on pub.dev. To see which dependencies have newer
# versions available, run `flutter pub outdated`.
dependencies:
flutter:
sdk: flutter
wyatt_bloc_layout:
path: "../"
dev_dependencies:
wyatt_component_copy_with_extension:
git:
url: ssh://git@git.wyatt-studio.fr:993/Wyatt-FOSS/wyatt-packages.git
path: packages/wyatt_component_copy_with_extension
dev_dependencies:
flutter_test:
sdk: flutter
build_runner: ^2.3.3
wyatt_component_copy_with_gen:
git:
url: ssh://git@git.wyatt-studio.fr:993/Wyatt-FOSS/wyatt-packages.git
path: packages/wyatt_component_copy_with_gen
wyatt_analysis:
git:
url: https://git.wyatt-studio.fr/Wyatt-FOSS/wyatt-packages
ref: wyatt_analysis-v2.3.0
ref: wyatt_analysis-v2.4.1
path: packages/wyatt_analysis
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
# The following section is specific to Flutter.
flutter:
# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
@@ -13,3 +13,5 @@
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
export './crud_cubit_consumer_screen_mixin.dart';
@@ -16,13 +16,14 @@
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart' as bloc_base;
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
abstract class CrudCubitScreenBase<Cubit extends bloc_base.Cubit<CrudState>,
SuccessState extends CrudSuccess> extends CubitScreen<Cubit, CrudState> {
const CrudCubitScreenBase();
import 'package:wyatt_crud_bloc/wyatt_crud_bloc.dart';
import 'package:wyatt_ui_components/wyatt_wyatt_ui_components.dart';
mixin CrudMixin<Cubit extends bloc_base.Cubit<dynamic>,
SuccessState extends CrudSuccess> {
Widget errorBuilder(BuildContext context, CrudError state) =>
context.components.errorWidget?.configure(error: state.message) ??
context.components.errorWidget?.copyWith(error: state.message.wrap()) ??
const SizedBox.shrink();
Widget loadingBuilder(BuildContext context, CrudLoading state) =>
@@ -33,8 +34,7 @@ abstract class CrudCubitScreenBase<Cubit extends bloc_base.Cubit<CrudState>,
Widget successBuilder(BuildContext context, SuccessState state);
@override
Widget onBuild(BuildContext context, CrudState state) =>
Widget crudBuilder(BuildContext context, CrudState state) =>
CrudBuilder<CrudInitial, CrudLoading, SuccessState, CrudError>(
errorBuilder: errorBuilder,
loadingBuilder: loadingBuilder,
@@ -43,13 +43,3 @@ abstract class CrudCubitScreenBase<Cubit extends bloc_base.Cubit<CrudState>,
builder: successBuilder,
);
}
abstract class CrudCubitScreen<Cubit extends bloc_base.Cubit<CrudState>, T>
extends CrudCubitScreenBase<Cubit, CrudLoaded<T>> {
const CrudCubitScreen();
}
abstract class CrudListCubitScreen<Cubit extends bloc_base.Cubit<CrudState>, T>
extends CrudCubitScreenBase<Cubit, CrudListLoaded<T>> {
const CrudListCubitScreen();
}
@@ -16,37 +16,26 @@
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart' as bloc_base;
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
abstract class AppBarLayoutCrudScreen<Cubit extends bloc_base.Cubit<CrudState>,
T> extends CrudCubitScreen<Cubit, T> {
final String? title;
const AppBarLayoutCrudScreen({
abstract class AppBarLayoutCubitConsumerScreen<
Cubit extends bloc_base.Cubit<State>,
State extends Object> extends CubitConsumerScreen<Cubit, State> {
const AppBarLayoutCubitConsumerScreen({
this.title,
this.leading,
this.actions,
super.key,
});
final String? title;
final Widget? leading;
final List<Widget>? actions;
@override
Widget parent(BuildContext context, Widget child) => AppBarLayout(
title: title ?? 'Title',
body: child,
);
}
abstract class AppBarLayoutCrudListScreen<
Cubit extends bloc_base.Cubit<CrudState>,
T> extends CrudListCubitScreen<Cubit, T> {
final String? title;
final int? currentIndex;
const AppBarLayoutCrudListScreen({
this.title,
this.currentIndex,
});
@override
Widget parent(BuildContext context, Widget child) => AppBarLayout(
title: title ?? 'Title',
title: title,
body: child,
);
}
@@ -0,0 +1,19 @@
// 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/>.
export './app_bar_layout_cubit_consumer_screen.dart';
export './bottom_bar_layout_cubit_consumer_screen.dart';
export './frame_layout_cubit_consumer_screen.dart';
@@ -16,40 +16,23 @@
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart' as bloc_base;
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
abstract class BottomNavigationBarLayoutCrudScreen<
Cubit extends bloc_base.Cubit<CrudState>,
T> extends CrudCubitScreen<Cubit, T> {
final int? currentIndex;
const BottomNavigationBarLayoutCrudScreen({
abstract class BottomBarLayoutCubitConsumerScreen<
Cubit extends bloc_base.Cubit<State>,
State extends Object> extends CubitConsumerScreen<Cubit, State> {
const BottomBarLayoutCubitConsumerScreen({
this.currentIndex,
super.key,
});
final int? currentIndex;
@override
Widget parent(BuildContext context, Widget child) =>
BottomNavigationBarLayout(
currentIndex: currentIndex,
body: child,
currentIndex: currentIndex ?? 0,
);
}
abstract class BottomNavigationBarLayoutCrudListScreen<
Cubit extends bloc_base.Cubit<CrudState>,
T> extends CrudListCubitScreen<Cubit, T> {
final String? title;
final int? currentIndex;
const BottomNavigationBarLayoutCrudListScreen({
this.title,
this.currentIndex,
});
@override
Widget parent(BuildContext context, Widget child) =>
BottomNavigationBarLayout(
body: child,
currentIndex: currentIndex ?? 0,
);
}
@@ -14,43 +14,31 @@
// 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 'package:flutter/src/widgets/framework.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart' as bloc_base;
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
abstract class FrameLayoutCrudScreen<Cubit extends bloc_base.Cubit<CrudState>,
T> extends CrudCubitScreen<Cubit, T> {
final String? title;
final int? currentIndex;
const FrameLayoutCrudScreen({
abstract class FrameLayoutCubitConsumerScreen<
Cubit extends bloc_base.Cubit<State>,
State extends Object> extends CubitConsumerScreen<Cubit, State> {
const FrameLayoutCubitConsumerScreen({
this.title,
this.leading,
this.actions,
this.currentIndex,
super.key,
});
final int? currentIndex;
final String? title;
final Widget? leading;
final List<Widget>? actions;
@override
Widget parent(BuildContext context, Widget child) => FrameLayout(
title: title ?? 'Title',
title: title,
currentIndex: currentIndex,
body: child,
currentIndex: currentIndex ?? 0,
);
}
abstract class FrameLayoutCrudListScreen<
Cubit extends bloc_base.Cubit<CrudState>,
T> extends CrudListCubitScreen<Cubit, T> {
final String? title;
final int? currentIndex;
const FrameLayoutCrudListScreen({
this.title,
this.currentIndex,
});
@override
Widget parent(BuildContext context, Widget child) => FrameLayout(
title: title ?? 'Title',
body: child,
currentIndex: currentIndex ?? 0,
);
}
@@ -0,0 +1,18 @@
// 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/>.
export 'bases/bases.dart';
export 'crud/crud.dart';
@@ -0,0 +1,51 @@
// 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 'package:flutter/widgets.dart';
import 'package:flutter_bloc/flutter_bloc.dart' as bloc_base;
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
abstract class AppBarLayoutCrudCubitConsumerScreen<
Cubit extends bloc_base.Cubit<CrudState>, T extends Object?>
extends AppBarLayoutCubitConsumerScreen<Cubit, CrudState>
with CrudMixin<Cubit, CrudLoaded<T>> {
const AppBarLayoutCrudCubitConsumerScreen({
super.title,
super.leading,
super.actions,
super.key,
});
@override
Widget onBuild(BuildContext context, CrudState state) =>
crudBuilder(context, state);
}
abstract class AppBarLayoutCrudListCubitConsumerScreen<
Cubit extends bloc_base.Cubit<CrudState>, T extends Object?>
extends AppBarLayoutCubitConsumerScreen<Cubit, CrudState>
with CrudMixin<Cubit, CrudListLoaded<T>> {
const AppBarLayoutCrudListCubitConsumerScreen({
super.title,
super.leading,
super.actions,
super.key,
});
@override
Widget onBuild(BuildContext context, CrudState state) =>
crudBuilder(context, state);
}
@@ -0,0 +1,47 @@
// 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 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart' as bloc_base;
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
abstract class BottomBarLayoutCrudCubitConsumerScreen<
Cubit extends bloc_base.Cubit<CrudState>, T extends Object?>
extends BottomBarLayoutCubitConsumerScreen<Cubit, CrudState>
with CrudMixin<Cubit, CrudLoaded<T>> {
const BottomBarLayoutCrudCubitConsumerScreen({
super.currentIndex,
super.key,
});
@override
Widget onBuild(BuildContext context, CrudState state) =>
crudBuilder(context, state);
}
abstract class BottomBarLayoutCrudListCubitConsumerScreen<
Cubit extends bloc_base.Cubit<CrudState>, T extends Object?>
extends BottomBarLayoutCubitConsumerScreen<Cubit, CrudState>
with CrudMixin<Cubit, CrudListLoaded<T>> {
const BottomBarLayoutCrudListCubitConsumerScreen({
super.currentIndex,
super.key,
});
@override
Widget onBuild(BuildContext context, CrudState state) =>
crudBuilder(context, state);
}
@@ -0,0 +1,20 @@
// 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/>.
export './app_bar_layout_crud_cubit_consumer_screen.dart';
export './bottom_bar_layout_crud_cubit_consumer_screen.dart';
export './crud_cubit_consumer_screen.dart';
export './frame_layout_crud_cubit_consumer_screen.dart';
@@ -0,0 +1,40 @@
// 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 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart' as bloc_base;
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
abstract class CrudCubitConsumerScreen<Cubit extends bloc_base.Cubit<CrudState>,
T extends Object?> extends CubitConsumerScreen<Cubit, CrudState>
with CrudMixin<Cubit, CrudLoaded<T>> {
const CrudCubitConsumerScreen({super.key});
@override
Widget onBuild(BuildContext context, CrudState state) =>
crudBuilder(context, state);
}
abstract class CrudListCubitConsumerScreen<
Cubit extends bloc_base.Cubit<CrudState>,
T extends Object?> extends CubitConsumerScreen<Cubit, CrudState>
with CrudMixin<Cubit, CrudListLoaded<T>> {
const CrudListCubitConsumerScreen({super.key});
@override
Widget onBuild(BuildContext context, CrudState state) =>
crudBuilder(context, state);
}
@@ -0,0 +1,53 @@
// 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 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart' as bloc_base;
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
abstract class FrameLayoutCrudCubitConsumerScreen<
Cubit extends bloc_base.Cubit<CrudState>, T extends Object?>
extends FrameLayoutCubitConsumerScreen<Cubit, CrudState>
with CrudMixin<Cubit, CrudLoaded<T>> {
const FrameLayoutCrudCubitConsumerScreen({
super.title,
super.leading,
super.actions,
super.currentIndex,
super.key,
});
@override
Widget onBuild(BuildContext context, CrudState state) =>
crudBuilder(context, state);
}
abstract class FrameLayoutCrudListCubitConsumerScreen<
Cubit extends bloc_base.Cubit<CrudState>, T extends Object?>
extends FrameLayoutCubitConsumerScreen<Cubit, CrudState>
with CrudMixin<Cubit, CrudListLoaded<T>> {
const FrameLayoutCrudListCubitConsumerScreen({
super.title,
super.leading,
super.actions,
super.currentIndex,
super.key,
});
@override
Widget onBuild(BuildContext context, CrudState state) =>
crudBuilder(context, state);
}
@@ -1,61 +0,0 @@
// 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 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart' as bloc_base;
import 'package:wyatt_bloc_helper/wyatt_bloc_helper.dart';
import 'package:wyatt_crud_bloc/wyatt_crud_bloc.dart';
import 'package:wyatt_ui_components/wyatt_wyatt_ui_components.dart';
abstract class CrudCubitConsumerScreenBase<
Cubit extends bloc_base.Cubit<CrudState>,
SuccessState extends CrudSuccess>
extends CubitConsumerScreen<Cubit, CrudState> {
const CrudCubitConsumerScreenBase({super.key});
Widget errorBuilder(BuildContext context, CrudError state) =>
context.components.errorWidget?.configure(error: state.message) ??
const SizedBox.shrink();
Widget loadingBuilder(BuildContext context, CrudLoading state) =>
context.components.loadingWidget ?? const SizedBox.shrink();
Widget initialBuilder(BuildContext context, CrudInitial state) =>
const SizedBox.shrink();
Widget successBuilder(BuildContext context, SuccessState state);
@override
Widget onBuild(BuildContext context, CrudState state) =>
CrudBuilder<CrudInitial, CrudLoading, SuccessState, CrudError>(
errorBuilder: errorBuilder,
loadingBuilder: loadingBuilder,
initialBuilder: initialBuilder,
state: state,
builder: successBuilder,
);
}
abstract class CrudCubitConsumerScreen<Cubit extends bloc_base.Cubit<CrudState>,
T> extends CrudCubitConsumerScreenBase<Cubit, CrudLoaded<T>> {
const CrudCubitConsumerScreen();
}
abstract class CrudListCubitConsumerScreen<
Cubit extends bloc_base.Cubit<CrudState>,
T> extends CrudCubitConsumerScreenBase<Cubit, CrudListLoaded<T>> {
const CrudListCubitConsumerScreen();
}
@@ -1,57 +0,0 @@
// 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 'package:flutter/src/widgets/framework.dart';
import 'package:flutter_bloc/flutter_bloc.dart' as bloc_base;
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
abstract class FrameLayoutCrudConsumerScreen<
Cubit extends bloc_base.Cubit<CrudState>,
T> extends CrudCubitConsumerScreen<Cubit, T> {
final String? title;
final int? currentIndex;
const FrameLayoutCrudConsumerScreen({
this.title,
this.currentIndex,
});
@override
Widget parent(BuildContext context, Widget child) => FrameLayout(
title: title ?? 'Title',
body: child,
currentIndex: currentIndex ?? 0,
);
}
abstract class FrameLayoutCrudListConsumerScreen<
Cubit extends bloc_base.Cubit<CrudState>,
T> extends CrudListCubitConsumerScreen<Cubit, T> {
final String? title;
final int? currentIndex;
const FrameLayoutCrudListConsumerScreen({
this.title,
this.currentIndex,
});
@override
Widget parent(BuildContext context, Widget child) => FrameLayout(
title: title ?? 'Title',
body: child,
currentIndex: currentIndex ?? 0,
);
}
@@ -14,11 +14,5 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
export 'consumers/crud_cubit_consumer_screen_bases.dart';
export 'consumers/bottom_navigation_bar_layout_crud_consumer_screen.dart';
export 'consumers/app_bar_cubit_consumer_screen.dart';
export 'consumers/frame_layout_crud_consumer_screen.dart';
export 'screens/crud_cubit_screen_base.dart';
export 'screens/app_bar_cubit_screen.dart';
export 'screens/bottom_navigation_bar_layout_crud_screen.dart';
export 'screens/frame_layout_crud_screen.dart';
export 'consumers/consumers.dart';
export 'screens/screens.dart';
@@ -16,38 +16,25 @@
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart' as bloc_base;
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
abstract class AppBarLayoutCrudConsumerScreen<
Cubit extends bloc_base.Cubit<CrudState>,
T> extends CrudCubitConsumerScreen<Cubit, T> {
final String? title;
const AppBarLayoutCrudConsumerScreen({
abstract class AppBarLayoutCubitScreen<Cubit extends bloc_base.Cubit<State>,
State extends Object> extends CubitScreen<Cubit, State> {
const AppBarLayoutCubitScreen({
this.title,
this.leading,
this.actions,
super.key,
});
final String? title;
final Widget? leading;
final List<Widget>? actions;
@override
Widget parent(BuildContext context, Widget child) => AppBarLayout(
title: title ?? 'Title',
body: child,
);
}
abstract class AppBarLayoutCrudListConsumerScreen<
Cubit extends bloc_base.Cubit<CrudState>,
T> extends CrudListCubitConsumerScreen<Cubit, T> {
final String? title;
final int? currentIndex;
const AppBarLayoutCrudListConsumerScreen({
this.title,
this.currentIndex,
});
@override
Widget parent(BuildContext context, Widget child) => AppBarLayout(
title: title ?? 'Title',
title: title,
body: child,
);
}
@@ -0,0 +1,19 @@
// 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/>.
export 'app_bar_layout_cubit_screen.dart';
export 'bottom_bar_layout_cubit_screen.dart';
export 'frame_layout_cubit_screen.dart';
@@ -16,40 +16,22 @@
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart' as bloc_base;
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
abstract class BottomNavigationBarLayoutCrudConsumerScreen<
Cubit extends bloc_base.Cubit<CrudState>,
T> extends CrudCubitConsumerScreen<Cubit, T> {
final int? currentIndex;
const BottomNavigationBarLayoutCrudConsumerScreen({
abstract class BottomBarLayoutCubitScreen<Cubit extends bloc_base.Cubit<State>,
State extends Object> extends CubitScreen<Cubit, State> {
const BottomBarLayoutCubitScreen({
this.currentIndex,
super.key,
});
final int? currentIndex;
@override
Widget parent(BuildContext context, Widget child) =>
BottomNavigationBarLayout(
currentIndex: currentIndex,
body: child,
currentIndex: currentIndex ?? 0,
);
}
abstract class BottomNavigationBarLayoutCrudListConsumerScreen<
Cubit extends bloc_base.Cubit<CrudState>,
T> extends CrudListCubitConsumerScreen<Cubit, T> {
final String? title;
final int? currentIndex;
const BottomNavigationBarLayoutCrudListConsumerScreen({
this.title,
this.currentIndex,
});
@override
Widget parent(BuildContext context, Widget child) =>
BottomNavigationBarLayout(
body: child,
currentIndex: currentIndex ?? 0,
);
}
@@ -0,0 +1,43 @@
// 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 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart' as bloc_base;
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
abstract class FrameLayoutCubitScreen<Cubit extends bloc_base.Cubit<State>,
State extends Object> extends CubitScreen<Cubit, State> {
const FrameLayoutCubitScreen({
this.title,
this.leading,
this.actions,
this.currentIndex,
super.key,
});
final int? currentIndex;
final String? title;
final Widget? leading;
final List<Widget>? actions;
@override
Widget parent(BuildContext context, Widget child) => FrameLayout(
title: title,
currentIndex: currentIndex,
body: child,
);
}
@@ -0,0 +1,51 @@
// 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 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart' as bloc_base;
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
abstract class AppBarLayoutCrudCubitScreen<
Cubit extends bloc_base.Cubit<CrudState>,
T extends Object?> extends AppBarLayoutCubitScreen<Cubit, CrudState>
with CrudMixin<Cubit, CrudLoaded<T>> {
const AppBarLayoutCrudCubitScreen({
super.title,
super.leading,
super.actions,
super.key,
});
@override
Widget onBuild(BuildContext context, CrudState state) =>
crudBuilder(context, state);
}
abstract class AppBarLayoutCrudListCubitScreen<
Cubit extends bloc_base.Cubit<CrudState>,
T extends Object?> extends AppBarLayoutCubitScreen<Cubit, CrudState>
with CrudMixin<Cubit, CrudListLoaded<T>> {
const AppBarLayoutCrudListCubitScreen({
super.title,
super.leading,
super.actions,
super.key,
});
@override
Widget onBuild(BuildContext context, CrudState state) =>
crudBuilder(context, state);
}
@@ -0,0 +1,47 @@
// 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 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart' as bloc_base;
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
abstract class BottomBarLayoutCrudCubitScreen<
Cubit extends bloc_base.Cubit<CrudState>,
T extends Object?> extends BottomBarLayoutCubitScreen<Cubit, CrudState>
with CrudMixin<Cubit, CrudLoaded<T>> {
const BottomBarLayoutCrudCubitScreen({
super.currentIndex,
super.key,
});
@override
Widget onBuild(BuildContext context, CrudState state) =>
crudBuilder(context, state);
}
abstract class BottomBarLayoutCrudListCubitScreen<
Cubit extends bloc_base.Cubit<CrudState>,
T extends Object?> extends BottomBarLayoutCubitScreen<Cubit, CrudState>
with CrudMixin<Cubit, CrudListLoaded<T>> {
const BottomBarLayoutCrudListCubitScreen({
super.currentIndex,
super.key,
});
@override
Widget onBuild(BuildContext context, CrudState state) =>
crudBuilder(context, state);
}
@@ -0,0 +1,20 @@
// 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/>.
export './crud_cubit_screen.dart';
export 'app_bar_layout_crud_cubit_screen.dart';
export 'bottom_bar_layout_crud_cubit_screen.dart';
export 'frame_layout_crud_cubit_screen.dart';
@@ -0,0 +1,39 @@
// 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 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart' as bloc_base;
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
abstract class CrudCubitScreen<Cubit extends bloc_base.Cubit<CrudState>,
T extends Object?> extends CubitScreen<Cubit, CrudState>
with CrudMixin<Cubit, CrudLoaded<T>> {
const CrudCubitScreen({super.key});
@override
Widget onBuild(BuildContext context, CrudState state) =>
crudBuilder(context, state);
}
abstract class CrudListCubitScreen<Cubit extends bloc_base.Cubit<CrudState>,
T extends Object?> extends CubitScreen<Cubit, CrudState>
with CrudMixin<Cubit, CrudListLoaded<T>> {
const CrudListCubitScreen({super.key});
@override
Widget onBuild(BuildContext context, CrudState state) =>
crudBuilder(context, state);
}
@@ -0,0 +1,53 @@
// 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 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart' as bloc_base;
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
abstract class FrameLayoutCrudCubitScreen<
Cubit extends bloc_base.Cubit<CrudState>,
T extends Object?> extends FrameLayoutCubitScreen<Cubit, CrudState>
with CrudMixin<Cubit, CrudLoaded<T>> {
const FrameLayoutCrudCubitScreen({
super.title,
super.leading,
super.actions,
super.currentIndex,
super.key,
});
@override
Widget onBuild(BuildContext context, CrudState state) =>
crudBuilder(context, state);
}
abstract class FrameLayoutCrudListCubitScreen<
Cubit extends bloc_base.Cubit<CrudState>,
T extends Object?> extends FrameLayoutCubitScreen<Cubit, CrudState>
with CrudMixin<Cubit, CrudListLoaded<T>> {
const FrameLayoutCrudListCubitScreen({
super.title,
super.leading,
super.actions,
super.currentIndex,
super.key,
});
@override
Widget onBuild(BuildContext context, CrudState state) =>
crudBuilder(context, state);
}
@@ -0,0 +1,18 @@
// 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/>.
export './bases/bases.dart';
export './crud/crud.dart';
+6 -5
View File
@@ -14,10 +14,11 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
export 'presentation/presentation.dart';
export 'package:flutter_bloc/flutter_bloc.dart';
export 'package:wyatt_ui_components/wyatt_wyatt_ui_components.dart';
export 'package:wyatt_crud_bloc/wyatt_crud_bloc.dart';
export 'package:wyatt_ui_layout/wyatt_wyatt_ui_layout.dart';
export 'package:wyatt_bloc_helper/wyatt_bloc_helper.dart';
export 'package:wyatt_crud_bloc/wyatt_crud_bloc.dart';
export 'package:wyatt_ui_components/wyatt_wyatt_ui_components.dart';
export 'package:wyatt_ui_layout/wyatt_wyatt_ui_layout.dart';
export 'core/core.dart';
export 'presentation/presentation.dart';

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