File tree Expand file tree Collapse file tree 7 files changed +11
-9
lines changed Expand file tree Collapse file tree 7 files changed +11
-9
lines changed Original file line number Diff line number Diff line change
1
+ ## 3.2.1
2
+ - Add conditional imports to prevent importing ` dart:io ` on Web targets
3
+
1
4
## 3.2.0
2
5
- Apply Blend mode at layer level
3
6
Original file line number Diff line number Diff line change @@ -169,7 +169,7 @@ packages:
169
169
path: ".."
170
170
relative: true
171
171
source: path
172
- version: "3.2.0 "
172
+ version: "3.2.1 "
173
173
matcher:
174
174
dependency: transitive
175
175
description:
Original file line number Diff line number Diff line change 1
- import 'dart:io' as io;
2
1
import 'dart:typed_data' ;
3
2
import 'package:flutter/widgets.dart' ;
4
3
import 'package:http/http.dart' as http;
@@ -97,7 +96,7 @@ class Lottie extends StatefulWidget {
97
96
98
97
/// Creates a widget that displays an [LottieComposition] obtained from a [File] .
99
98
static LottieBuilder file (
100
- io. File file, {
99
+ Object file, {
101
100
Animation <double >? controller,
102
101
FrameRate ? frameRate,
103
102
bool ? animate,
Original file line number Diff line number Diff line change 1
1
import 'dart:async' ;
2
- import 'dart:io' as io;
3
2
import 'package:flutter/foundation.dart' ;
4
3
import 'package:flutter/widgets.dart' ;
5
4
import 'package:http/http.dart' as http;
@@ -111,7 +110,7 @@ class LottieBuilder extends StatefulWidget {
111
110
/// `android.permission.READ_EXTERNAL_STORAGE` permission.
112
111
///
113
112
LottieBuilder .file (
114
- io. File file, {
113
+ Object file, {
115
114
this .controller,
116
115
this .frameRate,
117
116
this .animate,
Original file line number Diff line number Diff line change @@ -12,11 +12,12 @@ import 'lottie_provider.dart';
12
12
@immutable
13
13
class FileLottie extends LottieProvider {
14
14
FileLottie (
15
- this . file, {
15
+ Object file, {
16
16
super .imageProviderFactory,
17
17
super .decoder,
18
18
super .backgroundLoading,
19
- }) : assert (
19
+ }) : file = file as io.File ,
20
+ assert (
20
21
! kIsWeb,
21
22
'Lottie.file is not supported on Flutter Web. '
22
23
'Consider using either Lottie.asset or Lottie.network instead.' ,
Original file line number Diff line number Diff line change @@ -351,4 +351,4 @@ packages:
351
351
version: "3.1.2"
352
352
sdks:
353
353
dart: ">=3.5.0 <4.0.0"
354
- flutter: ">=3.18.0-18.0.pre.54 "
354
+ flutter: ">=3.24.0 "
Original file line number Diff line number Diff line change 1
1
name : lottie
2
2
description : Render After Effects animations natively on Flutter. This package is a pure Dart implementation of a Lottie player.
3
- version : 3.2.0
3
+ version : 3.2.1
4
4
repository : https://github.com/xvrh/lottie-flutter
5
5
6
6
funding :
You can’t perform that action at this time.
0 commit comments