Compare commits
14 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
a233de7547 | |
|
|
c25fa1db79 | |
|
|
b6b6f3426f | |
|
|
bd9285b831 | |
|
|
6c78ea8471 | |
|
|
2546c20766 | |
|
|
5a1fc38804 | |
|
|
52ebf16507 | |
|
|
4fa29e6f5d | |
|
|
aadcfb3baa | |
|
|
31dca2b5e5 | |
|
|
417ae1c0c7 | |
|
|
3d3a54c486 | |
|
|
438daea208 |
|
|
@ -7,6 +7,7 @@
|
|||
"org_name": "com.flet",
|
||||
"company_name": "Your Company",
|
||||
"copyright": "Copyright (c) 2023 Your Company",
|
||||
"flutter": null,
|
||||
"sep": "/",
|
||||
"kotlin_dir": "{{ cookiecutter.org_name.replace('.', cookiecutter.sep) }}{{ cookiecutter.sep }}{{ cookiecutter.project_name }}{{ cookiecutter.sep }}",
|
||||
"hide_loading_animation": true,
|
||||
|
|
|
|||
|
|
@ -50,6 +50,8 @@ android {
|
|||
versionCode flutterVersionCode.toInteger()
|
||||
versionName flutterVersionName
|
||||
|
||||
minSdkVersion 21
|
||||
|
||||
ndk {
|
||||
abiFilters 'arm64-v8a', 'armeabi-v7a'
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,4 +4,5 @@
|
|||
to allow setting breakpoints, to provide hot reload, etc.
|
||||
-->
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.RECORD_AUDIO" />
|
||||
</manifest>
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.RECORD_AUDIO" />
|
||||
<application
|
||||
android:label="{{ cookiecutter.project_name }}"
|
||||
android:name="${applicationName}"
|
||||
|
|
|
|||
|
|
@ -4,4 +4,5 @@
|
|||
to allow setting breakpoints, to provide hot reload, etc.
|
||||
-->
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.RECORD_AUDIO" />
|
||||
</manifest>
|
||||
|
|
@ -45,5 +45,12 @@
|
|||
<true />
|
||||
<key>UIApplicationSupportsIndirectInputEvents</key>
|
||||
<true />
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
<true />
|
||||
</dict>
|
||||
<key>NSMicrophoneUsageDescription</key>
|
||||
<string>Audio Recording</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -9,6 +9,10 @@ import 'package:path/path.dart' as path;
|
|||
import 'package:serious_python/serious_python.dart';
|
||||
import 'package:url_strategy/url_strategy.dart';
|
||||
|
||||
{% for dep in cookiecutter.flutter.dependencies %}
|
||||
import 'package:{{ dep }}/{{ dep }}.dart' as {{ dep }};
|
||||
{% endfor %}
|
||||
|
||||
const bool isProduction = bool.fromEnvironment('dart.vm.product');
|
||||
|
||||
const assetPath = "app/app.zip";
|
||||
|
|
@ -19,6 +23,12 @@ final hideLoadingPage =
|
|||
const outLogFilename = "out.log";
|
||||
const errorExitCode = 100;
|
||||
|
||||
List<CreateControlFactory> createControlFactories = [
|
||||
{% for dep in cookiecutter.flutter.dependencies %}
|
||||
{{ dep }}.createControl,
|
||||
{% endfor %}
|
||||
];
|
||||
|
||||
const pythonScript = """
|
||||
import certifi, os, runpy, socket, sys, traceback
|
||||
|
||||
|
|
@ -79,6 +89,10 @@ void main() async {
|
|||
debugPrint = (String? message, {int? wrapWidth}) => null;
|
||||
}
|
||||
|
||||
{% for dep in cookiecutter.flutter.dependencies %}
|
||||
{{ dep }}.ensureInitialized();
|
||||
{% endfor %}
|
||||
|
||||
runApp(FutureBuilder(
|
||||
future: prepareApp(),
|
||||
builder: (BuildContext context, AsyncSnapshot snapshot) {
|
||||
|
|
@ -89,6 +103,7 @@ void main() async {
|
|||
pageUrl: pageUrl,
|
||||
assetsDir: assetsDir,
|
||||
hideLoadingPage: hideLoadingPage,
|
||||
createControlFactories: createControlFactories
|
||||
)
|
||||
: FutureBuilder(
|
||||
future: runPythonApp(),
|
||||
|
|
@ -107,6 +122,7 @@ void main() async {
|
|||
pageUrl: pageUrl,
|
||||
assetsDir: assetsDir,
|
||||
hideLoadingPage: hideLoadingPage,
|
||||
createControlFactories: createControlFactories
|
||||
);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ dependencies:
|
|||
# path: src/serious_python
|
||||
# ref: 'd059aef'
|
||||
|
||||
flet: ^0.19.0
|
||||
flet: ^0.20.0
|
||||
# flet:
|
||||
# git:
|
||||
# url: https://github.com/flet-dev/flet.git
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
importScripts("https://cdn.jsdelivr.net/pyodide/v0.24.1/full/pyodide.js");
|
||||
importScripts("https://cdn.jsdelivr.net/pyodide/v0.25.0/full/pyodide.js");
|
||||
|
||||
self.pythonModuleName = null;
|
||||
self.initialized = false;
|
||||
|
|
|
|||
Loading…
Reference in New Issue