flut 0.0.0a4__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 (154) hide show
  1. flut-0.0.0a4/LICENSE +21 -0
  2. flut-0.0.0a4/MANIFEST.in +3 -0
  3. flut-0.0.0a4/PKG-INFO +125 -0
  4. flut-0.0.0a4/README.md +113 -0
  5. flut-0.0.0a4/flut/.flutter/.gitignore +45 -0
  6. flut-0.0.0a4/flut/.flutter/.metadata +45 -0
  7. flut-0.0.0a4/flut/.flutter/README.md +3 -0
  8. flut-0.0.0a4/flut/.flutter/analysis_options.yaml +1 -0
  9. flut-0.0.0a4/flut/.flutter/android/.gitignore +14 -0
  10. flut-0.0.0a4/flut/.flutter/android/app/build.gradle.kts +44 -0
  11. flut-0.0.0a4/flut/.flutter/android/app/src/debug/AndroidManifest.xml +7 -0
  12. flut-0.0.0a4/flut/.flutter/android/app/src/main/AndroidManifest.xml +45 -0
  13. flut-0.0.0a4/flut/.flutter/android/app/src/main/kotlin/com/example/flut/MainActivity.kt +5 -0
  14. flut-0.0.0a4/flut/.flutter/android/app/src/main/res/drawable/launch_background.xml +12 -0
  15. flut-0.0.0a4/flut/.flutter/android/app/src/main/res/drawable-v21/launch_background.xml +12 -0
  16. flut-0.0.0a4/flut/.flutter/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  17. flut-0.0.0a4/flut/.flutter/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  18. flut-0.0.0a4/flut/.flutter/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  19. flut-0.0.0a4/flut/.flutter/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  20. flut-0.0.0a4/flut/.flutter/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  21. flut-0.0.0a4/flut/.flutter/android/app/src/main/res/values/styles.xml +18 -0
  22. flut-0.0.0a4/flut/.flutter/android/app/src/main/res/values-night/styles.xml +18 -0
  23. flut-0.0.0a4/flut/.flutter/android/app/src/profile/AndroidManifest.xml +7 -0
  24. flut-0.0.0a4/flut/.flutter/android/build.gradle.kts +24 -0
  25. flut-0.0.0a4/flut/.flutter/android/gradle/wrapper/gradle-wrapper.properties +5 -0
  26. flut-0.0.0a4/flut/.flutter/android/gradle.properties +2 -0
  27. flut-0.0.0a4/flut/.flutter/android/settings.gradle.kts +26 -0
  28. flut-0.0.0a4/flut/.flutter/ios/.gitignore +34 -0
  29. flut-0.0.0a4/flut/.flutter/ios/Flutter/AppFrameworkInfo.plist +26 -0
  30. flut-0.0.0a4/flut/.flutter/ios/Flutter/Debug.xcconfig +1 -0
  31. flut-0.0.0a4/flut/.flutter/ios/Flutter/Release.xcconfig +1 -0
  32. flut-0.0.0a4/flut/.flutter/ios/Runner/AppDelegate.swift +13 -0
  33. flut-0.0.0a4/flut/.flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +122 -0
  34. flut-0.0.0a4/flut/.flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png +0 -0
  35. flut-0.0.0a4/flut/.flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png +0 -0
  36. flut-0.0.0a4/flut/.flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png +0 -0
  37. flut-0.0.0a4/flut/.flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png +0 -0
  38. flut-0.0.0a4/flut/.flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png +0 -0
  39. flut-0.0.0a4/flut/.flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png +0 -0
  40. flut-0.0.0a4/flut/.flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png +0 -0
  41. flut-0.0.0a4/flut/.flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png +0 -0
  42. flut-0.0.0a4/flut/.flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png +0 -0
  43. flut-0.0.0a4/flut/.flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png +0 -0
  44. flut-0.0.0a4/flut/.flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png +0 -0
  45. flut-0.0.0a4/flut/.flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png +0 -0
  46. flut-0.0.0a4/flut/.flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png +0 -0
  47. flut-0.0.0a4/flut/.flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png +0 -0
  48. flut-0.0.0a4/flut/.flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png +0 -0
  49. flut-0.0.0a4/flut/.flutter/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +23 -0
  50. flut-0.0.0a4/flut/.flutter/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png +0 -0
  51. flut-0.0.0a4/flut/.flutter/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png +0 -0
  52. flut-0.0.0a4/flut/.flutter/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png +0 -0
  53. flut-0.0.0a4/flut/.flutter/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md +5 -0
  54. flut-0.0.0a4/flut/.flutter/ios/Runner/Base.lproj/LaunchScreen.storyboard +37 -0
  55. flut-0.0.0a4/flut/.flutter/ios/Runner/Base.lproj/Main.storyboard +26 -0
  56. flut-0.0.0a4/flut/.flutter/ios/Runner/Info.plist +49 -0
  57. flut-0.0.0a4/flut/.flutter/ios/Runner/Runner-Bridging-Header.h +1 -0
  58. flut-0.0.0a4/flut/.flutter/ios/Runner.xcodeproj/project.pbxproj +616 -0
  59. flut-0.0.0a4/flut/.flutter/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  60. flut-0.0.0a4/flut/.flutter/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  61. flut-0.0.0a4/flut/.flutter/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +8 -0
  62. flut-0.0.0a4/flut/.flutter/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +101 -0
  63. flut-0.0.0a4/flut/.flutter/ios/Runner.xcworkspace/contents.xcworkspacedata +7 -0
  64. flut-0.0.0a4/flut/.flutter/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  65. flut-0.0.0a4/flut/.flutter/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +8 -0
  66. flut-0.0.0a4/flut/.flutter/ios/RunnerTests/RunnerTests.swift +12 -0
  67. flut-0.0.0a4/flut/.flutter/lib/flut/native.dart +371 -0
  68. flut-0.0.0a4/flut/.flutter/lib/main.dart +1059 -0
  69. flut-0.0.0a4/flut/.flutter/linux/.gitignore +1 -0
  70. flut-0.0.0a4/flut/.flutter/linux/CMakeLists.txt +128 -0
  71. flut-0.0.0a4/flut/.flutter/linux/flutter/CMakeLists.txt +88 -0
  72. flut-0.0.0a4/flut/.flutter/linux/flutter/generated_plugin_registrant.cc +11 -0
  73. flut-0.0.0a4/flut/.flutter/linux/flutter/generated_plugin_registrant.h +15 -0
  74. flut-0.0.0a4/flut/.flutter/linux/flutter/generated_plugins.cmake +23 -0
  75. flut-0.0.0a4/flut/.flutter/linux/runner/CMakeLists.txt +26 -0
  76. flut-0.0.0a4/flut/.flutter/linux/runner/main.cc +6 -0
  77. flut-0.0.0a4/flut/.flutter/linux/runner/my_application.cc +148 -0
  78. flut-0.0.0a4/flut/.flutter/linux/runner/my_application.h +21 -0
  79. flut-0.0.0a4/flut/.flutter/macos/.gitignore +7 -0
  80. flut-0.0.0a4/flut/.flutter/macos/Flutter/Flutter-Debug.xcconfig +1 -0
  81. flut-0.0.0a4/flut/.flutter/macos/Flutter/Flutter-Release.xcconfig +1 -0
  82. flut-0.0.0a4/flut/.flutter/macos/Flutter/GeneratedPluginRegistrant.swift +10 -0
  83. flut-0.0.0a4/flut/.flutter/macos/Runner/AppDelegate.swift +13 -0
  84. flut-0.0.0a4/flut/.flutter/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +68 -0
  85. flut-0.0.0a4/flut/.flutter/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png +0 -0
  86. flut-0.0.0a4/flut/.flutter/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png +0 -0
  87. flut-0.0.0a4/flut/.flutter/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png +0 -0
  88. flut-0.0.0a4/flut/.flutter/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png +0 -0
  89. flut-0.0.0a4/flut/.flutter/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png +0 -0
  90. flut-0.0.0a4/flut/.flutter/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png +0 -0
  91. flut-0.0.0a4/flut/.flutter/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png +0 -0
  92. flut-0.0.0a4/flut/.flutter/macos/Runner/Base.lproj/MainMenu.xib +343 -0
  93. flut-0.0.0a4/flut/.flutter/macos/Runner/Configs/AppInfo.xcconfig +14 -0
  94. flut-0.0.0a4/flut/.flutter/macos/Runner/Configs/Debug.xcconfig +2 -0
  95. flut-0.0.0a4/flut/.flutter/macos/Runner/Configs/Release.xcconfig +2 -0
  96. flut-0.0.0a4/flut/.flutter/macos/Runner/Configs/Warnings.xcconfig +13 -0
  97. flut-0.0.0a4/flut/.flutter/macos/Runner/DebugProfile.entitlements +12 -0
  98. flut-0.0.0a4/flut/.flutter/macos/Runner/Info.plist +32 -0
  99. flut-0.0.0a4/flut/.flutter/macos/Runner/MainFlutterWindow.swift +15 -0
  100. flut-0.0.0a4/flut/.flutter/macos/Runner/Release.entitlements +8 -0
  101. flut-0.0.0a4/flut/.flutter/macos/Runner.xcodeproj/project.pbxproj +705 -0
  102. flut-0.0.0a4/flut/.flutter/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  103. flut-0.0.0a4/flut/.flutter/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +99 -0
  104. flut-0.0.0a4/flut/.flutter/macos/Runner.xcworkspace/contents.xcworkspacedata +7 -0
  105. flut-0.0.0a4/flut/.flutter/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  106. flut-0.0.0a4/flut/.flutter/macos/RunnerTests/RunnerTests.swift +12 -0
  107. flut-0.0.0a4/flut/.flutter/pubspec.lock +213 -0
  108. flut-0.0.0a4/flut/.flutter/pubspec.yaml +20 -0
  109. flut-0.0.0a4/flut/.flutter/web/favicon.png +0 -0
  110. flut-0.0.0a4/flut/.flutter/web/icons/Icon-192.png +0 -0
  111. flut-0.0.0a4/flut/.flutter/web/icons/Icon-512.png +0 -0
  112. flut-0.0.0a4/flut/.flutter/web/icons/Icon-maskable-192.png +0 -0
  113. flut-0.0.0a4/flut/.flutter/web/icons/Icon-maskable-512.png +0 -0
  114. flut-0.0.0a4/flut/.flutter/web/index.html +38 -0
  115. flut-0.0.0a4/flut/.flutter/web/manifest.json +35 -0
  116. flut-0.0.0a4/flut/.flutter/windows/.gitignore +17 -0
  117. flut-0.0.0a4/flut/.flutter/windows/CMakeLists.txt +108 -0
  118. flut-0.0.0a4/flut/.flutter/windows/flutter/CMakeLists.txt +109 -0
  119. flut-0.0.0a4/flut/.flutter/windows/flutter/generated_plugin_registrant.cc +11 -0
  120. flut-0.0.0a4/flut/.flutter/windows/flutter/generated_plugin_registrant.h +15 -0
  121. flut-0.0.0a4/flut/.flutter/windows/flutter/generated_plugins.cmake +23 -0
  122. flut-0.0.0a4/flut/.flutter/windows/runner/CMakeLists.txt +40 -0
  123. flut-0.0.0a4/flut/.flutter/windows/runner/Runner.rc +121 -0
  124. flut-0.0.0a4/flut/.flutter/windows/runner/flutter_window.cpp +71 -0
  125. flut-0.0.0a4/flut/.flutter/windows/runner/flutter_window.h +33 -0
  126. flut-0.0.0a4/flut/.flutter/windows/runner/main.cpp +43 -0
  127. flut-0.0.0a4/flut/.flutter/windows/runner/resource.h +16 -0
  128. flut-0.0.0a4/flut/.flutter/windows/runner/resources/app_icon.ico +0 -0
  129. flut-0.0.0a4/flut/.flutter/windows/runner/runner.exe.manifest +14 -0
  130. flut-0.0.0a4/flut/.flutter/windows/runner/utils.cpp +65 -0
  131. flut-0.0.0a4/flut/.flutter/windows/runner/utils.h +19 -0
  132. flut-0.0.0a4/flut/.flutter/windows/runner/win32_window.cpp +288 -0
  133. flut-0.0.0a4/flut/.flutter/windows/runner/win32_window.h +102 -0
  134. flut-0.0.0a4/flut/__init__.py +1 -0
  135. flut-0.0.0a4/flut/_flut.py +346 -0
  136. flut-0.0.0a4/flut/_flut_linux.py +570 -0
  137. flut-0.0.0a4/flut/_flut_macos.py +876 -0
  138. flut-0.0.0a4/flut/_flut_native.py +49 -0
  139. flut-0.0.0a4/flut/_flut_runtime.py +8 -0
  140. flut-0.0.0a4/flut/_flut_windows.py +987 -0
  141. flut-0.0.0a4/flut/flutter/material.py +203 -0
  142. flut-0.0.0a4/flut/flutter/widgets/__init__.py +61 -0
  143. flut-0.0.0a4/flut/flutter/widgets/basic.py +990 -0
  144. flut-0.0.0a4/flut/flutter/widgets/framework.py +160 -0
  145. flut-0.0.0a4/flut/flutter/widgets/implicit_animations.py +21 -0
  146. flut-0.0.0a4/flut/flutter/widgets/painting.py +63 -0
  147. flut-0.0.0a4/flut.egg-info/PKG-INFO +125 -0
  148. flut-0.0.0a4/flut.egg-info/SOURCES.txt +152 -0
  149. flut-0.0.0a4/flut.egg-info/dependency_links.txt +1 -0
  150. flut-0.0.0a4/flut.egg-info/requires.txt +4 -0
  151. flut-0.0.0a4/flut.egg-info/top_level.txt +1 -0
  152. flut-0.0.0a4/pyproject.toml +19 -0
  153. flut-0.0.0a4/setup.cfg +4 -0
  154. flut-0.0.0a4/setup.py +176 -0
flut-0.0.0a4/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Andrew Yang
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,3 @@
1
+ graft flut/.flutter
2
+ prune flut/.flutter/build
3
+ prune flut/.flutter/.dart_tool
flut-0.0.0a4/PKG-INFO ADDED
@@ -0,0 +1,125 @@
1
+ Metadata-Version: 2.4
2
+ Name: flut
3
+ Version: 0.0.0a4
4
+ Summary: Flutter but Python
5
+ Requires-Python: >=3.8
6
+ Description-Content-Type: text/markdown
7
+ License-File: LICENSE
8
+ Provides-Extra: test
9
+ Requires-Dist: pytest; extra == "test"
10
+ Requires-Dist: pytest-asyncio; extra == "test"
11
+ Dynamic: license-file
12
+
13
+ # Flut
14
+
15
+ Flutter, but in Python
16
+
17
+ ## Status
18
+
19
+ This project is in **Technical Preview**.
20
+ - APIs are subject to change.
21
+ - Not ready for production use.
22
+
23
+ ## Installation
24
+
25
+ ```bash
26
+ pip install flut
27
+ ```
28
+
29
+ That's it! Windows (x64), macOS (x64, arm64), and Linux (x64) have prebuilt wheels.
30
+
31
+ You can build from source as well, you will need the Flutter SDK installed.
32
+
33
+ ## Usage
34
+
35
+ Create a file `app.py`:
36
+
37
+ ```python
38
+ from flut import run_app
39
+ from flut.flutter.widgets import StatelessWidget, StatefulWidget, State, Text, Center, Column, Icon, MainAxisAlignment
40
+ from flut.flutter.material import MaterialApp, Scaffold, AppBar, FloatingActionButton, Icons, ThemeData, ColorScheme, Colors, Theme
41
+
42
+
43
+ class MyApp(StatelessWidget):
44
+ def build(self, context):
45
+ return MaterialApp(
46
+ title="Flut Demo",
47
+ theme=ThemeData(
48
+ colorScheme=ColorScheme.fromSeed(seedColor=Colors.deepPurple),
49
+ ),
50
+ home=MyHomePage(title="Flut Demo Home Page"),
51
+ )
52
+
53
+
54
+ class MyHomePage(StatefulWidget):
55
+ def __init__(self, title):
56
+ super().__init__()
57
+ self.title = title
58
+
59
+ def createState(self):
60
+ return _MyHomePageState()
61
+
62
+
63
+ class _MyHomePageState(State[MyHomePage]):
64
+ def initState(self):
65
+ self._counter = 0
66
+
67
+ def _incrementCounter(self):
68
+ def _update():
69
+ self._counter += 1
70
+
71
+ self.setState(_update)
72
+
73
+ def build(self, context):
74
+ return Scaffold(
75
+ appBar=AppBar(
76
+ title=Text(self.widget.title),
77
+ backgroundColor=Theme.of(context).colorScheme.inversePrimary,
78
+ ),
79
+ body=Center(
80
+ child=Column(
81
+ mainAxisAlignment=MainAxisAlignment.center,
82
+ children=[
83
+ Text("You have pushed the button this many times:"),
84
+ Text(
85
+ f"{self._counter}",
86
+ style=Theme.of(context).textTheme.headlineMedium,
87
+ ),
88
+ ],
89
+ ),
90
+ ),
91
+ floatingActionButton=FloatingActionButton(
92
+ onPressed=self._incrementCounter,
93
+ tooltip="Increment",
94
+ child=Icon(Icons.add),
95
+ ),
96
+ )
97
+
98
+
99
+ if __name__ == "__main__":
100
+ run_app(MyApp())
101
+
102
+ ```
103
+
104
+ Run it:
105
+
106
+ ```bash
107
+ python app.py
108
+ ```
109
+
110
+ For async support:
111
+
112
+ ```python
113
+ import asyncio
114
+ from flut import run_app_async
115
+
116
+ # ... your app code ...
117
+
118
+ if __name__ == "__main__":
119
+ asyncio.run(run_app_async(MyApp()))
120
+ ```
121
+
122
+
123
+ ## License
124
+
125
+ MIT
flut-0.0.0a4/README.md ADDED
@@ -0,0 +1,113 @@
1
+ # Flut
2
+
3
+ Flutter, but in Python
4
+
5
+ ## Status
6
+
7
+ This project is in **Technical Preview**.
8
+ - APIs are subject to change.
9
+ - Not ready for production use.
10
+
11
+ ## Installation
12
+
13
+ ```bash
14
+ pip install flut
15
+ ```
16
+
17
+ That's it! Windows (x64), macOS (x64, arm64), and Linux (x64) have prebuilt wheels.
18
+
19
+ You can build from source as well, you will need the Flutter SDK installed.
20
+
21
+ ## Usage
22
+
23
+ Create a file `app.py`:
24
+
25
+ ```python
26
+ from flut import run_app
27
+ from flut.flutter.widgets import StatelessWidget, StatefulWidget, State, Text, Center, Column, Icon, MainAxisAlignment
28
+ from flut.flutter.material import MaterialApp, Scaffold, AppBar, FloatingActionButton, Icons, ThemeData, ColorScheme, Colors, Theme
29
+
30
+
31
+ class MyApp(StatelessWidget):
32
+ def build(self, context):
33
+ return MaterialApp(
34
+ title="Flut Demo",
35
+ theme=ThemeData(
36
+ colorScheme=ColorScheme.fromSeed(seedColor=Colors.deepPurple),
37
+ ),
38
+ home=MyHomePage(title="Flut Demo Home Page"),
39
+ )
40
+
41
+
42
+ class MyHomePage(StatefulWidget):
43
+ def __init__(self, title):
44
+ super().__init__()
45
+ self.title = title
46
+
47
+ def createState(self):
48
+ return _MyHomePageState()
49
+
50
+
51
+ class _MyHomePageState(State[MyHomePage]):
52
+ def initState(self):
53
+ self._counter = 0
54
+
55
+ def _incrementCounter(self):
56
+ def _update():
57
+ self._counter += 1
58
+
59
+ self.setState(_update)
60
+
61
+ def build(self, context):
62
+ return Scaffold(
63
+ appBar=AppBar(
64
+ title=Text(self.widget.title),
65
+ backgroundColor=Theme.of(context).colorScheme.inversePrimary,
66
+ ),
67
+ body=Center(
68
+ child=Column(
69
+ mainAxisAlignment=MainAxisAlignment.center,
70
+ children=[
71
+ Text("You have pushed the button this many times:"),
72
+ Text(
73
+ f"{self._counter}",
74
+ style=Theme.of(context).textTheme.headlineMedium,
75
+ ),
76
+ ],
77
+ ),
78
+ ),
79
+ floatingActionButton=FloatingActionButton(
80
+ onPressed=self._incrementCounter,
81
+ tooltip="Increment",
82
+ child=Icon(Icons.add),
83
+ ),
84
+ )
85
+
86
+
87
+ if __name__ == "__main__":
88
+ run_app(MyApp())
89
+
90
+ ```
91
+
92
+ Run it:
93
+
94
+ ```bash
95
+ python app.py
96
+ ```
97
+
98
+ For async support:
99
+
100
+ ```python
101
+ import asyncio
102
+ from flut import run_app_async
103
+
104
+ # ... your app code ...
105
+
106
+ if __name__ == "__main__":
107
+ asyncio.run(run_app_async(MyApp()))
108
+ ```
109
+
110
+
111
+ ## License
112
+
113
+ MIT
@@ -0,0 +1,45 @@
1
+ # Miscellaneous
2
+ *.class
3
+ *.log
4
+ *.pyc
5
+ *.swp
6
+ .DS_Store
7
+ .atom/
8
+ .build/
9
+ .buildlog/
10
+ .history
11
+ .svn/
12
+ .swiftpm/
13
+ migrate_working_dir/
14
+
15
+ # IntelliJ related
16
+ *.iml
17
+ *.ipr
18
+ *.iws
19
+ .idea/
20
+
21
+ # The .vscode folder contains launch configuration and tasks you configure in
22
+ # VS Code which you may wish to be included in version control, so this line
23
+ # is commented out by default.
24
+ #.vscode/
25
+
26
+ # Flutter/Dart/Pub related
27
+ **/doc/api/
28
+ **/ios/Flutter/.last_build_id
29
+ .dart_tool/
30
+ .flutter-plugins-dependencies
31
+ .pub-cache/
32
+ .pub/
33
+ /build/
34
+ /coverage/
35
+
36
+ # Symbolication related
37
+ app.*.symbols
38
+
39
+ # Obfuscation related
40
+ app.*.map.json
41
+
42
+ # Android Studio will place build artifacts here
43
+ /android/app/debug
44
+ /android/app/profile
45
+ /android/app/release
@@ -0,0 +1,45 @@
1
+ # This file tracks properties of this Flutter project.
2
+ # Used by Flutter tool to assess capabilities and perform upgrades etc.
3
+ #
4
+ # This file should be version controlled and should not be manually edited.
5
+
6
+ version:
7
+ revision: "66dd93f9a27ffe2a9bfc8297506ce066ff51265f"
8
+ channel: "stable"
9
+
10
+ project_type: app
11
+
12
+ # Tracks metadata for the flutter migrate command
13
+ migration:
14
+ platforms:
15
+ - platform: root
16
+ create_revision: 66dd93f9a27ffe2a9bfc8297506ce066ff51265f
17
+ base_revision: 66dd93f9a27ffe2a9bfc8297506ce066ff51265f
18
+ - platform: android
19
+ create_revision: 66dd93f9a27ffe2a9bfc8297506ce066ff51265f
20
+ base_revision: 66dd93f9a27ffe2a9bfc8297506ce066ff51265f
21
+ - platform: ios
22
+ create_revision: 66dd93f9a27ffe2a9bfc8297506ce066ff51265f
23
+ base_revision: 66dd93f9a27ffe2a9bfc8297506ce066ff51265f
24
+ - platform: linux
25
+ create_revision: 66dd93f9a27ffe2a9bfc8297506ce066ff51265f
26
+ base_revision: 66dd93f9a27ffe2a9bfc8297506ce066ff51265f
27
+ - platform: macos
28
+ create_revision: 66dd93f9a27ffe2a9bfc8297506ce066ff51265f
29
+ base_revision: 66dd93f9a27ffe2a9bfc8297506ce066ff51265f
30
+ - platform: web
31
+ create_revision: 66dd93f9a27ffe2a9bfc8297506ce066ff51265f
32
+ base_revision: 66dd93f9a27ffe2a9bfc8297506ce066ff51265f
33
+ - platform: windows
34
+ create_revision: 66dd93f9a27ffe2a9bfc8297506ce066ff51265f
35
+ base_revision: 66dd93f9a27ffe2a9bfc8297506ce066ff51265f
36
+
37
+ # User provided section
38
+
39
+ # List of Local paths (relative to this file) that should be
40
+ # ignored by the migrate tool.
41
+ #
42
+ # Files that are not part of the templates will be ignored by default.
43
+ unmanaged_files:
44
+ - 'lib/main.dart'
45
+ - 'ios/Runner.xcodeproj/project.pbxproj'
@@ -0,0 +1,3 @@
1
+ # flut
2
+
3
+ A new Flutter project.
@@ -0,0 +1 @@
1
+ include: package:flutter_lints/flutter.yaml
@@ -0,0 +1,14 @@
1
+ gradle-wrapper.jar
2
+ /.gradle
3
+ /captures/
4
+ /gradlew
5
+ /gradlew.bat
6
+ /local.properties
7
+ GeneratedPluginRegistrant.java
8
+ .cxx/
9
+
10
+ # Remember to never publicly share your keystore.
11
+ # See https://flutter.dev/to/reference-keystore
12
+ key.properties
13
+ **/*.keystore
14
+ **/*.jks
@@ -0,0 +1,44 @@
1
+ plugins {
2
+ id("com.android.application")
3
+ id("kotlin-android")
4
+ // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
5
+ id("dev.flutter.flutter-gradle-plugin")
6
+ }
7
+
8
+ android {
9
+ namespace = "com.example.flut"
10
+ compileSdk = flutter.compileSdkVersion
11
+ ndkVersion = flutter.ndkVersion
12
+
13
+ compileOptions {
14
+ sourceCompatibility = JavaVersion.VERSION_17
15
+ targetCompatibility = JavaVersion.VERSION_17
16
+ }
17
+
18
+ kotlinOptions {
19
+ jvmTarget = JavaVersion.VERSION_17.toString()
20
+ }
21
+
22
+ defaultConfig {
23
+ // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
24
+ applicationId = "com.example.flut"
25
+ // You can update the following values to match your application needs.
26
+ // For more information, see: https://flutter.dev/to/review-gradle-config.
27
+ minSdk = flutter.minSdkVersion
28
+ targetSdk = flutter.targetSdkVersion
29
+ versionCode = flutter.versionCode
30
+ versionName = flutter.versionName
31
+ }
32
+
33
+ buildTypes {
34
+ release {
35
+ // TODO: Add your own signing config for the release build.
36
+ // Signing with the debug keys for now, so `flutter run --release` works.
37
+ signingConfig = signingConfigs.getByName("debug")
38
+ }
39
+ }
40
+ }
41
+
42
+ flutter {
43
+ source = "../.."
44
+ }
@@ -0,0 +1,7 @@
1
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android">
2
+ <!-- The INTERNET permission is required for development. Specifically,
3
+ the Flutter tool needs it to communicate with the running application
4
+ to allow setting breakpoints, to provide hot reload, etc.
5
+ -->
6
+ <uses-permission android:name="android.permission.INTERNET"/>
7
+ </manifest>
@@ -0,0 +1,45 @@
1
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android">
2
+ <application
3
+ android:label="flut"
4
+ android:name="${applicationName}"
5
+ android:icon="@mipmap/ic_launcher">
6
+ <activity
7
+ android:name=".MainActivity"
8
+ android:exported="true"
9
+ android:launchMode="singleTop"
10
+ android:taskAffinity=""
11
+ android:theme="@style/LaunchTheme"
12
+ android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
13
+ android:hardwareAccelerated="true"
14
+ android:windowSoftInputMode="adjustResize">
15
+ <!-- Specifies an Android theme to apply to this Activity as soon as
16
+ the Android process has started. This theme is visible to the user
17
+ while the Flutter UI initializes. After that, this theme continues
18
+ to determine the Window background behind the Flutter UI. -->
19
+ <meta-data
20
+ android:name="io.flutter.embedding.android.NormalTheme"
21
+ android:resource="@style/NormalTheme"
22
+ />
23
+ <intent-filter>
24
+ <action android:name="android.intent.action.MAIN"/>
25
+ <category android:name="android.intent.category.LAUNCHER"/>
26
+ </intent-filter>
27
+ </activity>
28
+ <!-- Don't delete the meta-data below.
29
+ This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
30
+ <meta-data
31
+ android:name="flutterEmbedding"
32
+ android:value="2" />
33
+ </application>
34
+ <!-- Required to query activities that can process text, see:
35
+ https://developer.android.com/training/package-visibility and
36
+ https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
37
+
38
+ In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
39
+ <queries>
40
+ <intent>
41
+ <action android:name="android.intent.action.PROCESS_TEXT"/>
42
+ <data android:mimeType="text/plain"/>
43
+ </intent>
44
+ </queries>
45
+ </manifest>
@@ -0,0 +1,5 @@
1
+ package com.example.flut
2
+
3
+ import io.flutter.embedding.android.FlutterActivity
4
+
5
+ class MainActivity : FlutterActivity()
@@ -0,0 +1,12 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Modify this file to customize your launch splash screen -->
3
+ <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
4
+ <item android:drawable="@android:color/white" />
5
+
6
+ <!-- You can insert your own image assets here -->
7
+ <!-- <item>
8
+ <bitmap
9
+ android:gravity="center"
10
+ android:src="@mipmap/launch_image" />
11
+ </item> -->
12
+ </layer-list>
@@ -0,0 +1,12 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Modify this file to customize your launch splash screen -->
3
+ <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
4
+ <item android:drawable="?android:colorBackground" />
5
+
6
+ <!-- You can insert your own image assets here -->
7
+ <!-- <item>
8
+ <bitmap
9
+ android:gravity="center"
10
+ android:src="@mipmap/launch_image" />
11
+ </item> -->
12
+ </layer-list>
@@ -0,0 +1,18 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <resources>
3
+ <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
4
+ <style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
5
+ <!-- Show a splash screen on the activity. Automatically removed when
6
+ the Flutter engine draws its first frame -->
7
+ <item name="android:windowBackground">@drawable/launch_background</item>
8
+ </style>
9
+ <!-- Theme applied to the Android Window as soon as the process has started.
10
+ This theme determines the color of the Android Window while your
11
+ Flutter UI initializes, as well as behind your Flutter UI while its
12
+ running.
13
+
14
+ This Theme is only used starting with V2 of Flutter's Android embedding. -->
15
+ <style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
16
+ <item name="android:windowBackground">?android:colorBackground</item>
17
+ </style>
18
+ </resources>
@@ -0,0 +1,18 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <resources>
3
+ <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
4
+ <style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
5
+ <!-- Show a splash screen on the activity. Automatically removed when
6
+ the Flutter engine draws its first frame -->
7
+ <item name="android:windowBackground">@drawable/launch_background</item>
8
+ </style>
9
+ <!-- Theme applied to the Android Window as soon as the process has started.
10
+ This theme determines the color of the Android Window while your
11
+ Flutter UI initializes, as well as behind your Flutter UI while its
12
+ running.
13
+
14
+ This Theme is only used starting with V2 of Flutter's Android embedding. -->
15
+ <style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
16
+ <item name="android:windowBackground">?android:colorBackground</item>
17
+ </style>
18
+ </resources>
@@ -0,0 +1,7 @@
1
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android">
2
+ <!-- The INTERNET permission is required for development. Specifically,
3
+ the Flutter tool needs it to communicate with the running application
4
+ to allow setting breakpoints, to provide hot reload, etc.
5
+ -->
6
+ <uses-permission android:name="android.permission.INTERNET"/>
7
+ </manifest>
@@ -0,0 +1,24 @@
1
+ allprojects {
2
+ repositories {
3
+ google()
4
+ mavenCentral()
5
+ }
6
+ }
7
+
8
+ val newBuildDir: Directory =
9
+ rootProject.layout.buildDirectory
10
+ .dir("../../build")
11
+ .get()
12
+ rootProject.layout.buildDirectory.value(newBuildDir)
13
+
14
+ subprojects {
15
+ val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name)
16
+ project.layout.buildDirectory.value(newSubprojectBuildDir)
17
+ }
18
+ subprojects {
19
+ project.evaluationDependsOn(":app")
20
+ }
21
+
22
+ tasks.register<Delete>("clean") {
23
+ delete(rootProject.layout.buildDirectory)
24
+ }
@@ -0,0 +1,5 @@
1
+ distributionBase=GRADLE_USER_HOME
2
+ distributionPath=wrapper/dists
3
+ zipStoreBase=GRADLE_USER_HOME
4
+ zipStorePath=wrapper/dists
5
+ distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-all.zip
@@ -0,0 +1,2 @@
1
+ org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
2
+ android.useAndroidX=true
@@ -0,0 +1,26 @@
1
+ pluginManagement {
2
+ val flutterSdkPath =
3
+ run {
4
+ val properties = java.util.Properties()
5
+ file("local.properties").inputStream().use { properties.load(it) }
6
+ val flutterSdkPath = properties.getProperty("flutter.sdk")
7
+ require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" }
8
+ flutterSdkPath
9
+ }
10
+
11
+ includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
12
+
13
+ repositories {
14
+ google()
15
+ mavenCentral()
16
+ gradlePluginPortal()
17
+ }
18
+ }
19
+
20
+ plugins {
21
+ id("dev.flutter.flutter-plugin-loader") version "1.0.0"
22
+ id("com.android.application") version "8.11.1" apply false
23
+ id("org.jetbrains.kotlin.android") version "2.2.20" apply false
24
+ }
25
+
26
+ include(":app")
@@ -0,0 +1,34 @@
1
+ **/dgph
2
+ *.mode1v3
3
+ *.mode2v3
4
+ *.moved-aside
5
+ *.pbxuser
6
+ *.perspectivev3
7
+ **/*sync/
8
+ .sconsign.dblite
9
+ .tags*
10
+ **/.vagrant/
11
+ **/DerivedData/
12
+ Icon?
13
+ **/Pods/
14
+ **/.symlinks/
15
+ profile
16
+ xcuserdata
17
+ **/.generated/
18
+ Flutter/App.framework
19
+ Flutter/Flutter.framework
20
+ Flutter/Flutter.podspec
21
+ Flutter/Generated.xcconfig
22
+ Flutter/ephemeral/
23
+ Flutter/app.flx
24
+ Flutter/app.zip
25
+ Flutter/flutter_assets/
26
+ Flutter/flutter_export_environment.sh
27
+ ServiceDefinitions.json
28
+ Runner/GeneratedPluginRegistrant.*
29
+
30
+ # Exceptions to above rules.
31
+ !default.mode1v3
32
+ !default.mode2v3
33
+ !default.pbxuser
34
+ !default.perspectivev3