flet-lottie 0.85.0.dev0__tar.gz → 0.85.0.dev2__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 (20) hide show
  1. {flet_lottie-0.85.0.dev0/src/flet_lottie.egg-info → flet_lottie-0.85.0.dev2}/PKG-INFO +3 -3
  2. {flet_lottie-0.85.0.dev0 → flet_lottie-0.85.0.dev2}/README.md +1 -1
  3. {flet_lottie-0.85.0.dev0 → flet_lottie-0.85.0.dev2}/pyproject.toml +2 -2
  4. {flet_lottie-0.85.0.dev0 → flet_lottie-0.85.0.dev2/src/flet_lottie.egg-info}/PKG-INFO +3 -3
  5. {flet_lottie-0.85.0.dev0 → flet_lottie-0.85.0.dev2}/src/flet_lottie.egg-info/SOURCES.txt +3 -0
  6. flet_lottie-0.85.0.dev2/src/flet_lottie.egg-info/requires.txt +1 -0
  7. flet_lottie-0.85.0.dev2/src/flutter/flet_lottie/lib/src/file_lottie.dart +1 -0
  8. flet_lottie-0.85.0.dev2/src/flutter/flet_lottie/lib/src/file_lottie_io.dart +33 -0
  9. flet_lottie-0.85.0.dev2/src/flutter/flet_lottie/lib/src/file_lottie_web.dart +24 -0
  10. {flet_lottie-0.85.0.dev0 → flet_lottie-0.85.0.dev2}/src/flutter/flet_lottie/lib/src/lottie.dart +3 -1
  11. {flet_lottie-0.85.0.dev0 → flet_lottie-0.85.0.dev2}/src/flutter/flet_lottie/pubspec.yaml +1 -1
  12. flet_lottie-0.85.0.dev0/src/flet_lottie.egg-info/requires.txt +0 -1
  13. {flet_lottie-0.85.0.dev0 → flet_lottie-0.85.0.dev2}/LICENSE +0 -0
  14. {flet_lottie-0.85.0.dev0 → flet_lottie-0.85.0.dev2}/setup.cfg +0 -0
  15. {flet_lottie-0.85.0.dev0 → flet_lottie-0.85.0.dev2}/src/flet_lottie/__init__.py +0 -0
  16. {flet_lottie-0.85.0.dev0 → flet_lottie-0.85.0.dev2}/src/flet_lottie/lottie.py +0 -0
  17. {flet_lottie-0.85.0.dev0 → flet_lottie-0.85.0.dev2}/src/flet_lottie.egg-info/dependency_links.txt +0 -0
  18. {flet_lottie-0.85.0.dev0 → flet_lottie-0.85.0.dev2}/src/flet_lottie.egg-info/top_level.txt +0 -0
  19. {flet_lottie-0.85.0.dev0 → flet_lottie-0.85.0.dev2}/src/flutter/flet_lottie/lib/flet_lottie.dart +0 -0
  20. {flet_lottie-0.85.0.dev0 → flet_lottie-0.85.0.dev2}/src/flutter/flet_lottie/lib/src/extension.dart +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flet-lottie
3
- Version: 0.85.0.dev0
3
+ Version: 0.85.0.dev2
4
4
  Summary: Display Lottie animations in Flet apps.
5
5
  Author-email: Flet contributors <hello@flet.dev>
6
6
  License-Expression: Apache-2.0
@@ -11,7 +11,7 @@ Project-URL: Issues, https://github.com/flet-dev/flet/issues
11
11
  Requires-Python: >=3.10
12
12
  Description-Content-Type: text/markdown
13
13
  License-File: LICENSE
14
- Requires-Dist: flet==0.85.0.dev0
14
+ Requires-Dist: flet==0.85.0.dev2
15
15
  Dynamic: license-file
16
16
 
17
17
  # flet-lottie
@@ -55,4 +55,4 @@ To install the `flet-lottie` package and add it to your project dependencies:
55
55
 
56
56
  ### Examples
57
57
 
58
- For examples, see [these](https://github.com/flet-dev/flet/tree/main/sdk/python/examples/controls/lottie).
58
+ For examples, see [these](https://github.com/flet-dev/flet/tree/main/sdk/python/examples/extensions/lottie).
@@ -39,4 +39,4 @@ To install the `flet-lottie` package and add it to your project dependencies:
39
39
 
40
40
  ### Examples
41
41
 
42
- For examples, see [these](https://github.com/flet-dev/flet/tree/main/sdk/python/examples/controls/lottie).
42
+ For examples, see [these](https://github.com/flet-dev/flet/tree/main/sdk/python/examples/extensions/lottie).
@@ -1,13 +1,13 @@
1
1
  [project]
2
2
  name = "flet-lottie"
3
- version = "0.85.0.dev0"
3
+ version = "0.85.0.dev2"
4
4
  description = "Display Lottie animations in Flet apps."
5
5
  readme = "README.md"
6
6
  authors = [{ name = "Flet contributors", email = "hello@flet.dev" }]
7
7
  license = "Apache-2.0"
8
8
  requires-python = ">=3.10"
9
9
  dependencies = [
10
- "flet==0.85.0.dev0",
10
+ "flet==0.85.0.dev2",
11
11
  ]
12
12
 
13
13
  [project.urls]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flet-lottie
3
- Version: 0.85.0.dev0
3
+ Version: 0.85.0.dev2
4
4
  Summary: Display Lottie animations in Flet apps.
5
5
  Author-email: Flet contributors <hello@flet.dev>
6
6
  License-Expression: Apache-2.0
@@ -11,7 +11,7 @@ Project-URL: Issues, https://github.com/flet-dev/flet/issues
11
11
  Requires-Python: >=3.10
12
12
  Description-Content-Type: text/markdown
13
13
  License-File: LICENSE
14
- Requires-Dist: flet==0.85.0.dev0
14
+ Requires-Dist: flet==0.85.0.dev2
15
15
  Dynamic: license-file
16
16
 
17
17
  # flet-lottie
@@ -55,4 +55,4 @@ To install the `flet-lottie` package and add it to your project dependencies:
55
55
 
56
56
  ### Examples
57
57
 
58
- For examples, see [these](https://github.com/flet-dev/flet/tree/main/sdk/python/examples/controls/lottie).
58
+ For examples, see [these](https://github.com/flet-dev/flet/tree/main/sdk/python/examples/extensions/lottie).
@@ -11,4 +11,7 @@ src/flet_lottie.egg-info/top_level.txt
11
11
  src/flutter/flet_lottie/pubspec.yaml
12
12
  src/flutter/flet_lottie/lib/flet_lottie.dart
13
13
  src/flutter/flet_lottie/lib/src/extension.dart
14
+ src/flutter/flet_lottie/lib/src/file_lottie.dart
15
+ src/flutter/flet_lottie/lib/src/file_lottie_io.dart
16
+ src/flutter/flet_lottie/lib/src/file_lottie_web.dart
14
17
  src/flutter/flet_lottie/lib/src/lottie.dart
@@ -0,0 +1 @@
1
+ flet==0.85.0.dev2
@@ -0,0 +1 @@
1
+ export 'file_lottie_web.dart' if (dart.library.io) 'file_lottie_io.dart';
@@ -0,0 +1,33 @@
1
+ import 'dart:io' as io;
2
+
3
+ import 'package:flutter/widgets.dart';
4
+ import 'package:lottie/lottie.dart';
5
+
6
+ LottieBuilder fileLottie(
7
+ String path, {
8
+ bool? animate,
9
+ bool? repeat,
10
+ bool? reverse,
11
+ AlignmentGeometry? alignment,
12
+ BoxFit? fit,
13
+ FilterQuality? filterQuality,
14
+ LottieOptions? options,
15
+ bool? backgroundLoading,
16
+ ImageErrorWidgetBuilder? errorBuilder,
17
+ void Function(LottieComposition)? onLoaded,
18
+ void Function(String)? onWarning,
19
+ }) =>
20
+ Lottie.file(
21
+ io.File(path),
22
+ animate: animate,
23
+ repeat: repeat,
24
+ reverse: reverse,
25
+ alignment: alignment,
26
+ fit: fit,
27
+ filterQuality: filterQuality,
28
+ options: options,
29
+ backgroundLoading: backgroundLoading,
30
+ errorBuilder: errorBuilder,
31
+ onLoaded: onLoaded,
32
+ onWarning: onWarning,
33
+ );
@@ -0,0 +1,24 @@
1
+ import 'package:flutter/widgets.dart';
2
+ import 'package:lottie/lottie.dart';
3
+
4
+ LottieBuilder fileLottie(
5
+ String path, {
6
+ bool? animate,
7
+ bool? repeat,
8
+ bool? reverse,
9
+ AlignmentGeometry? alignment,
10
+ BoxFit? fit,
11
+ FilterQuality? filterQuality,
12
+ LottieOptions? options,
13
+ bool? backgroundLoading,
14
+ ImageErrorWidgetBuilder? errorBuilder,
15
+ void Function(LottieComposition)? onLoaded,
16
+ void Function(String)? onWarning,
17
+ }) {
18
+ // Local file loading is not supported on web. On web, `getAssetSrc`
19
+ // always returns `isFile: false`, so this code path is unreachable at
20
+ // runtime — this stub exists only to keep the package compiling for web.
21
+ throw UnsupportedError(
22
+ 'Lottie.file is not supported on Flutter Web.',
23
+ );
24
+ }
@@ -2,6 +2,8 @@ import 'package:flet/flet.dart';
2
2
  import 'package:flutter/widgets.dart';
3
3
  import 'package:lottie/lottie.dart';
4
4
 
5
+ import 'file_lottie.dart';
6
+
5
7
  class LottieControl extends StatefulWidget {
6
8
  final Control control;
7
9
 
@@ -91,7 +93,7 @@ class _LottieControlState extends State<LottieControl> {
91
93
  var assetSrc = widget.control.backend.getAssetSource(resolvedSrc.uri!);
92
94
  // Local File
93
95
  if (assetSrc.isFile) {
94
- lottie = Lottie.asset(
96
+ lottie = fileLottie(
95
97
  assetSrc.path,
96
98
  repeat: repeat,
97
99
  reverse: reverse,
@@ -12,7 +12,7 @@ dependencies:
12
12
  sdk: flutter
13
13
 
14
14
  collection: ^1.16.0
15
- lottie: 3.3.2
15
+ lottie: 3.3.3
16
16
 
17
17
  flet:
18
18
  path: ../../../../../../../packages/flet
@@ -1 +0,0 @@
1
- flet==0.85.0.dev0