pyflutter-app 0.1.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. pyflutter_app-0.1.1/.gitignore +10 -0
  2. pyflutter_app-0.1.1/.idea/.gitignore +3 -0
  3. pyflutter_app-0.1.1/.idea/inspectionProfiles/Project_Default.xml +30 -0
  4. pyflutter_app-0.1.1/.idea/inspectionProfiles/profiles_settings.xml +6 -0
  5. pyflutter_app-0.1.1/.idea/misc.xml +7 -0
  6. pyflutter_app-0.1.1/.idea/modules.xml +8 -0
  7. pyflutter_app-0.1.1/.idea/pyflutter.iml +14 -0
  8. pyflutter_app-0.1.1/.idea/vcs.xml +6 -0
  9. pyflutter_app-0.1.1/PKG-INFO +104 -0
  10. pyflutter_app-0.1.1/README.md +93 -0
  11. pyflutter_app-0.1.1/claude.py +202 -0
  12. pyflutter_app-0.1.1/converter/__init__.py +0 -0
  13. pyflutter_app-0.1.1/converter/__main__.py +33 -0
  14. pyflutter_app-0.1.1/converter/assets/forms_config.json +57 -0
  15. pyflutter_app-0.1.1/converter/excel/__init__.py +0 -0
  16. pyflutter_app-0.1.1/converter/excel/_page_edit.py +199 -0
  17. pyflutter_app-0.1.1/converter/excel/controller.py +297 -0
  18. pyflutter_app-0.1.1/converter/excel/model.py +14 -0
  19. pyflutter_app-0.1.1/converter/excel/view.py +278 -0
  20. pyflutter_app-0.1.1/converter/lib_toi.py +797 -0
  21. pyflutter_app-0.1.1/converter/page_forms/__init__.py +195 -0
  22. pyflutter_app-0.1.1/converter/page_forms/common.py +81 -0
  23. pyflutter_app-0.1.1/converter/page_forms/config.py +129 -0
  24. pyflutter_app-0.1.1/converter/page_forms/controller_forms.py +186 -0
  25. pyflutter_app-0.1.1/converter/page_forms/model_forms.py +52 -0
  26. pyflutter_app-0.1.1/converter/page_forms/service.py +207 -0
  27. pyflutter_app-0.1.1/converter/table_widget.py +138 -0
  28. pyflutter_app-0.1.1/converter/whatsapp/__init__.py +0 -0
  29. pyflutter_app-0.1.1/converter/whatsapp/model.py +25 -0
  30. pyflutter_app-0.1.1/export_app.sh +66 -0
  31. pyflutter_app-0.1.1/local_build/linux.sh +22 -0
  32. pyflutter_app-0.1.1/local_build/send.sh +16 -0
  33. pyflutter_app-0.1.1/main.py +32 -0
  34. pyflutter_app-0.1.1/pyflutter_ui/__init__.py +25 -0
  35. pyflutter_app-0.1.1/pyflutter_ui/app.py +305 -0
  36. pyflutter_app-0.1.1/pyflutter_ui/core.py +791 -0
  37. pyflutter_app-0.1.1/pyflutter_ui/file_picker.py +268 -0
  38. pyflutter_app-0.1.1/pyflutter_ui/navigator.py +95 -0
  39. pyflutter_app-0.1.1/pyflutter_ui/theme.py +1059 -0
  40. pyflutter_app-0.1.1/pyflutter_ui/widgets.py +1874 -0
  41. pyflutter_app-0.1.1/pyproject.toml +19 -0
  42. pyflutter_app-0.1.1/table_stream/__init__.py +12 -0
  43. pyflutter_app-0.1.1/table_stream/erros.py +102 -0
  44. pyflutter_app-0.1.1/table_stream/hash_map.py +307 -0
  45. pyflutter_app-0.1.1/table_stream/notifier.py +170 -0
  46. pyflutter_app-0.1.1/table_stream/pattner/__init__.py +7 -0
  47. pyflutter_app-0.1.1/table_stream/pattner/adapter.py +40 -0
  48. pyflutter_app-0.1.1/table_stream/pattner/observer.py +279 -0
  49. pyflutter_app-0.1.1/table_stream/sheet/__init__.py +10 -0
  50. pyflutter_app-0.1.1/table_stream/sheet/check_mod.py +9 -0
  51. pyflutter_app-0.1.1/table_stream/sheet/load.py +322 -0
  52. pyflutter_app-0.1.1/table_stream/sheet/options.py +72 -0
  53. pyflutter_app-0.1.1/table_stream/sheet/parse.py +207 -0
  54. pyflutter_app-0.1.1/table_stream/sheet/save.py +146 -0
  55. pyflutter_app-0.1.1/table_stream/state.py +284 -0
  56. pyflutter_app-0.1.1/table_stream/sysfiles.py +530 -0
  57. pyflutter_app-0.1.1/table_stream/thread.py +171 -0
  58. pyflutter_app-0.1.1/table_stream/workbook.py +19 -0
  59. pyflutter_app-0.1.1/theme_demo.py +162 -0
  60. pyflutter_app-0.1.1/uv.lock +634 -0
@@ -0,0 +1,10 @@
1
+ # Python-generated files
2
+ __pycache__/
3
+ *.py[oc]
4
+ build/
5
+ dist/
6
+ wheels/
7
+ *.egg-info
8
+
9
+ # Virtual environments
10
+ .venv
@@ -0,0 +1,3 @@
1
+ # Default ignored files
2
+ /shelf/
3
+ /workspace.xml
@@ -0,0 +1,30 @@
1
+ <component name="InspectionProjectProfileManager">
2
+ <profile version="1.0">
3
+ <option name="myName" value="Project Default" />
4
+ <inspection_tool class="PyCompatibilityInspection" enabled="true" level="WARNING" enabled_by_default="true">
5
+ <option name="ourVersions">
6
+ <value>
7
+ <list size="2">
8
+ <item index="0" class="java.lang.String" itemvalue="3.13" />
9
+ <item index="1" class="java.lang.String" itemvalue="3.14" />
10
+ </list>
11
+ </value>
12
+ </option>
13
+ </inspection_tool>
14
+ <inspection_tool class="PyDefaultArgumentInspection" enabled="false" level="WARNING" enabled_by_default="false" />
15
+ <inspection_tool class="PyPep8Inspection" enabled="true" level="WEAK WARNING" enabled_by_default="true">
16
+ <option name="ignoredErrors">
17
+ <list>
18
+ <option value="E265" />
19
+ </list>
20
+ </option>
21
+ </inspection_tool>
22
+ <inspection_tool class="PyUnresolvedReferencesInspection" enabled="true" level="WARNING" enabled_by_default="true">
23
+ <option name="ignoredIdentifiers">
24
+ <list>
25
+ <option value="backend.serverlib.roteiro.analyze.serverlib" />
26
+ </list>
27
+ </option>
28
+ </inspection_tool>
29
+ </profile>
30
+ </component>
@@ -0,0 +1,6 @@
1
+ <component name="InspectionProjectProfileManager">
2
+ <settings>
3
+ <option name="USE_PROJECT_PROFILE" value="false" />
4
+ <version value="1.0" />
5
+ </settings>
6
+ </component>
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="Black">
4
+ <option name="sdkName" value="uv (pyflutter)" />
5
+ </component>
6
+ <component name="ProjectRootManager" version="2" project-jdk-name="uv (pyflutter)" project-jdk-type="Python SDK" />
7
+ </project>
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectModuleManager">
4
+ <modules>
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/pyflutter.iml" filepath="$PROJECT_DIR$/.idea/pyflutter.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
@@ -0,0 +1,14 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="PYTHON_MODULE" version="4">
3
+ <component name="NewModuleRootManager">
4
+ <content url="file://$MODULE_DIR$">
5
+ <excludeFolder url="file://$MODULE_DIR$/.venv" />
6
+ </content>
7
+ <orderEntry type="jdk" jdkName="uv (pyflutter)" jdkType="Python SDK" />
8
+ <orderEntry type="sourceFolder" forTests="false" />
9
+ </component>
10
+ <component name="PyDocumentationSettings">
11
+ <option name="format" value="PLAIN" />
12
+ <option name="myDocStringFormat" value="Plain" />
13
+ </component>
14
+ </module>
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="" vcs="Git" />
5
+ </component>
6
+ </project>
@@ -0,0 +1,104 @@
1
+ Metadata-Version: 2.5
2
+ Name: pyflutter_app
3
+ Version: 0.1.1
4
+ Summary: Bibliotecas Python para conversão de documentos, interface e processamento de tabelas.
5
+ Requires-Python: >=3.14
6
+ Requires-Dist: build>=1.5.0
7
+ Requires-Dist: openpyxl>=3.1.5
8
+ Requires-Dist: pandas>=3.0.0
9
+ Requires-Dist: twine>=7.0.0
10
+ Description-Content-Type: text/markdown
11
+
12
+ # pyflutter
13
+
14
+
15
+
16
+ ## Getting started
17
+
18
+ To make it easy for you to get started with GitLab, here's a list of recommended next steps.
19
+
20
+ Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
21
+
22
+ ## Add your files
23
+
24
+ * [Create](https://docs.gitlab.com/user/project/repository/web_editor/#create-a-file) or [upload](https://docs.gitlab.com/user/project/repository/web_editor/#upload-a-file) files
25
+ * [Add files using the command line](https://docs.gitlab.com/topics/git/add_files/#add-files-to-a-git-repository) or push an existing Git repository with the following command:
26
+
27
+ ```
28
+ cd existing_repo
29
+ git remote add origin https://gitlab.com/bschaves/pyflutter.git
30
+ git branch -M main
31
+ git push -uf origin main
32
+ ```
33
+
34
+ ## Integrate with your tools
35
+
36
+ * [Set up project integrations](https://gitlab.com/bschaves/pyflutter/-/settings/integrations)
37
+
38
+ ## Collaborate with your team
39
+
40
+ * [Invite team members and collaborators](https://docs.gitlab.com/user/project/members/)
41
+ * [Create a new merge request](https://docs.gitlab.com/user/project/merge_requests/creating_merge_requests/)
42
+ * [Automatically close issues from merge requests](https://docs.gitlab.com/user/project/issues/managing_issues/#closing-issues-automatically)
43
+ * [Enable merge request approvals](https://docs.gitlab.com/user/project/merge_requests/approvals/)
44
+ * [Set auto-merge](https://docs.gitlab.com/user/project/merge_requests/auto_merge/)
45
+
46
+ ## Test and Deploy
47
+
48
+ Use the built-in continuous integration in GitLab.
49
+
50
+ * [Get started with GitLab CI/CD](https://docs.gitlab.com/ci/quick_start/)
51
+ * [Analyze your code for known vulnerabilities with Static Application Security Testing (SAST)](https://docs.gitlab.com/user/application_security/sast/)
52
+ * [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/topics/autodevops/requirements/)
53
+ * [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/user/clusters/agent/)
54
+ * [Set up protected environments](https://docs.gitlab.com/ci/environments/protected_environments/)
55
+
56
+ ***
57
+
58
+ # Editing this README
59
+
60
+ When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thanks to [makeareadme.com](https://www.makeareadme.com/) for this template.
61
+
62
+ ## Suggestions for a good README
63
+
64
+ Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
65
+
66
+ ## Name
67
+ Choose a self-explaining name for your project.
68
+
69
+ ## Description
70
+ Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
71
+
72
+ ## Badges
73
+ On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
74
+
75
+ ## Visuals
76
+ Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
77
+
78
+ ## Installation
79
+ Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
80
+
81
+ ## Usage
82
+ Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
83
+
84
+ ## Support
85
+ Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
86
+
87
+ ## Roadmap
88
+ If you have ideas for releases in the future, it is a good idea to list them in the README.
89
+
90
+ ## Contributing
91
+ State if you are open to contributions and what your requirements are for accepting them.
92
+
93
+ For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
94
+
95
+ You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
96
+
97
+ ## Authors and acknowledgment
98
+ Show your appreciation to those who have contributed to the project.
99
+
100
+ ## License
101
+ For open source projects, say how it is licensed.
102
+
103
+ ## Project status
104
+ If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
@@ -0,0 +1,93 @@
1
+ # pyflutter
2
+
3
+
4
+
5
+ ## Getting started
6
+
7
+ To make it easy for you to get started with GitLab, here's a list of recommended next steps.
8
+
9
+ Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
10
+
11
+ ## Add your files
12
+
13
+ * [Create](https://docs.gitlab.com/user/project/repository/web_editor/#create-a-file) or [upload](https://docs.gitlab.com/user/project/repository/web_editor/#upload-a-file) files
14
+ * [Add files using the command line](https://docs.gitlab.com/topics/git/add_files/#add-files-to-a-git-repository) or push an existing Git repository with the following command:
15
+
16
+ ```
17
+ cd existing_repo
18
+ git remote add origin https://gitlab.com/bschaves/pyflutter.git
19
+ git branch -M main
20
+ git push -uf origin main
21
+ ```
22
+
23
+ ## Integrate with your tools
24
+
25
+ * [Set up project integrations](https://gitlab.com/bschaves/pyflutter/-/settings/integrations)
26
+
27
+ ## Collaborate with your team
28
+
29
+ * [Invite team members and collaborators](https://docs.gitlab.com/user/project/members/)
30
+ * [Create a new merge request](https://docs.gitlab.com/user/project/merge_requests/creating_merge_requests/)
31
+ * [Automatically close issues from merge requests](https://docs.gitlab.com/user/project/issues/managing_issues/#closing-issues-automatically)
32
+ * [Enable merge request approvals](https://docs.gitlab.com/user/project/merge_requests/approvals/)
33
+ * [Set auto-merge](https://docs.gitlab.com/user/project/merge_requests/auto_merge/)
34
+
35
+ ## Test and Deploy
36
+
37
+ Use the built-in continuous integration in GitLab.
38
+
39
+ * [Get started with GitLab CI/CD](https://docs.gitlab.com/ci/quick_start/)
40
+ * [Analyze your code for known vulnerabilities with Static Application Security Testing (SAST)](https://docs.gitlab.com/user/application_security/sast/)
41
+ * [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/topics/autodevops/requirements/)
42
+ * [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/user/clusters/agent/)
43
+ * [Set up protected environments](https://docs.gitlab.com/ci/environments/protected_environments/)
44
+
45
+ ***
46
+
47
+ # Editing this README
48
+
49
+ When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thanks to [makeareadme.com](https://www.makeareadme.com/) for this template.
50
+
51
+ ## Suggestions for a good README
52
+
53
+ Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
54
+
55
+ ## Name
56
+ Choose a self-explaining name for your project.
57
+
58
+ ## Description
59
+ Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
60
+
61
+ ## Badges
62
+ On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
63
+
64
+ ## Visuals
65
+ Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
66
+
67
+ ## Installation
68
+ Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
69
+
70
+ ## Usage
71
+ Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
72
+
73
+ ## Support
74
+ Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
75
+
76
+ ## Roadmap
77
+ If you have ideas for releases in the future, it is a good idea to list them in the README.
78
+
79
+ ## Contributing
80
+ State if you are open to contributions and what your requirements are for accepting them.
81
+
82
+ For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
83
+
84
+ You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
85
+
86
+ ## Authors and acknowledgment
87
+ Show your appreciation to those who have contributed to the project.
88
+
89
+ ## License
90
+ For open source projects, say how it is licensed.
91
+
92
+ ## Project status
93
+ If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
@@ -0,0 +1,202 @@
1
+ """
2
+ counter_app.py — App de contador no estilo Flutter
3
+ Demonstra: ChangeNotifier, Consumer, Provider, StatelessWidget
4
+ """
5
+
6
+ import sys
7
+ import os
8
+
9
+ # Adiciona o diretório do pyflutter ao path (ajuste se necessário)
10
+ # sys.path.insert(0, "/caminho/para/pyflutter")
11
+
12
+ from pyflutter_ui.core import (
13
+ ChangeNotifier,
14
+ BuildContext,
15
+ FlutterWidget,
16
+ StatelessElement,
17
+ StatelessWidget,
18
+ Element,
19
+ Provider,
20
+ Consumer,
21
+ inflate_widget,
22
+ )
23
+ from pyflutter_ui.widgets import (
24
+ TkMaterialApp,
25
+ Scaffold,
26
+ AppBar,
27
+ Text,
28
+ Column,
29
+ Row,
30
+ Center,
31
+ Padding,
32
+ SizedBox,
33
+ MainAxisAlignment,
34
+ CrossAxisAlignment,
35
+ ElevatedButton,
36
+ FloatingActionButton,
37
+ Expanded,
38
+ )
39
+
40
+
41
+ # ============================================================
42
+ # MODEL — CounterModel (ChangeNotifier)
43
+ # ============================================================
44
+
45
+ class CounterModel(ChangeNotifier):
46
+ """
47
+ Estado global do contador.
48
+ Qualquer Consumer que observe este model
49
+ será reconstruído ao chamar notify_listeners().
50
+ """
51
+
52
+ def __init__(self) -> None:
53
+ super().__init__()
54
+ self._count: int = 0
55
+
56
+ @property
57
+ def count(self) -> int:
58
+ return self._count
59
+
60
+ def increment(self) -> None:
61
+ self._count += 1
62
+ self.notify_listeners()
63
+
64
+ def decrement(self) -> None:
65
+ if self._count > 0:
66
+ self._count -= 1
67
+ self.notify_listeners()
68
+
69
+ def reset(self) -> None:
70
+ self._count = 0
71
+ self.notify_listeners()
72
+
73
+
74
+ # ============================================================
75
+ # WIDGETS DA UI
76
+ # ============================================================
77
+
78
+ class CounterDisplay(StatelessWidget):
79
+ """
80
+ Exibe o valor atual do contador.
81
+ Reconstruído automaticamente via Consumer.
82
+ """
83
+
84
+ def __init__(self, count: int) -> None:
85
+ super().__init__()
86
+ self.count = count
87
+
88
+ def build(self, context: BuildContext) -> FlutterWidget:
89
+ return Column(
90
+ children=[
91
+ Text("Você pressionou o botão"),
92
+ Text("esta quantidade de vezes:"),
93
+ SizedBox(height=12),
94
+ Text(str(self.count)),
95
+ ],
96
+ main_axis_alignment=MainAxisAlignment.CENTER,
97
+ cross_axis_alignment=CrossAxisAlignment.CENTER,
98
+ )
99
+
100
+ def create_element(self) -> Element:
101
+ return self.build(None).create_element()
102
+
103
+
104
+ class CounterButtons(StatelessWidget):
105
+ """
106
+ Linha de botões: decrementar, resetar, incrementar.
107
+ Acessa o CounterModel via context.read().
108
+ """
109
+
110
+ def __init__(self, key: str | None = None) -> None:
111
+ super().__init__(key)
112
+
113
+ def build(self, context: BuildContext) -> FlutterWidget:
114
+ model: CounterModel = context.read(CounterModel)
115
+
116
+ return Row(
117
+ children=[
118
+ ElevatedButton(
119
+ text="-",
120
+ on_pressed=model.decrement,
121
+ ),
122
+ SizedBox(width=12),
123
+ ElevatedButton(
124
+ text="Reset",
125
+ on_pressed=model.reset,
126
+ ),
127
+ SizedBox(width=12),
128
+ ElevatedButton(
129
+ text="+",
130
+ on_pressed=model.increment,
131
+ ),
132
+ ],
133
+ main_axis_alignment=MainAxisAlignment.CENTER,
134
+ cross_axis_alignment=CrossAxisAlignment.CENTER,
135
+ )
136
+
137
+
138
+
139
+ class CounterPage(StatelessWidget):
140
+ """
141
+ Página principal — monta a estrutura do Scaffold
142
+ e injeta o Consumer que observa o CounterModel.
143
+ """
144
+
145
+ def __init__(self, key: str | None = None) -> None:
146
+ super().__init__(key)
147
+
148
+ def build(self, context: BuildContext) -> FlutterWidget:
149
+
150
+ counter_consumer = Consumer(
151
+ provider_type=CounterModel,
152
+ builder=lambda ctx, model: Column(
153
+ children=[
154
+ Expanded(
155
+ child=Center(
156
+ child=Padding(
157
+ padding=16,
158
+ child=CounterDisplay(count=model.count),
159
+ )
160
+ )
161
+ ),
162
+ Padding(
163
+ padding=16,
164
+ child=CounterButtons(),
165
+ ),
166
+ SizedBox(height=8),
167
+ ],
168
+ main_axis_alignment=MainAxisAlignment.START,
169
+ cross_axis_alignment=CrossAxisAlignment.CENTER,
170
+ ),
171
+ )
172
+
173
+ return Scaffold(
174
+ app_bar=AppBar(title="Flutter Counter — pyflutter"),
175
+ body=counter_consumer,
176
+ floating_action_button=FloatingActionButton(
177
+ text="+",
178
+ on_pressed=lambda: context.read(CounterModel).increment(),
179
+ ),
180
+ )
181
+
182
+
183
+
184
+ # ============================================================
185
+ # ENTRY POINT
186
+ # ============================================================
187
+
188
+ def main() -> None:
189
+ app = TkMaterialApp(
190
+ home=CounterPage(),
191
+ title="Flutter Counter — pyflutter",
192
+ )
193
+
194
+ # Registra o CounterModel como provider global
195
+ app.register_notifier(CounterModel())
196
+
197
+ app.run()
198
+
199
+
200
+ if __name__ == "__main__":
201
+ main()
202
+
File without changes
@@ -0,0 +1,33 @@
1
+ from pyflutter_ui import (
2
+ Provider, TkMaterialApp, run_app
3
+ )
4
+ from converter.excel.view import HomePage
5
+ from converter.excel.controller import ControllerHomePage
6
+ from converter.excel.model import ExcelModel
7
+
8
+ from converter.page_forms import ControllerForms
9
+ from converter.page_forms.model_forms import ModelForms
10
+ import pandas as pd
11
+
12
+
13
+ def main() -> None:
14
+ model = ExcelModel()
15
+ model_forms = ModelForms()
16
+
17
+ controller_excel = ControllerHomePage(model)
18
+ controller_forms = ControllerForms(model_forms)
19
+
20
+ app = TkMaterialApp(home=HomePage())
21
+ #app.register_notifier(controller)
22
+ Provider.add_state(controller_excel)
23
+ Provider.add_state(controller_excel.data_columns)
24
+ Provider.add_state(controller_forms)
25
+
26
+ app.set_width(760)
27
+ app.set_height(480)
28
+ run_app(app)
29
+
30
+
31
+ if __name__ == '__main__':
32
+ main()
33
+
@@ -0,0 +1,57 @@
1
+ {
2
+ "form_url": "https://forms.office.com/pages/responsepage.aspx?id=hoDG-Fy5y0mdOO03lAq-9Q3te9L0aHxBnNMUUIYjxH9UMVFGS0ozVEVKVU84RlBDNTJXVlQ1UUZZRy4u",
3
+ "success_text": "Sua resposta foi enviada",
4
+ "wait_after_submit_ms": 2500,
5
+ "fields": [
6
+ {
7
+ "name": "uc",
8
+ "question_text": "uc",
9
+ "field_type": "text",
10
+ "column": null,
11
+ "options": [],
12
+ "multiple_files": false,
13
+ "date_format": "%d/%m/%Y",
14
+ "required": true
15
+ },
16
+ {
17
+ "name": "toi",
18
+ "question_text": "toi",
19
+ "field_type": "text",
20
+ "column": null,
21
+ "options": [],
22
+ "multiple_files": false,
23
+ "date_format": "%d/%m/%Y",
24
+ "required": true
25
+ },
26
+ {
27
+ "name": "local",
28
+ "question_text": "local de entrega",
29
+ "field_type": "radio",
30
+ "column": null,
31
+ "options": ["em mãos", "caixa de correios", "outro"],
32
+ "multiple_files": false,
33
+ "date_format": "%d/%m/%Y",
34
+ "required": true
35
+ },
36
+ {
37
+ "name": "tipo",
38
+ "question_text": "tipo de documento",
39
+ "field_type": "dropdown",
40
+ "column": null,
41
+ "options": ["carta calculo fatura", "via toi", "cumprimento sentença"],
42
+ "multiple_files": false,
43
+ "date_format": "%d/%m/%Y",
44
+ "required": true
45
+ },
46
+ {
47
+ "name": "data",
48
+ "question_text": "data",
49
+ "field_type": "date",
50
+ "column": null,
51
+ "options": [],
52
+ "multiple_files": false,
53
+ "date_format": "%d/%m/%Y",
54
+ "required": true
55
+ }
56
+ ]
57
+ }
File without changes