mirror of
https://github.com/xvrh/lottie-flutter.git
synced 2025-08-06 16:39:36 +08:00
Compare commits
2 Commits
v0.8.0-nul
...
v0.8.0-nul
Author | SHA1 | Date | |
---|---|---|---|
d0edd1b3ee | |||
6831f475d4 |
14
.github/workflows/analyze-and-test.yaml
vendored
14
.github/workflows/analyze-and-test.yaml
vendored
@ -33,3 +33,17 @@ jobs:
|
|||||||
"and check in all changes" \
|
"and check in all changes" \
|
||||||
&& exit 1)
|
&& exit 1)
|
||||||
shell: bash
|
shell: bash
|
||||||
|
build_web_version:
|
||||||
|
name: Check that the web version compile
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: subosito/flutter-action@v1
|
||||||
|
with:
|
||||||
|
channel: 'beta'
|
||||||
|
- run: flutter config --enable-web
|
||||||
|
- run: flutter precache web
|
||||||
|
- run: flutter pub get
|
||||||
|
working-directory: example
|
||||||
|
- run: flutter build web
|
||||||
|
working-directory: example
|
||||||
|
BIN
example/assets/spinning_carrousel.zip
Normal file
BIN
example/assets/spinning_carrousel.zip
Normal file
Binary file not shown.
@ -7,63 +7,63 @@ packages:
|
|||||||
name: archive
|
name: archive
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.0-nullsafety.0"
|
version: "3.0.0"
|
||||||
async:
|
async:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: async
|
name: async
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.5.0-nullsafety.3"
|
version: "2.5.0"
|
||||||
boolean_selector:
|
boolean_selector:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: boolean_selector
|
name: boolean_selector
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.0-nullsafety.3"
|
version: "2.1.0"
|
||||||
characters:
|
characters:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: characters
|
name: characters
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.0-nullsafety.5"
|
version: "1.1.0"
|
||||||
charcode:
|
charcode:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: charcode
|
name: charcode
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0-nullsafety.3"
|
version: "1.2.0"
|
||||||
clock:
|
clock:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: clock
|
name: clock
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.0-nullsafety.3"
|
version: "1.1.0"
|
||||||
collection:
|
collection:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: collection
|
name: collection
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.15.0-nullsafety.5"
|
version: "1.15.0"
|
||||||
crypto:
|
crypto:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: crypto
|
name: crypto
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.0-nullsafety.0"
|
version: "3.0.0"
|
||||||
fake_async:
|
fake_async:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: fake_async
|
name: fake_async
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0-nullsafety.3"
|
version: "1.2.0"
|
||||||
ffi:
|
ffi:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -136,28 +136,28 @@ packages:
|
|||||||
path: ".."
|
path: ".."
|
||||||
relative: true
|
relative: true
|
||||||
source: path
|
source: path
|
||||||
version: "0.8.0-nullsafety.2"
|
version: "0.8.0-nullsafety.4"
|
||||||
matcher:
|
matcher:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: matcher
|
name: matcher
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.12.10-nullsafety.3"
|
version: "0.12.10"
|
||||||
meta:
|
meta:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: meta
|
name: meta
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.0-nullsafety.6"
|
version: "1.3.0"
|
||||||
path:
|
path:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: path
|
name: path
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.0-nullsafety.3"
|
version: "1.8.0"
|
||||||
path_provider:
|
path_provider:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@ -232,56 +232,56 @@ packages:
|
|||||||
name: source_span
|
name: source_span
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.0-nullsafety.4"
|
version: "1.8.0"
|
||||||
stack_trace:
|
stack_trace:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: stack_trace
|
name: stack_trace
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.10.0-nullsafety.6"
|
version: "1.10.0"
|
||||||
stream_channel:
|
stream_channel:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: stream_channel
|
name: stream_channel
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.0-nullsafety.3"
|
version: "2.1.0"
|
||||||
string_scanner:
|
string_scanner:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: string_scanner
|
name: string_scanner
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.0-nullsafety.3"
|
version: "1.1.0"
|
||||||
term_glyph:
|
term_glyph:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: term_glyph
|
name: term_glyph
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0-nullsafety.3"
|
version: "1.2.0"
|
||||||
test_api:
|
test_api:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: test_api
|
name: test_api
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.2.19-nullsafety.6"
|
version: "0.2.19"
|
||||||
typed_data:
|
typed_data:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: typed_data
|
name: typed_data
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.0-nullsafety.5"
|
version: "1.3.0"
|
||||||
vector_math:
|
vector_math:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: vector_math
|
name: vector_math
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.0-nullsafety.5"
|
version: "2.1.0"
|
||||||
win32:
|
win32:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
74
example/test/dynamic_image_test.dart
Normal file
74
example/test/dynamic_image_test.dart
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
import 'dart:async';
|
||||||
|
import 'dart:io';
|
||||||
|
import 'dart:ui' as ui;
|
||||||
|
import 'package:flutter/widgets.dart';
|
||||||
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
|
import 'package:lottie/lottie.dart';
|
||||||
|
import 'utils.dart';
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
testWidgets('Can specify ImageProvider with zip file ', (tester) async {
|
||||||
|
var size = Size(500, 400);
|
||||||
|
tester.binding.window.physicalSizeTestValue = size;
|
||||||
|
tester.binding.window.devicePixelRatioTestValue = 1.0;
|
||||||
|
|
||||||
|
var callCount = 0;
|
||||||
|
LottieImageProviderFactory imageProviderFactory = (image) {
|
||||||
|
++callCount;
|
||||||
|
return FileImage(File('assets/Images/WeAccept/img_0.png'));
|
||||||
|
};
|
||||||
|
|
||||||
|
var composition = (await tester.runAsync(() => FileLottie(
|
||||||
|
File('assets/spinning_carrousel.zip'),
|
||||||
|
imageProviderFactory: imageProviderFactory)
|
||||||
|
.load()))!;
|
||||||
|
|
||||||
|
await tester.pumpWidget(FilmStrip(composition, size: size));
|
||||||
|
|
||||||
|
expect(callCount, 2);
|
||||||
|
await expectLater(find.byType(FilmStrip),
|
||||||
|
matchesGoldenFile('goldens/dynamic_image/zip_with_provider.png'));
|
||||||
|
});
|
||||||
|
|
||||||
|
testWidgets('Can specify image delegate', (tester) async {
|
||||||
|
var size = Size(500, 400);
|
||||||
|
tester.binding.window.physicalSizeTestValue = size;
|
||||||
|
tester.binding.window.devicePixelRatioTestValue = 1.0;
|
||||||
|
|
||||||
|
var image = await tester.runAsync(
|
||||||
|
() => loadImage(FileImage(File('assets/Images/WeAccept/img_0.png'))));
|
||||||
|
|
||||||
|
var composition = (await tester.runAsync(
|
||||||
|
() => FileLottie(File('assets/spinning_carrousel.zip')).load()))!;
|
||||||
|
|
||||||
|
var delegates = LottieDelegates(image: (composition, asset) {
|
||||||
|
return image;
|
||||||
|
});
|
||||||
|
await tester.pumpWidget(FilmStrip(
|
||||||
|
composition,
|
||||||
|
size: size,
|
||||||
|
delegates: delegates,
|
||||||
|
));
|
||||||
|
|
||||||
|
await expectLater(find.byType(FilmStrip),
|
||||||
|
matchesGoldenFile('goldens/dynamic_image/delegate.png'));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<ui.Image?> loadImage(ImageProvider provider) {
|
||||||
|
var completer = Completer<ui.Image?>();
|
||||||
|
var imageStream = provider.resolve(ImageConfiguration.empty);
|
||||||
|
late ImageStreamListener listener;
|
||||||
|
listener = ImageStreamListener((image, synchronousLoaded) {
|
||||||
|
imageStream.removeListener(listener);
|
||||||
|
|
||||||
|
completer.complete(image.image);
|
||||||
|
}, onError: (dynamic e, __) {
|
||||||
|
imageStream.removeListener(listener);
|
||||||
|
|
||||||
|
completer.complete();
|
||||||
|
});
|
||||||
|
imageStream.addListener(listener);
|
||||||
|
|
||||||
|
return completer.future;
|
||||||
|
}
|
BIN
example/test/goldens/all/spinning_carrousel.png
Normal file
BIN
example/test/goldens/all/spinning_carrousel.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 42 KiB |
BIN
example/test/goldens/dynamic_image/delegate.png
Normal file
BIN
example/test/goldens/dynamic_image/delegate.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 62 KiB |
BIN
example/test/goldens/dynamic_image/zip_with_provider.png
Normal file
BIN
example/test/goldens/dynamic_image/zip_with_provider.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 62 KiB |
@ -9,6 +9,7 @@ export 'src/model/marker.dart' show Marker;
|
|||||||
export 'src/options.dart' show LottieOptions;
|
export 'src/options.dart' show LottieOptions;
|
||||||
export 'src/providers/asset_provider.dart' show AssetLottie;
|
export 'src/providers/asset_provider.dart' show AssetLottie;
|
||||||
export 'src/providers/file_provider.dart' show FileLottie;
|
export 'src/providers/file_provider.dart' show FileLottie;
|
||||||
|
export 'src/providers/load_image.dart' show LottieImageProviderFactory;
|
||||||
export 'src/providers/lottie_provider.dart' show LottieProvider;
|
export 'src/providers/lottie_provider.dart' show LottieProvider;
|
||||||
export 'src/providers/memory_provider.dart' show MemoryLottie;
|
export 'src/providers/memory_provider.dart' show MemoryLottie;
|
||||||
export 'src/providers/network_provider.dart' show NetworkLottie;
|
export 'src/providers/network_provider.dart' show NetworkLottie;
|
||||||
|
@ -241,8 +241,7 @@ abstract class BaseStrokeContent
|
|||||||
var bounds = _path.getBounds();
|
var bounds = _path.getBounds();
|
||||||
|
|
||||||
var width = _widthAnimation.value;
|
var width = _widthAnimation.value;
|
||||||
bounds = Rect.fromLTRB(bounds.left - width / 2.0, bounds.top - width / 2.0,
|
bounds = bounds.inflate(width / 2.0);
|
||||||
bounds.right + width / 2.0, bounds.bottom + width / 2.0);
|
|
||||||
// Add padding to account for rounding errors.
|
// Add padding to account for rounding errors.
|
||||||
bounds = bounds.inflate(1);
|
bounds = bounds.inflate(1);
|
||||||
L.endSection('StrokeContent#getBounds');
|
L.endSection('StrokeContent#getBounds');
|
||||||
|
@ -34,12 +34,14 @@ class CompositionParameters {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class LottieComposition {
|
class LottieComposition {
|
||||||
static Future<LottieComposition> fromByteData(ByteData data, {String? name}) {
|
static Future<LottieComposition> fromByteData(ByteData data,
|
||||||
return fromBytes(data.buffer.asUint8List(), name: name);
|
{String? name, LottieImageProviderFactory? imageProviderFactory}) {
|
||||||
|
return fromBytes(data.buffer.asUint8List(),
|
||||||
|
name: name, imageProviderFactory: imageProviderFactory);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Future<LottieComposition> fromBytes(Uint8List bytes,
|
static Future<LottieComposition> fromBytes(Uint8List bytes,
|
||||||
{String? name}) async {
|
{String? name, LottieImageProviderFactory? imageProviderFactory}) async {
|
||||||
Archive? archive;
|
Archive? archive;
|
||||||
if (bytes[0] == 0x50 && bytes[1] == 0x4B) {
|
if (bytes[0] == 0x50 && bytes[1] == 0x4B) {
|
||||||
archive = ZipDecoder().decodeBytes(bytes);
|
archive = ZipDecoder().decodeBytes(bytes);
|
||||||
@ -55,8 +57,18 @@ class LottieComposition {
|
|||||||
var imagePath = p.posix.join(image.dirName, image.fileName);
|
var imagePath = p.posix.join(image.dirName, image.fileName);
|
||||||
var found = archive.files.firstWhereOrNull(
|
var found = archive.files.firstWhereOrNull(
|
||||||
(f) => f.name.toLowerCase() == imagePath.toLowerCase());
|
(f) => f.name.toLowerCase() == imagePath.toLowerCase());
|
||||||
|
|
||||||
|
ImageProvider? provider;
|
||||||
|
if (imageProviderFactory != null) {
|
||||||
|
provider = imageProviderFactory(image);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (provider != null) {
|
||||||
|
image.loadedImage = await loadImage(composition, image, provider);
|
||||||
|
}
|
||||||
|
|
||||||
if (found != null) {
|
if (found != null) {
|
||||||
image.loadedImage = await loadImage(
|
image.loadedImage ??= await loadImage(
|
||||||
composition, image, MemoryImage(found.content as Uint8List));
|
composition, image, MemoryImage(found.content as Uint8List));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
|
import 'dart:ui' as ui;
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
|
import '../lottie.dart';
|
||||||
import 'lottie_drawable.dart';
|
import 'lottie_drawable.dart';
|
||||||
import 'value_delegate.dart';
|
import 'value_delegate.dart';
|
||||||
|
|
||||||
@ -43,12 +45,31 @@ class LottieDelegates {
|
|||||||
/// ```
|
/// ```
|
||||||
final List<ValueDelegate>? values;
|
final List<ValueDelegate>? values;
|
||||||
|
|
||||||
//TODO(xha): imageDelegate to change the image to display?
|
/// A callback to dynamically change an image of the animation.
|
||||||
|
///
|
||||||
|
/// Example:
|
||||||
|
/// ```dart
|
||||||
|
/// Lottie.asset(
|
||||||
|
// 'assets/data.json',
|
||||||
|
// delegates: LottieDelegates(
|
||||||
|
// image: (composition, image) {
|
||||||
|
// if (image.id == 'img_0' && _isMouseOver) {
|
||||||
|
// return myCustomImage;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// // Use the default method: composition.images[image.id].loadedImage;
|
||||||
|
// return null;
|
||||||
|
// },
|
||||||
|
// )
|
||||||
|
// )
|
||||||
|
/// ```
|
||||||
|
final ui.Image? Function(LottieComposition, LottieImageAsset)? image;
|
||||||
|
|
||||||
LottieDelegates({
|
LottieDelegates({
|
||||||
this.text,
|
this.text,
|
||||||
TextStyle Function(LottieFontStyle)? textStyle,
|
TextStyle Function(LottieFontStyle)? textStyle,
|
||||||
this.values,
|
this.values,
|
||||||
|
this.image,
|
||||||
}) : textStyle = textStyle;
|
}) : textStyle = textStyle;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -79,7 +79,13 @@ class LottieDrawable {
|
|||||||
ui.Image? getImageAsset(String? ref) {
|
ui.Image? getImageAsset(String? ref) {
|
||||||
var imageAsset = composition.images[ref];
|
var imageAsset = composition.images[ref];
|
||||||
if (imageAsset != null) {
|
if (imageAsset != null) {
|
||||||
return imageAsset.loadedImage;
|
var imageDelegate = delegates?.image;
|
||||||
|
ui.Image? image;
|
||||||
|
if (imageDelegate != null) {
|
||||||
|
image = imageDelegate(composition, imageAsset);
|
||||||
|
}
|
||||||
|
|
||||||
|
return image ?? imageAsset.loadedImage;
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -261,10 +261,7 @@ abstract class BaseLayer implements DrawingContent, KeyPathElement {
|
|||||||
void _clearCanvas(Canvas canvas, Rect bounds) {
|
void _clearCanvas(Canvas canvas, Rect bounds) {
|
||||||
L.beginSection('Layer#clearLayer');
|
L.beginSection('Layer#clearLayer');
|
||||||
// If we don't pad the clear draw, some phones leave a 1px border of the graphics buffer.
|
// If we don't pad the clear draw, some phones leave a 1px border of the graphics buffer.
|
||||||
canvas.drawRect(
|
canvas.drawRect(bounds.inflate(1), _clearPaint);
|
||||||
Rect.fromLTRB(bounds.left - 1, bounds.top - 1, bounds.right + 1,
|
|
||||||
bounds.bottom + 1),
|
|
||||||
_clearPaint);
|
|
||||||
L.endSection('Layer#clearLayer');
|
L.endSection('Layer#clearLayer');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,13 +101,12 @@ class LottieCompositionParser {
|
|||||||
}
|
}
|
||||||
layers.add(layer);
|
layers.add(layer);
|
||||||
layerMap[layer.id] = layer;
|
layerMap[layer.id] = layer;
|
||||||
|
}
|
||||||
if (imageCount > 4) {
|
if (imageCount > 4) {
|
||||||
composition.addWarning(
|
composition.addWarning(
|
||||||
'You have $imageCount images. Lottie should primarily be '
|
'You have $imageCount images. Lottie should primarily be '
|
||||||
'used with shapes. If you are using Adobe Illustrator, convert the Illustrator layers'
|
'used with shapes. If you are using Adobe Illustrator, convert the Illustrator layers'
|
||||||
' to shape layers.');
|
' to shape layers.');
|
||||||
}
|
|
||||||
}
|
}
|
||||||
reader.endArray();
|
reader.endArray();
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,8 @@ class AssetLottie extends LottieProvider {
|
|||||||
var data = await chosenBundle.load(keyName);
|
var data = await chosenBundle.load(keyName);
|
||||||
|
|
||||||
var composition = await LottieComposition.fromByteData(data,
|
var composition = await LottieComposition.fromByteData(data,
|
||||||
name: p.url.basenameWithoutExtension(keyName));
|
name: p.url.basenameWithoutExtension(keyName),
|
||||||
|
imageProviderFactory: imageProviderFactory);
|
||||||
|
|
||||||
for (var image in composition.images.values) {
|
for (var image in composition.images.values) {
|
||||||
image.loadedImage ??= await _loadImage(composition, image);
|
image.loadedImage ??= await _loadImage(composition, image);
|
||||||
|
@ -18,7 +18,8 @@ class FileLottie extends LottieProvider {
|
|||||||
return sharedLottieCache.putIfAbsent(cacheKey, () async {
|
return sharedLottieCache.putIfAbsent(cacheKey, () async {
|
||||||
var bytes = await io.loadFile(file);
|
var bytes = await io.loadFile(file);
|
||||||
var composition = await LottieComposition.fromBytes(bytes,
|
var composition = await LottieComposition.fromBytes(bytes,
|
||||||
name: p.basenameWithoutExtension(io.filePath(file)));
|
name: p.basenameWithoutExtension(io.filePath(file)),
|
||||||
|
imageProviderFactory: imageProviderFactory);
|
||||||
|
|
||||||
for (var image in composition.images.values) {
|
for (var image in composition.images.values) {
|
||||||
image.loadedImage ??= await _loadImage(composition, image);
|
image.loadedImage ??= await _loadImage(composition, image);
|
||||||
|
@ -4,7 +4,7 @@ import 'package:flutter/widgets.dart';
|
|||||||
import '../composition.dart';
|
import '../composition.dart';
|
||||||
import '../lottie_image_asset.dart';
|
import '../lottie_image_asset.dart';
|
||||||
|
|
||||||
typedef LottieImageProviderFactory = ImageProvider Function(LottieImageAsset);
|
typedef LottieImageProviderFactory = ImageProvider? Function(LottieImageAsset);
|
||||||
|
|
||||||
Future<ui.Image?> loadImage(LottieComposition composition,
|
Future<ui.Image?> loadImage(LottieComposition composition,
|
||||||
LottieImageAsset lottieImage, ImageProvider provider) {
|
LottieImageAsset lottieImage, ImageProvider provider) {
|
||||||
|
@ -18,7 +18,8 @@ class MemoryLottie extends LottieProvider {
|
|||||||
// TODO(xha): hash the list content
|
// TODO(xha): hash the list content
|
||||||
var cacheKey = 'memory-${bytes.hashCode}-${bytes.lengthInBytes}';
|
var cacheKey = 'memory-${bytes.hashCode}-${bytes.lengthInBytes}';
|
||||||
return sharedLottieCache.putIfAbsent(cacheKey, () async {
|
return sharedLottieCache.putIfAbsent(cacheKey, () async {
|
||||||
var composition = await LottieComposition.fromBytes(bytes);
|
var composition = await LottieComposition.fromBytes(bytes,
|
||||||
|
imageProviderFactory: imageProviderFactory);
|
||||||
for (var image in composition.images.values) {
|
for (var image in composition.images.values) {
|
||||||
image.loadedImage ??= await _loadImage(composition, image);
|
image.loadedImage ??= await _loadImage(composition, image);
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,8 @@ class NetworkLottie extends LottieProvider {
|
|||||||
var bytes = await network.loadHttp(resolved, headers: headers);
|
var bytes = await network.loadHttp(resolved, headers: headers);
|
||||||
|
|
||||||
var composition = await LottieComposition.fromBytes(bytes,
|
var composition = await LottieComposition.fromBytes(bytes,
|
||||||
name: p.url.basenameWithoutExtension(url));
|
name: p.url.basenameWithoutExtension(url),
|
||||||
|
imageProviderFactory: imageProviderFactory);
|
||||||
|
|
||||||
for (var image in composition.images.values) {
|
for (var image in composition.images.values) {
|
||||||
image.loadedImage ??= await _loadImage(resolved, composition, image);
|
image.loadedImage ??= await _loadImage(resolved, composition, image);
|
||||||
|
@ -30,6 +30,6 @@ String filePath(Object file) {
|
|||||||
return (file as File).relativePath ?? '';
|
return (file as File).relativePath ?? '';
|
||||||
}
|
}
|
||||||
|
|
||||||
ImageProvider? loadImageForFile(Object file, LottieImageAsset lottieImage) {
|
ImageProvider loadImageForFile(Object file, LottieImageAsset lottieImage) {
|
||||||
return null;
|
throw UnimplementedError();
|
||||||
}
|
}
|
||||||
|
138
pubspec.lock
138
pubspec.lock
@ -7,112 +7,112 @@ packages:
|
|||||||
name: _fe_analyzer_shared
|
name: _fe_analyzer_shared
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "14.0.0"
|
version: "16.0.0"
|
||||||
analyzer:
|
analyzer:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
name: analyzer
|
name: analyzer
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.41.2"
|
version: "1.0.0"
|
||||||
archive:
|
archive:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: archive
|
name: archive
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.0-nullsafety.0"
|
version: "3.0.0"
|
||||||
args:
|
args:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: args
|
name: args
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.6.0"
|
version: "2.0.0"
|
||||||
async:
|
async:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: async
|
name: async
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.5.0-nullsafety.3"
|
version: "2.5.0"
|
||||||
boolean_selector:
|
boolean_selector:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: boolean_selector
|
name: boolean_selector
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.0-nullsafety.3"
|
version: "2.1.0"
|
||||||
build:
|
build:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: build
|
name: build
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.6.2"
|
version: "1.6.3"
|
||||||
build_config:
|
build_config:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: build_config
|
name: build_config
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.4.5"
|
version: "0.4.6"
|
||||||
build_daemon:
|
build_daemon:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: build_daemon
|
name: build_daemon
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.7"
|
version: "2.1.8"
|
||||||
build_resolvers:
|
build_resolvers:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: build_resolvers
|
name: build_resolvers
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.5.3"
|
version: "1.5.4"
|
||||||
build_runner:
|
build_runner:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
name: build_runner
|
name: build_runner
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.11.1"
|
version: "1.11.5"
|
||||||
build_runner_core:
|
build_runner_core:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: build_runner_core
|
name: build_runner_core
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "6.1.7"
|
version: "6.1.10"
|
||||||
built_collection:
|
built_collection:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: built_collection
|
name: built_collection
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.3.2"
|
version: "5.0.0"
|
||||||
built_value:
|
built_value:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: built_value
|
name: built_value
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "7.1.0"
|
version: "8.0.0"
|
||||||
characters:
|
characters:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: characters
|
name: characters
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.0-nullsafety.5"
|
version: "1.1.0"
|
||||||
charcode:
|
charcode:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: charcode
|
name: charcode
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0-nullsafety.3"
|
version: "1.2.0"
|
||||||
checked_yaml:
|
checked_yaml:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -126,14 +126,14 @@ packages:
|
|||||||
name: cli_util
|
name: cli_util
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.2.0"
|
version: "0.3.0"
|
||||||
clock:
|
clock:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: clock
|
name: clock
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.0-nullsafety.3"
|
version: "1.1.0"
|
||||||
code_builder:
|
code_builder:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -147,49 +147,49 @@ packages:
|
|||||||
name: collection
|
name: collection
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.15.0-nullsafety.5"
|
version: "1.15.0"
|
||||||
convert:
|
convert:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: convert
|
name: convert
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.1"
|
version: "3.0.0"
|
||||||
crypto:
|
crypto:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: crypto
|
name: crypto
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.0-nullsafety.0"
|
version: "3.0.0"
|
||||||
dart_style:
|
dart_style:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
name: dart_style
|
name: dart_style
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.11"
|
version: "1.3.13"
|
||||||
fake_async:
|
fake_async:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: fake_async
|
name: fake_async
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0-nullsafety.3"
|
version: "1.2.0"
|
||||||
file:
|
file:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: file
|
name: file
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "5.2.1"
|
version: "6.1.0"
|
||||||
fixnum:
|
fixnum:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: fixnum
|
name: fixnum
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.10.11"
|
version: "1.0.0"
|
||||||
flutter:
|
flutter:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description: flutter
|
description: flutter
|
||||||
@ -206,7 +206,7 @@ packages:
|
|||||||
name: glob
|
name: glob
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0"
|
version: "2.0.0"
|
||||||
graphs:
|
graphs:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -227,14 +227,7 @@ packages:
|
|||||||
name: http_parser
|
name: http_parser
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.1.4"
|
version: "4.0.0"
|
||||||
intl:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: intl
|
|
||||||
url: "https://pub.dartlang.org"
|
|
||||||
source: hosted
|
|
||||||
version: "0.16.1"
|
|
||||||
io:
|
io:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -255,7 +248,7 @@ packages:
|
|||||||
name: json_annotation
|
name: json_annotation
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.1.1"
|
version: "4.0.0"
|
||||||
logging:
|
logging:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@ -269,14 +262,14 @@ packages:
|
|||||||
name: matcher
|
name: matcher
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.12.10-nullsafety.3"
|
version: "0.12.10"
|
||||||
meta:
|
meta:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: meta
|
name: meta
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.0-nullsafety.6"
|
version: "1.3.0"
|
||||||
mime:
|
mime:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -287,38 +280,26 @@ packages:
|
|||||||
mockito:
|
mockito:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
name: mockito
|
path: "."
|
||||||
url: "https://pub.dartlang.org"
|
ref: HEAD
|
||||||
source: hosted
|
resolved-ref: c9fa2276b6b352331105e5b000d60f996d8ec452
|
||||||
version: "5.0.0-nullsafety.7"
|
url: "https://github.com/dart-lang/mockito.git"
|
||||||
node_interop:
|
source: git
|
||||||
dependency: transitive
|
version: "5.0.0"
|
||||||
description:
|
|
||||||
name: node_interop
|
|
||||||
url: "https://pub.dartlang.org"
|
|
||||||
source: hosted
|
|
||||||
version: "1.2.1"
|
|
||||||
node_io:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: node_io
|
|
||||||
url: "https://pub.dartlang.org"
|
|
||||||
source: hosted
|
|
||||||
version: "1.2.0"
|
|
||||||
package_config:
|
package_config:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: package_config
|
name: package_config
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.9.3"
|
version: "2.0.0"
|
||||||
path:
|
path:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: path
|
name: path
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.0-nullsafety.3"
|
version: "1.8.0"
|
||||||
pedantic:
|
pedantic:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -332,42 +313,35 @@ packages:
|
|||||||
name: pool
|
name: pool
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.4.0"
|
version: "1.5.0"
|
||||||
pub_semver:
|
pub_semver:
|
||||||
dependency: transitive
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
name: pub_semver
|
name: pub_semver
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.4.4"
|
version: "2.0.0"
|
||||||
pubspec_parse:
|
pubspec_parse:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: pubspec_parse
|
name: pubspec_parse
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.1.7"
|
version: "0.1.8"
|
||||||
quiver:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: quiver
|
|
||||||
url: "https://pub.dartlang.org"
|
|
||||||
source: hosted
|
|
||||||
version: "2.1.5"
|
|
||||||
shelf:
|
shelf:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: shelf
|
name: shelf
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.7.9"
|
version: "1.0.0"
|
||||||
shelf_web_socket:
|
shelf_web_socket:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: shelf_web_socket
|
name: shelf_web_socket
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.2.4"
|
version: "0.2.4+1"
|
||||||
sky_engine:
|
sky_engine:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description: flutter
|
description: flutter
|
||||||
@ -379,56 +353,56 @@ packages:
|
|||||||
name: source_gen
|
name: source_gen
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.9.10+1"
|
version: "0.9.10+3"
|
||||||
source_span:
|
source_span:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: source_span
|
name: source_span
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.0-nullsafety.4"
|
version: "1.8.0"
|
||||||
stack_trace:
|
stack_trace:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: stack_trace
|
name: stack_trace
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.10.0-nullsafety.6"
|
version: "1.10.0"
|
||||||
stream_channel:
|
stream_channel:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: stream_channel
|
name: stream_channel
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.0-nullsafety.3"
|
version: "2.1.0"
|
||||||
stream_transform:
|
stream_transform:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: stream_transform
|
name: stream_transform
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0"
|
version: "2.0.0"
|
||||||
string_scanner:
|
string_scanner:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: string_scanner
|
name: string_scanner
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.0-nullsafety.3"
|
version: "1.1.0"
|
||||||
term_glyph:
|
term_glyph:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: term_glyph
|
name: term_glyph
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0-nullsafety.3"
|
version: "1.2.0"
|
||||||
test_api:
|
test_api:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: test_api
|
name: test_api
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.2.19-nullsafety.6"
|
version: "0.2.19"
|
||||||
timing:
|
timing:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -442,21 +416,21 @@ packages:
|
|||||||
name: typed_data
|
name: typed_data
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.0-nullsafety.5"
|
version: "1.3.0"
|
||||||
vector_math:
|
vector_math:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: vector_math
|
name: vector_math
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.0-nullsafety.5"
|
version: "2.1.0"
|
||||||
watcher:
|
watcher:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: watcher
|
name: watcher
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.9.7+15"
|
version: "1.0.0"
|
||||||
web_socket_channel:
|
web_socket_channel:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -470,6 +444,6 @@ packages:
|
|||||||
name: yaml
|
name: yaml
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.0-nullsafety.0"
|
version: "3.0.0"
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=2.12.0-0.0 <3.0.0"
|
dart: ">=2.12.0-0.0 <3.0.0"
|
||||||
|
26
pubspec.yaml
26
pubspec.yaml
@ -1,28 +1,32 @@
|
|||||||
name: lottie
|
name: lottie
|
||||||
description: Render After Effects animations natively on Flutter. This package is a pure Dart implementation of a Lottie player.
|
description: Render After Effects animations natively on Flutter. This package is a pure Dart implementation of a Lottie player.
|
||||||
version: 0.8.0-nullsafety.2
|
version: 0.8.0-nullsafety.4
|
||||||
homepage: https://github.com/xvrh/lottie-flutter
|
homepage: https://github.com/xvrh/lottie-flutter
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=2.12.0-0 <3.0.0'
|
sdk: '>=2.12.0-0 <3.0.0'
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
archive: ^3.0.0-nullsafety.0
|
archive: ^3.0.0
|
||||||
characters: ^1.1.0-nullsafety.5
|
characters: ^1.1.0
|
||||||
charcode: ^1.2.0-nullsafety.3
|
charcode: ^1.2.0
|
||||||
collection: ^1.15.0-nullsafety.5
|
collection: ^1.15.0
|
||||||
flutter:
|
flutter:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
logging: ^1.0.0
|
logging: ^1.0.0
|
||||||
meta: ^1.3.0-nullsafety.6
|
meta: ^1.3.0
|
||||||
path: ^1.8.0-nullsafety.3
|
path: ^1.8.0
|
||||||
vector_math: ^2.1.0-nullsafety.5
|
vector_math: ^2.1.0
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
analyzer:
|
analyzer: ^1.0.0
|
||||||
build_runner:
|
build_runner:
|
||||||
dart_style:
|
dart_style:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
mockito: ^5.0.0-nullsafety.7
|
mockito:
|
||||||
yaml: ^3.0.0-nullsafety.0
|
git:
|
||||||
|
url: https://github.com/dart-lang/mockito.git
|
||||||
|
ref: c9fa227
|
||||||
|
pub_semver:
|
||||||
|
yaml: ^3.0.0
|
||||||
|
Reference in New Issue
Block a user