mirror of
https://github.com/xvrh/lottie-flutter.git
synced 2025-08-06 16:39:36 +08:00
24 lines
743 B
Dart
24 lines
743 B
Dart
import 'dart:io';
|
|
import 'dart:ui';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
import 'package:lottie/lottie.dart';
|
|
import 'package:path/path.dart' as p;
|
|
import 'utils.dart';
|
|
|
|
void main() {
|
|
testWidgets('Animations with stroke', (tester) async {
|
|
var size = Size(500, 400);
|
|
tester.binding.window.physicalSizeTestValue = size;
|
|
tester.binding.window.devicePixelRatioTestValue = 1.0;
|
|
|
|
var composition = await LottieComposition.fromBytes(
|
|
File('assets/17297-fireworks.json').readAsBytesSync());
|
|
|
|
await tester.pumpWidget(FilmStrip(composition, size: size));
|
|
|
|
await expectLater(find.byType(FilmStrip),
|
|
matchesGoldenFile(p.join('goldens/fireworks.png')));
|
|
});
|
|
}
|