Skip to content

Commit

Permalink
Prepare Flet 0.23 (#3484)
Browse files Browse the repository at this point in the history
* Bump Flet package versions

* Exit if tests failed

* Support coroutines in FastAPI lifespan startup and shutdown

* Fix theme tests

* Updated changelog for 0.23.0

* Updated changelog

* update delete version to v0.26.0

* fix MaterialState deprecation

* Changelog updated: NEW: Enable Impeller on Android and macOS

* Updated changelog

* Remove ignored files

* Added ignore file

---------

Co-authored-by: ndonkoHenri <[email protected]>
  • Loading branch information
FeodorFitsner and ndonkoHenri authored Jun 18, 2024
1 parent 4b51546 commit c7f7761
Show file tree
Hide file tree
Showing 26 changed files with 211 additions and 106 deletions.
75 changes: 20 additions & 55 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,75 +111,40 @@ for:
echo $PUB_DEV_TOKEN | base64 --decode > $HOME/.config/dart/pub-credentials.json
# patch pubspecs
python3 ci/patch_pubspec.py packages/flet/pubspec.yaml $PKG_VER
python3 ci/patch_pubspec.py packages/flet_audio/pubspec.yaml $PKG_VER
python3 ci/patch_pubspec.py packages/flet_audio_recorder/pubspec.yaml $PKG_VER
python3 ci/patch_pubspec.py packages/flet_lottie/pubspec.yaml $PKG_VER
python3 ci/patch_pubspec.py packages/flet_rive/pubspec.yaml $PKG_VER
python3 ci/patch_pubspec.py packages/flet_video/pubspec.yaml $PKG_VER
python3 ci/patch_pubspec.py packages/flet_webview/pubspec.yaml $PKG_VER
for dir in packages/flet*; do
echo "Patching $dir/pubspec.yaml"
python3 ci/patch_pubspec.py $dir/pubspec.yaml $PKG_VER
done
cd packages/flet
flutter test
echo "Running flet tests"
flutter test || exit 1
dart pub publish --force || exit 1
cd $APPVEYOR_BUILD_FOLDER
sleep 10
cd packages/flet_audio
dart pub publish --force || exit 1
cd $APPVEYOR_BUILD_FOLDER
cd packages/flet_audio_recorder
dart pub publish --force || exit 1
cd $APPVEYOR_BUILD_FOLDER
cd packages/flet_lottie
dart pub publish --force || exit 1
cd $APPVEYOR_BUILD_FOLDER
cd packages/flet_rive
dart pub publish --force || exit 1
cd $APPVEYOR_BUILD_FOLDER
cd packages/flet_video
dart pub publish --force || exit 1
cd $APPVEYOR_BUILD_FOLDER
cd packages/flet_webview
dart pub publish --force || exit 1
cd $APPVEYOR_BUILD_FOLDER
for dir in packages/flet_*; do
cd "$dir"
echo "Publishing $dir package"
dart pub publish --force || exit 1
cd "$APPVEYOR_BUILD_FOLDER"
done
else
cd packages/flet
flutter test
echo "Running flet tests"
flutter test || exit 1
dart pub publish --dry-run
cd $APPVEYOR_BUILD_FOLDER
cd packages/flet_audio
dart pub publish --dry-run
cd $APPVEYOR_BUILD_FOLDER
cd packages/flet_audio_recorder
dart pub publish --dry-run
cd $APPVEYOR_BUILD_FOLDER
cd packages/flet_lottie
dart pub publish --dry-run
cd $APPVEYOR_BUILD_FOLDER
cd packages/flet_rive
dart pub publish --dry-run
cd $APPVEYOR_BUILD_FOLDER
cd packages/flet_video
dart pub publish --dry-run
cd $APPVEYOR_BUILD_FOLDER
cd packages/flet_webview
dart pub publish --dry-run
cd $APPVEYOR_BUILD_FOLDER
for dir in packages/flet_*; do
cd "$dir"
echo "Dry-run publishing $dir package"
dart pub publish --dry-run
cd "$APPVEYOR_BUILD_FOLDER"
done
fi
# ======================================
Expand Down
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,34 @@
# Flet changelog

# 0.23.0

* NEW: `PermissionHandler` control ([#3276](https://github.com/flet-dev/flet/issues/3276))
* NEW: `Map` control ([#3093](https://github.com/flet-dev/flet/issues/3093))
* NEW: `Geolocator control` ([#3179](https://github.com/flet-dev/flet/issues/3179))
* NEW: `AutoFillGroup` Control ([#3047](https://github.com/flet-dev/flet/issues/3047))
* NEW: Migrated to Flutter 3.22 ([#3396](https://github.com/flet-dev/flet/issues/3396))
* NEW: An ability to access PubSubHub from outside Flet app ([#3446](https://github.com/flet-dev/flet/issues/3446))
* NEW: `TextStyle` props: `overflow`, `word_spacing`, `baseline` ([#3435](https://github.com/flet-dev/flet/issues/3435))
* NEW: Enable/disable browser context menu ([#3434](https://github.com/flet-dev/flet/issues/3434))
* NEW: `Container.color_filter` property ([#3392](https://github.com/flet-dev/flet/issues/3392))
* NEW: `dropdown.Option.text_style` property ([#3293](https://github.com/flet-dev/flet/issues/3293))
* NEW: `dropdown.Option.content` property ([#3456](https://github.com/flet-dev/flet/issues/3456))
* NEW: `Video.configuration` property ([#3074](https://github.com/flet-dev/flet/issues/3074))
* NEW: Enable Impeller on Android and macOS ([#3458](https://github.com/flet-dev/flet/issues/3458))
* NEW: AutoComplete: add selected_index read-only property ([#3298](https://github.com/flet-dev/flet/issues/3298))
* NEW: Renamed `NavigationDestination` to `NavigationBarDestination` ([#3172](https://github.com/flet-dev/flet/issues/3172))
* CHANGED: Prettify "build" command cli output ([#3407](https://github.com/flet-dev/flet/issues/3407))
* CHANGED: Set colorScheme.primary as defaultSideColor ([#3421](https://github.com/flet-dev/flet/issues/3421))
* CHANGED: feat(map): add missing py-events, better typing ([#3464](https://github.com/flet-dev/flet/issues/3464))
* CHORE: Refactor `numbers.dart` utils ([#3263](https://github.com/flet-dev/flet/issues/3263))
* CHORE: Global Code Refactoring/Clean-up ([#3186](https://github.com/flet-dev/flet/issues/3186))
* CHORE: Cleanup ([#3406](https://github.com/flet-dev/flet/issues/3406))
* CHORE: Error handling enhancements ([#3175](https://github.com/flet-dev/flet/issues/3175))
* CHORE: Improve type hint for run_task and run_thread ([#3459](https://github.com/flet-dev/flet/issues/3459))
* CHORE: Move `page.window_*` and `page.browser_context_menu_*` properties to `Window` and `BrowserContextMenu` classes ([#3463](https://github.com/flet-dev/flet/issues/3463))
* FIX: `Container.on_tap_down` not called when `on_click` is not provided ([#3442](https://github.com/flet-dev/flet/issues/3442))
* FIX: SnackBar bug #3311 ([#3313](https://github.com/flet-dev/flet/issues/3313))

# 0.22.1

* `AutoComplete` control ([#3003](https://github.com/flet-dev/flet/issues/3003))
Expand Down
14 changes: 7 additions & 7 deletions client/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -239,21 +239,21 @@ packages:
path: "../packages/flet"
relative: true
source: path
version: "0.22.1"
version: "0.23.0"
flet_audio:
dependency: "direct main"
description:
path: "../packages/flet_audio"
relative: true
source: path
version: "0.22.1"
version: "0.23.0"
flet_audio_recorder:
dependency: "direct main"
description:
path: "../packages/flet_audio_recorder"
relative: true
source: path
version: "0.22.1"
version: "0.23.0"
flet_flashlight:
dependency: "direct main"
description:
Expand All @@ -274,7 +274,7 @@ packages:
path: "../packages/flet_lottie"
relative: true
source: path
version: "0.22.1"
version: "0.23.0"
flet_map:
dependency: "direct main"
description:
Expand All @@ -295,21 +295,21 @@ packages:
path: "../packages/flet_rive"
relative: true
source: path
version: "0.22.1"
version: "0.23.0"
flet_video:
dependency: "direct main"
description:
path: "../packages/flet_video"
relative: true
source: path
version: "0.22.1"
version: "0.23.0"
flet_webview:
dependency: "direct main"
description:
path: "../packages/flet_webview"
relative: true
source: path
version: "0.22.1"
version: "0.23.0"
flutter:
dependency: "direct main"
description: flutter
Expand Down
29 changes: 29 additions & 0 deletions packages/flet/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
# 0.23.0

* NEW: `PermissionHandler` control ([#3276](https://github.com/flet-dev/flet/issues/3276))
* NEW: `Map` control ([#3093](https://github.com/flet-dev/flet/issues/3093))
* NEW: `Geolocator control` ([#3179](https://github.com/flet-dev/flet/issues/3179))
* NEW: `AutoFillGroup` Control ([#3047](https://github.com/flet-dev/flet/issues/3047))
* NEW: Migrated to Flutter 3.22 ([#3396](https://github.com/flet-dev/flet/issues/3396))
* NEW: An ability to access PubSubHub from outside Flet app ([#3446](https://github.com/flet-dev/flet/issues/3446))
* NEW: `TextStyle` props: `overflow`, `word_spacing`, `baseline` ([#3435](https://github.com/flet-dev/flet/issues/3435))
* NEW: Enable/disable browser context menu ([#3434](https://github.com/flet-dev/flet/issues/3434))
* NEW: `Container.color_filter` property ([#3392](https://github.com/flet-dev/flet/issues/3392))
* NEW: `dropdown.Option.text_style` property ([#3293](https://github.com/flet-dev/flet/issues/3293))
* NEW: `dropdown.Option.content` property ([#3456](https://github.com/flet-dev/flet/issues/3456))
* NEW: `Video.configuration` property ([#3074](https://github.com/flet-dev/flet/issues/3074))
* NEW: Enable Impeller on Android and macOS ([#3458](https://github.com/flet-dev/flet/issues/3458))
* NEW: AutoComplete: add selected_index read-only property ([#3298](https://github.com/flet-dev/flet/issues/3298))
* NEW: Renamed `NavigationDestination` to `NavigationBarDestination` ([#3172](https://github.com/flet-dev/flet/issues/3172))
* CHANGED: Prettify "build" command cli output ([#3407](https://github.com/flet-dev/flet/issues/3407))
* CHANGED: Set colorScheme.primary as defaultSideColor ([#3421](https://github.com/flet-dev/flet/issues/3421))
* CHANGED: feat(map): add missing py-events, better typing ([#3464](https://github.com/flet-dev/flet/issues/3464))
* CHORE: Refactor `numbers.dart` utils ([#3263](https://github.com/flet-dev/flet/issues/3263))
* CHORE: Global Code Refactoring/Clean-up ([#3186](https://github.com/flet-dev/flet/issues/3186))
* CHORE: Cleanup ([#3406](https://github.com/flet-dev/flet/issues/3406))
* CHORE: Error handling enhancements ([#3175](https://github.com/flet-dev/flet/issues/3175))
* CHORE: Improve type hint for run_task and run_thread ([#3459](https://github.com/flet-dev/flet/issues/3459))
* CHORE: Move `page.window_*` and `page.browser_context_menu_*` properties to `Window` and `BrowserContextMenu` classes ([#3463](https://github.com/flet-dev/flet/issues/3463))
* FIX: `Container.on_tap_down` not called when `on_click` is not provided ([#3442](https://github.com/flet-dev/flet/issues/3442))
* FIX: SnackBar bug #3311 ([#3313](https://github.com/flet-dev/flet/issues/3313))

# 0.22.1

* `AutoComplete` control ([#3003](https://github.com/flet-dev/flet/issues/3003))
Expand Down
2 changes: 1 addition & 1 deletion packages/flet/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: flet
description: Write entire Flutter app in Python or add server-driven UI experience into existing Flutter app.
homepage: https://flet.dev
repository: https://github.com/flet-dev/flet/packages/flet
version: 0.22.1
version: 0.23.0

# This package supports all platforms listed below.
platforms:
Expand Down
6 changes: 3 additions & 3 deletions packages/flet/test/utils/theme_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ void main() {
test("Light theme is parsed correctly from JSON", () {
const t1 = '''{
"color_scheme_seed": "red",
"brightness": "light1",
"brightness": "light",
"use_material3": false
}''';

Expand All @@ -18,7 +18,7 @@ void main() {

expect(theme.brightness, Brightness.light);
expect(theme.useMaterial3, false);
expect(theme.primaryColor, const Color(0xffbb1614));
expect(theme.primaryColor, const Color(0xff904a42));
});

test("Dark theme is parsed correctly from JSON", () {
Expand All @@ -32,6 +32,6 @@ void main() {

expect(theme.brightness, Brightness.dark);
expect(theme.useMaterial3, true);
expect(theme.primaryColor, const Color(0xff191c1d));
expect(theme.primaryColor, const Color(0xff0e1416));
});
}
4 changes: 4 additions & 0 deletions packages/flet_audio/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.23.0

No changes in this release. Version bumped to follow parent `flet` package.

# 0.22.1

No changes in this release. Version bumped to follow parent `flet` package.
Expand Down
2 changes: 1 addition & 1 deletion packages/flet_audio/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: flet_audio
description: Flet Audio control
homepage: https://flet.dev
repository: https://github.com/flet-dev/flet/packages/flet_audio
version: 0.22.1
version: 0.23.0

environment:
sdk: '>=3.2.3 <4.0.0'
Expand Down
4 changes: 4 additions & 0 deletions packages/flet_audio_recorder/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.23.0

No changes in this release. Version bumped to follow parent `flet` package.

# 0.22.1

No changes in this release. Version bumped to follow parent `flet` package.
Expand Down
2 changes: 1 addition & 1 deletion packages/flet_audio_recorder/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: flet_audio_recorder
description: Flet AudioRecorder control
homepage: https://flet.dev
repository: https://github.com/flet-dev/flet/packages/flet_audio_recorder
version: 0.22.1
version: 0.23.0

environment:
sdk: '>=3.2.3 <4.0.0'
Expand Down
31 changes: 31 additions & 0 deletions packages/flet_flashlight/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
migrate_working_dir/

# IntelliJ related
*.iml
*.ipr
*.iws
.idea/

# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/

# Flutter/Dart/Pub related
# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.
/pubspec.lock
**/doc/api/
.dart_tool/
build/
.flutter-plugins
.flutter-plugins-dependencies
4 changes: 4 additions & 0 deletions packages/flet_lottie/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.23.0

No changes in this release. Version bumped to follow parent `flet` package.

# 0.22.1

No changes in this release. Version bumped to follow parent `flet` package.
Expand Down
2 changes: 1 addition & 1 deletion packages/flet_lottie/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: flet_lottie
description: Flet Lottie control
homepage: https://flet.dev
repository: https://github.com/flet-dev/flet/packages/flet_lottie
version: 0.22.1
version: 0.23.0

environment:
sdk: '>=3.2.3 <4.0.0'
Expand Down
4 changes: 4 additions & 0 deletions packages/flet_rive/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.23.0

No changes in this release. Version bumped to follow parent `flet` package.

# 0.22.1

No changes in this release. Version bumped to follow parent `flet` package.
Expand Down
2 changes: 1 addition & 1 deletion packages/flet_rive/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: flet_rive
description: Flet Rive control
homepage: https://flet.dev
repository: https://github.com/flet-dev/flet/packages/flet_rive
version: 0.22.1
version: 0.23.0

environment:
sdk: '>=3.2.3 <4.0.0'
Expand Down
4 changes: 4 additions & 0 deletions packages/flet_video/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.23.0

No changes in this release. Version bumped to follow parent `flet` package.

# 0.22.1

No changes in this release. Version bumped to follow parent `flet` package.
Expand Down
2 changes: 1 addition & 1 deletion packages/flet_video/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: flet_video
description: Flet Video control
homepage: https://flet.dev
repository: https://github.com/flet-dev/flet/packages/flet_video
version: 0.22.1
version: 0.23.0

environment:
sdk: '>=3.2.3 <4.0.0'
Expand Down
4 changes: 4 additions & 0 deletions packages/flet_webview/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.23.0

No changes in this release. Version bumped to follow parent `flet` package.

# 0.22.1

No changes in this release. Version bumped to follow parent `flet` package.
Expand Down
2 changes: 1 addition & 1 deletion packages/flet_webview/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: flet_webview
description: Flet WebView control
homepage: https://flet.dev
repository: https://github.com/flet-dev/flet/packages/flet_webview
version: 0.22.1
version: 0.23.0

environment:
sdk: '>=3.2.3 <4.0.0'
Expand Down
Loading

0 comments on commit c7f7761

Please sign in to comment.