Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
6272a93
Make `cryptography` dependency optional
FeodorFitsner Sep 29, 2022
7021384
Merge branch 'main' into fixes-60
FeodorFitsner Oct 3, 2022
be84992
Setting Flet client build number
FeodorFitsner Oct 4, 2022
fd78ed5
Do not set build-number
FeodorFitsner Oct 4, 2022
529a257
Update Flet macOS icons
FeodorFitsner Oct 4, 2022
9a3293f
Clipboard re-done to support Safari
FeodorFitsner Oct 4, 2022
6164dca
Make crypto utils optional
FeodorFitsner Oct 4, 2022
34fdfa2
Re-enable Python 3.7 as PDM fixed the issue
FeodorFitsner Oct 5, 2022
9c3a60e
Fix #431 - Handling Flutter and platform errors
FeodorFitsner Oct 5, 2022
408069e
Added additional styles to TextField and Dropdown
FeodorFitsner Oct 5, 2022
e804dae
Fix CI
FeodorFitsner Oct 5, 2022
b1a6eac
Add an ability to hide automatic back button in AppBar
FeodorFitsner Oct 5, 2022
a407dc9
Added `SnackBar.action_color`
FeodorFitsner Oct 5, 2022
8d5c6d8
Control TextFields cursor presentation
FeodorFitsner Oct 5, 2022
fcfc57d
Add x and y to DropTarget.on_accept event
FeodorFitsner Oct 5, 2022
2235996
Customize colors of Checkbox and Radio
FeodorFitsner Oct 6, 2022
3d72689
Restore `websocket.defaulttimeout` on connect
FeodorFitsner Oct 6, 2022
ed94a76
`Audio.get_current_position` and `Audio.get_duration` returns `int`
FeodorFitsner Oct 6, 2022
d88d49b
Merge branch 'main' into fixes-60
FeodorFitsner Oct 6, 2022
c4ede90
Update container.dart
FeodorFitsner Oct 6, 2022
c6ed3a0
GestureDetector control started
FeodorFitsner Oct 6, 2022
905e447
`Audio.playback_rate` added
FeodorFitsner Oct 6, 2022
dde7183
All Tap gestures
FeodorFitsner Oct 6, 2022
23389e0
Gesture detector ready but without throttling
FeodorFitsner Oct 7, 2022
9e1cc4c
Merge branch 'main' into fixes-60
FeodorFitsner Oct 7, 2022
69f10ea
Throttling of drag and hover events
FeodorFitsner Oct 8, 2022
4100b3a
Merge branch 'main' into fixes-60
FeodorFitsner Oct 8, 2022
df5a674
Get version from Git repo
FeodorFitsner Oct 8, 2022
111e2dc
Fix gesture handlers
FeodorFitsner Oct 8, 2022
180499c
Added a simple integration test - just for fun
FeodorFitsner Oct 8, 2022
0e066fe
ElevatedButton must show error if only icon specified without text
FeodorFitsner Oct 8, 2022
d0b47a8
Display an error when left, top, right or bottom are used not in Stack
FeodorFitsner Oct 8, 2022
60ffc2d
Shrink wrap ListView and GridView if bounds are unlimited
FeodorFitsner Oct 8, 2022
fc02862
Fix #303 - NavigationRail is not shown in a parent without fixed height
FeodorFitsner Oct 9, 2022
c5c6c87
Do not bind session value to the IP
FeodorFitsner Oct 9, 2022
d896238
Fix path traversal in tar unpack (CVE-2007-4559)
FeodorFitsner Oct 9, 2022
c220e02
Added `Container.shape` property
FeodorFitsner Oct 9, 2022
5df17fd
Merge branch 'main' into fixes-60
FeodorFitsner Oct 9, 2022
155896b
Fix the rest of warnings
FeodorFitsner Oct 9, 2022
f2d88d3
Remove ControlType enum
FeodorFitsner Oct 9, 2022
71aa0a1
Fix flutter tests
FeodorFitsner Oct 9, 2022
6295617
Fix MouseCursor enum
FeodorFitsner Oct 9, 2022
037f375
Added Flutter package readme
FeodorFitsner Oct 10, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 14 additions & 10 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ environment:
job_depends_on: build_flet_package
APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu

# - job_name: Test Python 3.7
# job_group: python_tests
# job_depends_on: build_flet
# python_stack: python 3.7
# APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu
- job_name: Test Python 3.7
job_group: python_tests
job_depends_on: build_flet
python_stack: python 3.7
APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu

- job_name: Test Python 3.8
job_group: python_tests
Expand Down Expand Up @@ -144,7 +144,8 @@ for:

