Compare commits
23 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
7660adc12c | |
|
|
27a2ec266e | |
|
|
4ffc1adf42 | |
|
|
52d86b3bd3 | |
|
|
50c7144fca | |
|
|
26b3c9a244 | |
|
|
d96ce5a571 | |
|
|
d48614191d | |
|
|
5e1d40c94c | |
|
|
a233de7547 | |
|
|
c25fa1db79 | |
|
|
b6b6f3426f | |
|
|
bd9285b831 | |
|
|
6c78ea8471 | |
|
|
2546c20766 | |
|
|
5a1fc38804 | |
|
|
52ebf16507 | |
|
|
4fa29e6f5d | |
|
|
aadcfb3baa | |
|
|
31dca2b5e5 | |
|
|
417ae1c0c7 | |
|
|
3d3a54c486 | |
|
|
438daea208 |
|
|
@ -7,6 +7,7 @@
|
||||||
"org_name": "com.flet",
|
"org_name": "com.flet",
|
||||||
"company_name": "Your Company",
|
"company_name": "Your Company",
|
||||||
"copyright": "Copyright (c) 2023 Your Company",
|
"copyright": "Copyright (c) 2023 Your Company",
|
||||||
|
"flutter": null,
|
||||||
"sep": "/",
|
"sep": "/",
|
||||||
"kotlin_dir": "{{ cookiecutter.org_name.replace('.', cookiecutter.sep) }}{{ cookiecutter.sep }}{{ cookiecutter.project_name }}{{ cookiecutter.sep }}",
|
"kotlin_dir": "{{ cookiecutter.org_name.replace('.', cookiecutter.sep) }}{{ cookiecutter.sep }}{{ cookiecutter.project_name }}{{ cookiecutter.sep }}",
|
||||||
"hide_loading_animation": true,
|
"hide_loading_animation": true,
|
||||||
|
|
|
||||||
|
|
@ -41,11 +41,8 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
|
||||||
applicationId "{{ cookiecutter.org_name }}.{{ cookiecutter.project_name }}"
|
applicationId "{{ cookiecutter.org_name }}.{{ cookiecutter.project_name }}"
|
||||||
// You can update the following values to match your application needs.
|
minSdkVersion 21
|
||||||
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
|
|
||||||
minSdkVersion flutter.minSdkVersion
|
|
||||||
targetSdkVersion flutter.targetSdkVersion
|
targetSdkVersion flutter.targetSdkVersion
|
||||||
versionCode flutterVersionCode.toInteger()
|
versionCode flutterVersionCode.toInteger()
|
||||||
versionName flutterVersionName
|
versionName flutterVersionName
|
||||||
|
|
@ -57,8 +54,6 @@ android {
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
// TODO: Add your own signing config for the release build.
|
|
||||||
// Signing with the debug keys for now, so `flutter run --release` works.
|
|
||||||
signingConfig signingConfigs.debug
|
signingConfig signingConfigs.debug
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,5 +3,6 @@
|
||||||
the Flutter tool needs it to communicate with the running application
|
the Flutter tool needs it to communicate with the running application
|
||||||
to allow setting breakpoints, to provide hot reload, etc.
|
to allow setting breakpoints, to provide hot reload, etc.
|
||||||
-->
|
-->
|
||||||
<uses-permission android:name="android.permission.INTERNET"/>
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
|
<uses-permission android:name="android.permission.RECORD_AUDIO" />
|
||||||
</manifest>
|
</manifest>
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<uses-permission android:name="android.permission.INTERNET"/>
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
|
<uses-permission android:name="android.permission.RECORD_AUDIO" />
|
||||||
<application
|
<application
|
||||||
android:label="{{ cookiecutter.project_name }}"
|
android:label="{{ cookiecutter.product_name }}"
|
||||||
android:name="${applicationName}"
|
android:name="${applicationName}"
|
||||||
android:icon="@mipmap/ic_launcher">
|
android:icon="@mipmap/ic_launcher">
|
||||||
<activity
|
<activity
|
||||||
|
|
@ -21,8 +22,8 @@
|
||||||
android:resource="@style/NormalTheme"
|
android:resource="@style/NormalTheme"
|
||||||
/>
|
/>
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN"/>
|
<action android:name="android.intent.action.MAIN" />
|
||||||
<category android:name="android.intent.category.LAUNCHER"/>
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
<!-- Don't delete the meta-data below.
|
<!-- Don't delete the meta-data below.
|
||||||
|
|
|
||||||
|
|
@ -3,5 +3,6 @@
|
||||||
the Flutter tool needs it to communicate with the running application
|
the Flutter tool needs it to communicate with the running application
|
||||||
to allow setting breakpoints, to provide hot reload, etc.
|
to allow setting breakpoints, to provide hot reload, etc.
|
||||||
-->
|
-->
|
||||||
<uses-permission android:name="android.permission.INTERNET"/>
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
|
<uses-permission android:name="android.permission.RECORD_AUDIO" />
|
||||||
</manifest>
|
</manifest>
|
||||||
|
|
@ -6,7 +6,6 @@ buildscript {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:7.4.2'
|
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,11 +10,20 @@ pluginManagement {
|
||||||
|
|
||||||
includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")
|
includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
google()
|
||||||
|
mavenCentral()
|
||||||
|
gradlePluginPortal()
|
||||||
|
}
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id "dev.flutter.flutter-gradle-plugin" version "1.0.0" apply false
|
id "dev.flutter.flutter-gradle-plugin" version "1.0.0" apply false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
include ":app"
|
plugins {
|
||||||
|
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
|
||||||
|
id "com.android.application" version "7.3.0" apply false
|
||||||
|
}
|
||||||
|
|
||||||
apply from: "${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle/app_plugin_loader.gradle"
|
include ":app"
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
<key>CFBundleDevelopmentRegion</key>
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||||
<key>CFBundleDisplayName</key>
|
<key>CFBundleDisplayName</key>
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>$(FLUTTER_BUILD_NUMBER)</string>
|
<string>$(FLUTTER_BUILD_NUMBER)</string>
|
||||||
<key>LSRequiresIPhoneOS</key>
|
<key>LSRequiresIPhoneOS</key>
|
||||||
<true/>
|
<true />
|
||||||
<key>UILaunchStoryboardName</key>
|
<key>UILaunchStoryboardName</key>
|
||||||
<string>LaunchScreen</string>
|
<string>LaunchScreen</string>
|
||||||
<key>UIMainStoryboardFile</key>
|
<key>UIMainStoryboardFile</key>
|
||||||
|
|
@ -42,8 +42,15 @@
|
||||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||||
</array>
|
</array>
|
||||||
<key>CADisableMinimumFrameDurationOnPhone</key>
|
<key>CADisableMinimumFrameDurationOnPhone</key>
|
||||||
<true/>
|
<true />
|
||||||
<key>UIApplicationSupportsIndirectInputEvents</key>
|
<key>UIApplicationSupportsIndirectInputEvents</key>
|
||||||
<true/>
|
<true />
|
||||||
</dict>
|
<key>NSAppTransportSecurity</key>
|
||||||
|
<dict>
|
||||||
|
<key>NSAllowsArbitraryLoads</key>
|
||||||
|
<true />
|
||||||
|
</dict>
|
||||||
|
<key>NSMicrophoneUsageDescription</key>
|
||||||
|
<string>Audio Recording</string>
|
||||||
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|
@ -9,6 +9,10 @@ import 'package:path/path.dart' as path;
|
||||||
import 'package:serious_python/serious_python.dart';
|
import 'package:serious_python/serious_python.dart';
|
||||||
import 'package:url_strategy/url_strategy.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 bool isProduction = bool.fromEnvironment('dart.vm.product');
|
||||||
|
|
||||||
const assetPath = "app/app.zip";
|
const assetPath = "app/app.zip";
|
||||||
|
|
@ -19,6 +23,12 @@ final hideLoadingPage =
|
||||||
const outLogFilename = "out.log";
|
const outLogFilename = "out.log";
|
||||||
const errorExitCode = 100;
|
const errorExitCode = 100;
|
||||||
|
|
||||||
|
List<CreateControlFactory> createControlFactories = [
|
||||||
|
{% for dep in cookiecutter.flutter.dependencies %}
|
||||||
|
{{ dep }}.createControl,
|
||||||
|
{% endfor %}
|
||||||
|
];
|
||||||
|
|
||||||
const pythonScript = """
|
const pythonScript = """
|
||||||
import certifi, os, runpy, socket, sys, traceback
|
import certifi, os, runpy, socket, sys, traceback
|
||||||
|
|
||||||
|
|
@ -79,6 +89,10 @@ void main() async {
|
||||||
debugPrint = (String? message, {int? wrapWidth}) => null;
|
debugPrint = (String? message, {int? wrapWidth}) => null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{% for dep in cookiecutter.flutter.dependencies %}
|
||||||
|
{{ dep }}.ensureInitialized();
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
runApp(FutureBuilder(
|
runApp(FutureBuilder(
|
||||||
future: prepareApp(),
|
future: prepareApp(),
|
||||||
builder: (BuildContext context, AsyncSnapshot snapshot) {
|
builder: (BuildContext context, AsyncSnapshot snapshot) {
|
||||||
|
|
@ -89,6 +103,7 @@ void main() async {
|
||||||
pageUrl: pageUrl,
|
pageUrl: pageUrl,
|
||||||
assetsDir: assetsDir,
|
assetsDir: assetsDir,
|
||||||
hideLoadingPage: hideLoadingPage,
|
hideLoadingPage: hideLoadingPage,
|
||||||
|
createControlFactories: createControlFactories
|
||||||
)
|
)
|
||||||
: FutureBuilder(
|
: FutureBuilder(
|
||||||
future: runPythonApp(),
|
future: runPythonApp(),
|
||||||
|
|
@ -107,6 +122,7 @@ void main() async {
|
||||||
pageUrl: pageUrl,
|
pageUrl: pageUrl,
|
||||||
assetsDir: assetsDir,
|
assetsDir: assetsDir,
|
||||||
hideLoadingPage: hideLoadingPage,
|
hideLoadingPage: hideLoadingPage,
|
||||||
|
createControlFactories: createControlFactories
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ dependencies:
|
||||||
# path: src/serious_python
|
# path: src/serious_python
|
||||||
# ref: 'd059aef'
|
# ref: 'd059aef'
|
||||||
|
|
||||||
flet: ^0.19.0
|
flet: ^0.21.0
|
||||||
# flet:
|
# flet:
|
||||||
# git:
|
# git:
|
||||||
# url: https://github.com/flet-dev/flet.git
|
# url: https://github.com/flet-dev/flet.git
|
||||||
|
|
@ -27,7 +27,7 @@ dependencies:
|
||||||
|
|
||||||
path: ^1.8.3
|
path: ^1.8.3
|
||||||
url_strategy: ^0.2.0
|
url_strategy: ^0.2.0
|
||||||
cupertino_icons: ^1.0.2
|
cupertino_icons: ^1.0.6
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
|
|
||||||
|
|
@ -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.pythonModuleName = null;
|
||||||
self.initialized = false;
|
self.initialized = false;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue