-
Notifications
You must be signed in to change notification settings - Fork 651
fix(flet-lottie): local asset files not loading on Windows desktop
#6426
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
3bc1a4e
initial commit
ndonkoHenri 599ce2f
update changelog
ndonkoHenri 56a65df
docs: enhance documentation on dependency limitations and source pack…
ndonkoHenri b1dfceb
fix: update deprecation messages for UrlLauncher, BrowserContextMenu,…
ndonkoHenri 0c7a8e8
fix: enhance badge rendering with titles and refactor member summary …
ndonkoHenri c7f1451
crocodocs: remove auto-linking of bare API symbols
ndonkoHenri 70e7411
crocodocs: preserve safe inline MDX elements from Python docstrings
ndonkoHenri 6ead027
docs: update testing guidance for deprecation handling and test matrix
ndonkoHenri 266f1c6
Bump lottie to 3.3.3; remove sample.json
FeodorFitsner 75b3282
Changelog: Lottie local asset fix on Windows
FeodorFitsner 5f2edcc
Merge branch 'release/v0.85.0' into fix-lottie
FeodorFitsner File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
sdk/python/packages/flet-lottie/src/flutter/flet_lottie/lib/src/file_lottie.dart
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| export 'file_lottie_web.dart' if (dart.library.io) 'file_lottie_io.dart'; |
33 changes: 33 additions & 0 deletions
33
sdk/python/packages/flet-lottie/src/flutter/flet_lottie/lib/src/file_lottie_io.dart
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| import 'dart:io' as io; | ||
|
|
||
| import 'package:flutter/widgets.dart'; | ||
| import 'package:lottie/lottie.dart'; | ||
|
|
||
| LottieBuilder fileLottie( | ||
| String path, { | ||
| bool? animate, | ||
| bool? repeat, | ||
| bool? reverse, | ||
| AlignmentGeometry? alignment, | ||
| BoxFit? fit, | ||
| FilterQuality? filterQuality, | ||
| LottieOptions? options, | ||
| bool? backgroundLoading, | ||
| ImageErrorWidgetBuilder? errorBuilder, | ||
| void Function(LottieComposition)? onLoaded, | ||
| void Function(String)? onWarning, | ||
| }) => | ||
| Lottie.file( | ||
| io.File(path), | ||
| animate: animate, | ||
| repeat: repeat, | ||
| reverse: reverse, | ||
| alignment: alignment, | ||
| fit: fit, | ||
| filterQuality: filterQuality, | ||
| options: options, | ||
| backgroundLoading: backgroundLoading, | ||
| errorBuilder: errorBuilder, | ||
| onLoaded: onLoaded, | ||
| onWarning: onWarning, | ||
| ); |
24 changes: 24 additions & 0 deletions
24
sdk/python/packages/flet-lottie/src/flutter/flet_lottie/lib/src/file_lottie_web.dart
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| import 'package:flutter/widgets.dart'; | ||
| import 'package:lottie/lottie.dart'; | ||
|
|
||
| LottieBuilder fileLottie( | ||
| String path, { | ||
| bool? animate, | ||
| bool? repeat, | ||
| bool? reverse, | ||
| AlignmentGeometry? alignment, | ||
| BoxFit? fit, | ||
| FilterQuality? filterQuality, | ||
| LottieOptions? options, | ||
| bool? backgroundLoading, | ||
| ImageErrorWidgetBuilder? errorBuilder, | ||
| void Function(LottieComposition)? onLoaded, | ||
| void Function(String)? onWarning, | ||
| }) { | ||
| // Local file loading is not supported on web. On web, `getAssetSrc` | ||
|
ndonkoHenri marked this conversation as resolved.
|
||
| // always returns `isFile: false`, so this code path is unreachable at | ||
| // runtime — this stub exists only to keep the package compiling for web. | ||
| throw UnsupportedError( | ||
| 'Lottie.file is not supported on Flutter Web.', | ||
| ); | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.