build_script:
- cd client
- flutter build windows
- ps: if ($env:APPVEYOR_REPO_TAG_NAME -match "[0-9\.]+") { $env:FLET_VER=$Matches.0 } else { $env:FLET_VER=$env:APPVEYOR_BUILD_VERSION }
- flutter build windows --build-name=%FLET_VER%
- set RELEASE_DIR=build\windows\runner\Release
- copy "%VC_REDIST_DIR%\msvcp140.dll" %RELEASE_DIR%
- copy "%VC_REDIST_DIR%\vcruntime140.dll" %RELEASE_DIR%
Expand Down Expand Up @@ -190,7 +191,8 @@ for:
build_script:
# Flutter macOS client
- cd client
- flutter build macos
- if [[ "$APPVEYOR_REPO_TAG_NAME" =~ ([0-9\.]+) ]]; then export FLET_VER="${BASH_REMATCH[1]}"; else export FLET_VER="$APPVEYOR_BUILD_VERSION"; fi
- flutter build macos --build-name=$FLET_VER
- tar -czvf flet-macos-amd64.tar.gz -C build/macos/Build/Products/Release Flet.app

artifacts:
Expand Down Expand Up @@ -226,7 +228,8 @@ for:

build_script:
- cd client
- flutter build linux
- if [[ "$APPVEYOR_REPO_TAG_NAME" =~ ([0-9\.]+) ]]; then export FLET_VER="${BASH_REMATCH[1]}"; else export FLET_VER="$APPVEYOR_BUILD_VERSION"; fi
- flutter build linux --build-name=$FLET_VER
- mv build/linux/x64/release/bundle build/linux/x64/release/flet
- tar -czvf flet-linux-amd64.tar.gz -C build/linux/x64/release flet

Expand Down Expand Up @@ -263,7 +266,8 @@ for:

build_script:
- cd client
- flutter build linux
- if [[ "$APPVEYOR_REPO_TAG_NAME" =~ ([0-9\.]+) ]]; then export FLET_VER="${BASH_REMATCH[1]}"; else export FLET_VER="$APPVEYOR_BUILD_VERSION"; fi
- flutter build linux --build-name=$FLET_VER
- mv build/linux/arm64/release/bundle build/linux/arm64/release/flet
- tar -czvf flet-linux-arm64.tar.gz -C build/linux/arm64/release flet

Expand Down Expand Up @@ -433,7 +437,7 @@ for:
# patch version
$env:PACKAGE_VERSION = $ver
(Get-Content pyproject.toml).replace("version = `"0.1.0`"", "version = `"$ver`"") | Set-Content pyproject.toml
("# this file was auto-generated by CI", "version = '$ver'") | Set-Content flet/version.py
(Get-Content flet/version.py).replace("version = `"`"", "version = `"$ver`"") | Set-Content flet/version.py

# build package
- pdm build
Expand Down
40 changes: 40 additions & 0 deletions client/integration_test/app_test.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import 'dart:io';

import 'package:flet_client/main.dart' as app;
import 'package:flutter/cupertino.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';

void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();

tearDown(() {
debugPrint("TEAR DOWN");
});

group('end-to-end test', () {
testWidgets('tap on the floating action button, verify counter',
(tester) async {
var dir = Directory.current.path;
debugPrint("Current dir: $dir");
app.main();
await tester.pumpAndSettle(const Duration(milliseconds: 100),
EnginePhase.sendSemanticsUpdate, const Duration(seconds: 20));

// Verify the counter starts at 0.
expect(find.text('0'), findsOneWidget);

// Finds the floating action button to tap on.
final Finder fab = find.byTooltip('Increment');

// Emulate a tap on the floating action button.
await tester.tap(fab);

// Trigger a frame.
await tester.pumpAndSettle();

// Verify the counter increments by 1.
expect(find.text('1'), findsOneWidget);
});
});
}
19 changes: 18 additions & 1 deletion client/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,22 @@ void main([List<String>? args]) async {

debugPrint("Page URL: $pageUrl");

runApp(FletApp(title: 'Flet', pageUrl: pageUrl));
FletAppErrorsHandler errorsHandler = FletAppErrorsHandler();

if (!kDebugMode) {
FlutterError.onError = (details) {
errorsHandler.onError(details.exceptionAsString());
};

PlatformDispatcher.instance.onError = (error, stack) {
errorsHandler.onError(error.toString());
return true;
};
}

runApp(FletApp(
title: 'Flet',
pageUrl: pageUrl,
errorsHandler: errorsHandler,
));
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
BuildableName = "flet.app"
BuildableName = "Flet.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
Expand All @@ -31,7 +31,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
BuildableName = "flet.app"
BuildableName = "Flet.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
Expand All @@ -54,7 +54,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
BuildableName = "flet.app"
BuildableName = "Flet.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
Expand All @@ -71,7 +71,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
BuildableName = "flet.app"
BuildableName = "Flet.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
61 changes: 45 additions & 16 deletions client/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.1"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.1"
clock:
dependency: transitive
description:
Expand All @@ -112,7 +105,7 @@ packages:
name: crypto
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.1"
version: "3.0.2"
equatable:
dependency: transitive
description:
Expand Down Expand Up @@ -140,7 +133,7 @@ packages:
name: file
url: "https://pub.dartlang.org"
source: hosted
version: "6.1.4"
version: "6.1.2"
file_picker:
dependency: transitive
description:
Expand All @@ -160,6 +153,11 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
flutter_driver:
dependency: transitive
description: flutter
source: sdk
version: "0.0.0"
flutter_launcher_icons_maker:
dependency: "direct dev"
description:
Expand All @@ -180,7 +178,7 @@ packages:
name: flutter_markdown
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.10+3"
version: "0.6.12"
flutter_plugin_android_lifecycle:
dependency: transitive
description:
Expand Down Expand Up @@ -212,6 +210,11 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
fuchsia_remote_debug_protocol:
dependency: transitive
description: flutter
source: sdk
version: "0.0.0"
http:
dependency: transitive
description:
Expand All @@ -233,6 +236,11 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "3.2.0"
integration_test:
dependency: "direct main"
description: flutter
source: sdk
version: "0.0.0"
js:
dependency: transitive
description:
Expand All @@ -253,7 +261,7 @@ packages:
name: markdown
url: "https://pub.dartlang.org"
source: hosted
version: "5.0.0"
version: "6.0.1"
matcher:
dependency: transitive
description:
Expand All @@ -267,7 +275,7 @@ packages:
name: material_color_utilities
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.0"
version: "0.1.5"
meta:
dependency: transitive
description:
Expand Down Expand Up @@ -454,7 +462,7 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.9.1"
version: "1.9.0"
stack_trace:
dependency: transitive
description:
Expand All @@ -476,6 +484,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.1"
sync_http:
dependency: transitive
description:
name: sync_http
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.1"
term_glyph:
dependency: transitive
description:
Expand All @@ -489,14 +504,14 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.14"
version: "0.4.12"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
version: "1.3.1"
url_launcher:
dependency: transitive
description:
Expand Down Expand Up @@ -573,14 +588,28 @@ packages:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.3"
version: "2.1.2"
vm_service:
dependency: transitive
description:
name: vm_service
url: "https://pub.dartlang.org"
source: hosted
version: "9.0.0"
web_socket_channel:
dependency: transitive
description:
name: web_socket_channel
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
webdriver:
dependency: transitive
description:
name: webdriver
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.0"
win32:
dependency: transitive
description:
Expand Down
2 changes: 2 additions & 0 deletions client/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ dependencies:
path: ../package/

url_strategy: ^0.2.0
integration_test:
sdk: flutter

dev_dependencies:
flutter_test:
Expand Down
2 changes: 1 addition & 1 deletion package/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
## 0.0.1
## 0.1.62

* Initial release of Flet package.
33 changes: 6 additions & 27 deletions package/README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,18 @@
<!--
This README describes the package. If you publish this package to pub.dev,
this README's contents appear on the landing page for your package.

For information about how to write a good package README, see the guide for
[writing package pages](https://dart.dev/guides/libraries/writing-package-pages).
# Flet

For general information about developing packages, see the Dart guide for
[creating packages](https://dart.dev/guides/libraries/create-library-packages)
and the Flutter guide for
[developing packages and plugins](https://flutter.dev/developing-packages).
-->
Provides an interactive Flutter widget which contents is controlled by a remote Python script running on a web server.

TODO: Put a short description of the package here that helps potential users
know whether this package might be useful for them.
Flet provides a very approachable Python library, so developers without prior Flutter experience can easily build parts of your bigger Flutter app or develop their own mobile apps from scratch.

## Features

TODO: List what your package can do. Maybe include images, gifs, or videos.

## Getting started

TODO: List prerequisites and provide or point to information on how to
start using the package.
Flet implements Server-Driven UI (SDUI) approach reducing application release cycle.

## Usage

TODO: Include short and useful examples for package users. Add longer examples

to `/example` folder.

```dart
const like = 'sample';
```

## Additional information

TODO: Tell users more about the package: where to find more information, how to
contribute to the package, how to file issues, what response they can expect
from the package authors, and more.
```
Loading