Compare commits
2 Commits
v0.8.0-nul
...
update-gol
Author | SHA1 | Date | |
---|---|---|---|
e303633132 | |||
7fe343d819 |
@ -10,8 +10,8 @@ jobs:
|
||||
name: Flutter analyze
|
||||
strategy:
|
||||
matrix:
|
||||
flutter: ['beta']
|
||||
runs-on: macos-latest
|
||||
flutter: ['stable']
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: subosito/flutter-action@v1
|
||||
@ -22,9 +22,6 @@ jobs:
|
||||
- run: flutter pub get
|
||||
working-directory: example
|
||||
- run: flutter analyze
|
||||
- run: flutter test test # https://github.com/flutter/flutter/issues/20907
|
||||
- run: flutter test test
|
||||
working-directory: example
|
||||
- run: flutter pub run tool/prepare_submit.dart
|
||||
- name: "check for uncommitted changes"
|
||||
run: |
|
5
.github/workflows/publish-on-pub.yaml
vendored
@ -10,11 +10,12 @@ jobs:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: subosito/flutter-action@v1
|
||||
with:
|
||||
channel: 'beta'
|
||||
channel: 'stable'
|
||||
- run: flutter pub get
|
||||
- run: flutter pub run tool/publish/comment_dependency_overrides.dart
|
||||
- run: flutter pub get
|
||||
- run: flutter pub run tool/publish/check_version.dart ${GITHUB_REF}
|
||||
- run: echo ::set-env name=RELEASE_VERSION::${GITHUB_REF}
|
||||
- run: flutter pub run tool/publish/check_version.dart ${{ env.RELEASE_VERSION }}
|
||||
- name: Setup credentials
|
||||
run: |
|
||||
mkdir -p $FLUTTER_HOME/.pub-cache
|
||||
|
17
.github/workflows/test.yaml
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
name: Lottie Flutter
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Run all tests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Run tests
|
||||
uses: docker://cirrusci/flutter:1.22.1
|
||||
with:
|
||||
args: sh run_tests.sh
|
@ -1,6 +1,3 @@
|
||||
## [0.7.1]
|
||||
- Fix a crash for some lottie file with empty paths.
|
||||
|
||||
## [0.7.0+1]
|
||||
- Fix Flutter Web compilation error
|
||||
|
||||
|
7
CONTRIBUTING.md
Normal file
@ -0,0 +1,7 @@
|
||||
|
||||
## Run the Golden tests
|
||||
Run and update the golden tests requires Docker installed.
|
||||
|
||||
```shell script
|
||||
sh update_goldens.sh
|
||||
```
|
@ -64,7 +64,7 @@ class MyApp extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _MyAppState extends State<MyApp> with TickerProviderStateMixin {
|
||||
late final AnimationController _controller;
|
||||
AnimationController _controller;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
@ -137,7 +137,7 @@ class MyWidget extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _MyWidgetState extends State<MyWidget> {
|
||||
late final Future<LottieComposition> _composition;
|
||||
Future<LottieComposition> _composition;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
@ -176,7 +176,7 @@ a specific position and size.
|
||||
class CustomDrawer extends StatelessWidget {
|
||||
final LottieComposition composition;
|
||||
|
||||
const CustomDrawer(this.composition, {Key? key}) : super(key: key);
|
||||
const CustomDrawer(this.composition, {Key key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
@ -23,7 +23,7 @@ class __PageState extends State<_Page> {
|
||||
void initState() {
|
||||
super.initState();
|
||||
|
||||
SchedulerBinding.instance!.addPostFrameCallback((_) => _showLoader());
|
||||
SchedulerBinding.instance.addPostFrameCallback((_) => _showLoader());
|
||||
}
|
||||
|
||||
void _showLoader() {
|
||||
|
@ -6,7 +6,7 @@ void main() async {
|
||||
}
|
||||
|
||||
class App extends StatelessWidget {
|
||||
const App({Key? key}) : super(key: key);
|
||||
const App({Key key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
@ -9,7 +9,7 @@ class MyApp extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _MyAppState extends State<MyApp> with TickerProviderStateMixin {
|
||||
late final AnimationController _controller;
|
||||
AnimationController _controller;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -17,7 +17,7 @@ class MyApp extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _MyAppState extends State<MyApp> with TickerProviderStateMixin {
|
||||
late final AnimationController _controller;
|
||||
AnimationController _controller;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
@ -97,7 +97,7 @@ class _MyAppState extends State<MyApp> with TickerProviderStateMixin {
|
||||
min: start,
|
||||
max: stop,
|
||||
reverse: true,
|
||||
period: _controller.duration! * (stop - start),
|
||||
period: _controller.duration * (stop - start),
|
||||
);
|
||||
},
|
||||
),
|
||||
|
@ -22,7 +22,7 @@ class MyWidget extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _MyWidgetState extends State<MyWidget> {
|
||||
late final Future<LottieComposition> _composition;
|
||||
Future<LottieComposition> _composition;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
@ -57,7 +57,7 @@ class _MyWidgetState extends State<MyWidget> {
|
||||
class CustomDrawer extends StatelessWidget {
|
||||
final LottieComposition composition;
|
||||
|
||||
const CustomDrawer(this.composition, {Key? key}) : super(key: key);
|
||||
const CustomDrawer(this.composition, {Key key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
@ -23,7 +23,7 @@ class MyWidget extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _MyWidgetState extends State<MyWidget> {
|
||||
late final Future<LottieComposition> _composition;
|
||||
Future<LottieComposition> _composition;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -8,7 +8,7 @@ void main() async {
|
||||
}
|
||||
|
||||
class App extends StatefulWidget {
|
||||
const App({Key? key}) : super(key: key);
|
||||
const App({Key key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_AppState createState() => _AppState();
|
||||
@ -50,7 +50,7 @@ class _AppState extends State<App> with TickerProviderStateMixin {
|
||||
value: _useDelegates,
|
||||
onChanged: (newValue) {
|
||||
setState(() {
|
||||
_useDelegates = newValue!;
|
||||
_useDelegates = newValue;
|
||||
});
|
||||
},
|
||||
),
|
||||
|
@ -7,14 +7,14 @@ void main() async {
|
||||
}
|
||||
|
||||
class App extends StatefulWidget {
|
||||
const App({Key? key}) : super(key: key);
|
||||
const App({Key key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_AppState createState() => _AppState();
|
||||
}
|
||||
|
||||
class _AppState extends State<App> with TickerProviderStateMixin {
|
||||
late final TextEditingController _textController;
|
||||
TextEditingController _textController;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -6,14 +6,14 @@ void main() async {
|
||||
}
|
||||
|
||||
class App extends StatefulWidget {
|
||||
const App({Key? key}) : super(key: key);
|
||||
const App({Key key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_AppState createState() => _AppState();
|
||||
}
|
||||
|
||||
class _AppState extends State<App> with TickerProviderStateMixin {
|
||||
late final AnimationController _animationController;
|
||||
AnimationController _animationController;
|
||||
bool _showAnimation = true;
|
||||
|
||||
@override
|
||||
|
@ -9,14 +9,14 @@ void main() async {
|
||||
}
|
||||
|
||||
class App extends StatefulWidget {
|
||||
const App({Key? key}) : super(key: key);
|
||||
const App({Key key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_AppState createState() => _AppState();
|
||||
}
|
||||
|
||||
class _AppState extends State<App> with TickerProviderStateMixin {
|
||||
late final Future<LottieComposition> _composition;
|
||||
Future<LottieComposition> _composition;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
@ -35,9 +35,9 @@ class _AppState extends State<App> with TickerProviderStateMixin {
|
||||
body: FutureBuilder<LottieComposition>(
|
||||
future: _composition,
|
||||
builder: (context, snapshot) {
|
||||
if (snapshot.hasError) return ErrorWidget(snapshot.error!);
|
||||
if (snapshot.hasError) return ErrorWidget(snapshot.error);
|
||||
if (!snapshot.hasData) return CircularProgressIndicator();
|
||||
return _LottieDetails(snapshot.data!);
|
||||
return _LottieDetails(snapshot.data);
|
||||
},
|
||||
),
|
||||
),
|
||||
@ -48,7 +48,7 @@ class _AppState extends State<App> with TickerProviderStateMixin {
|
||||
class _LottieDetails extends StatefulWidget {
|
||||
final LottieComposition composition;
|
||||
|
||||
const _LottieDetails(this.composition, {Key? key}) : super(key: key);
|
||||
const _LottieDetails(this.composition, {Key key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_LottieDetailsState createState() => _LottieDetailsState();
|
||||
@ -56,7 +56,7 @@ class _LottieDetails extends StatefulWidget {
|
||||
|
||||
class _LottieDetailsState extends State<_LottieDetails>
|
||||
with TickerProviderStateMixin {
|
||||
late final AnimationController _controller;
|
||||
AnimationController _controller;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
@ -112,8 +112,8 @@ class _LottieDetailsState extends State<_LottieDetails>
|
||||
}
|
||||
|
||||
void _playBetween(String marker1, String marker2) {
|
||||
var start = widget.composition.getMarker(marker1)!.start;
|
||||
var end = widget.composition.getMarker(marker2)!.start;
|
||||
var start = widget.composition.getMarker(marker1).start;
|
||||
var end = widget.composition.getMarker(marker2).start;
|
||||
|
||||
_controller.value = start;
|
||||
_controller.animateTo(end,
|
||||
|
@ -1,63 +0,0 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:lottie/lottie.dart';
|
||||
|
||||
void main() => runApp(MyApp());
|
||||
|
||||
class MyApp extends StatefulWidget {
|
||||
@override
|
||||
_MyAppState createState() => _MyAppState();
|
||||
}
|
||||
|
||||
class _MyAppState extends State<MyApp> with TickerProviderStateMixin {
|
||||
late final AnimationController _controller;
|
||||
int _repeatIndex = 0;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
|
||||
_controller = AnimationController(vsync: this)
|
||||
..addStatusListener((status) {
|
||||
if (status == AnimationStatus.completed) {
|
||||
setState(() {
|
||||
_repeatIndex++;
|
||||
});
|
||||
if (_repeatIndex < 5) {
|
||||
_controller.reset();
|
||||
_controller.forward();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
home: Scaffold(
|
||||
body: ListView(
|
||||
children: [
|
||||
Lottie.asset(
|
||||
'assets/AndroidWave.json',
|
||||
controller: _controller,
|
||||
width: 150,
|
||||
height: 150,
|
||||
onLoaded: (composition) {
|
||||
// Configure the AnimationController with the duration of the
|
||||
// Lottie file and start the animation.
|
||||
_controller.duration = composition.duration;
|
||||
_controller.forward();
|
||||
},
|
||||
),
|
||||
Center(child: Text('Repeat: $_repeatIndex')),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_controller.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
}
|
@ -12,7 +12,7 @@ void main() async {
|
||||
}
|
||||
|
||||
class App extends StatefulWidget {
|
||||
const App({Key? key}) : super(key: key);
|
||||
const App({Key key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_AppState createState() => _AppState();
|
||||
@ -20,7 +20,7 @@ class App extends StatefulWidget {
|
||||
|
||||
class _AppState extends State<App> with TickerProviderStateMixin {
|
||||
int _index = 0;
|
||||
late final AnimationController _animationController;
|
||||
AnimationController _animationController;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -1,5 +1,3 @@
|
||||
//@dart=2.10
|
||||
|
||||
import 'dart:io';
|
||||
import 'dart:ui';
|
||||
import 'package:flutter/material.dart';
|
||||
|
@ -42,10 +42,8 @@ class App extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute<void>(
|
||||
builder: (context) => Detail(assetName)));
|
||||
Navigator.of(context).push(MaterialPageRoute<void>(
|
||||
builder: (context) => Detail(assetName)));
|
||||
},
|
||||
);
|
||||
},
|
||||
@ -58,7 +56,7 @@ class App extends StatelessWidget {
|
||||
class _Item extends StatelessWidget {
|
||||
final Widget child;
|
||||
|
||||
const _Item({Key? key, required this.child}) : super(key: key);
|
||||
const _Item({Key key, this.child}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -83,18 +81,26 @@ class _Item extends StatelessWidget {
|
||||
class Detail extends StatefulWidget {
|
||||
final String assetName;
|
||||
|
||||
const Detail(this.assetName, {Key? key}) : super(key: key);
|
||||
const Detail(this.assetName, {Key key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_DetailState createState() => _DetailState();
|
||||
}
|
||||
|
||||
class _DetailState extends State<Detail> with TickerProviderStateMixin {
|
||||
late final _controller = AnimationController(vsync: this);
|
||||
AnimationController _controller;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
|
||||
_controller = AnimationController(vsync: this);
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_controller.dispose();
|
||||
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,7 @@ void main() async {
|
||||
class App extends StatelessWidget {
|
||||
final LottieComposition composition;
|
||||
|
||||
const App({Key? key, required this.composition}) : super(key: key);
|
||||
const App({Key key, this.composition}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -97,13 +97,13 @@ class App extends StatelessWidget {
|
||||
|
||||
class _Lottie extends StatefulWidget {
|
||||
final LottieComposition composition;
|
||||
final double? width;
|
||||
final double? height;
|
||||
final BoxFit? fit;
|
||||
final AlignmentGeometry? alignment;
|
||||
final double width;
|
||||
final double height;
|
||||
final BoxFit fit;
|
||||
final AlignmentGeometry alignment;
|
||||
|
||||
const _Lottie(this.composition,
|
||||
{Key? key, this.width, this.height, this.fit, this.alignment})
|
||||
{Key key, this.width, this.height, this.fit, this.alignment})
|
||||
: super(key: key);
|
||||
|
||||
@override
|
||||
@ -111,7 +111,7 @@ class _Lottie extends StatefulWidget {
|
||||
}
|
||||
|
||||
class __LottieState extends State<_Lottie> with TickerProviderStateMixin {
|
||||
late AnimationController _controller;
|
||||
AnimationController _controller;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -6,7 +6,7 @@ void main() async {
|
||||
}
|
||||
|
||||
class App extends StatelessWidget {
|
||||
const App({Key? key}) : super(key: key);
|
||||
const App({Key key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
@ -6,7 +6,7 @@ void main() async {
|
||||
}
|
||||
|
||||
class App extends StatelessWidget {
|
||||
const App({Key? key}) : super(key: key);
|
||||
const App({Key key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
@ -24,4 +24,4 @@ SPEC CHECKSUMS:
|
||||
|
||||
PODFILE CHECKSUM: d8ba9b3e9e93c62c74a660b46c6fcb09f03991a7
|
||||
|
||||
COCOAPODS: 1.10.0
|
||||
COCOAPODS: 1.9.1
|
||||
|
@ -330,10 +330,10 @@
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
inputFileListPaths = (
|
||||
);
|
||||
name = "[CP] Embed Pods Frameworks";
|
||||
outputPaths = (
|
||||
outputFileListPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
|
@ -7,63 +7,77 @@ packages:
|
||||
name: archive
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.0.0-nullsafety.0"
|
||||
version: "2.0.11"
|
||||
args:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: args
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.5.2"
|
||||
async:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: async
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.5.0-nullsafety.3"
|
||||
version: "2.5.0-nullsafety.1"
|
||||
boolean_selector:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: boolean_selector
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.0-nullsafety.3"
|
||||
version: "2.1.0-nullsafety.1"
|
||||
characters:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: characters
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.1.0-nullsafety.5"
|
||||
version: "1.1.0-nullsafety.3"
|
||||
charcode:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: charcode
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.2.0-nullsafety.3"
|
||||
version: "1.2.0-nullsafety.1"
|
||||
clock:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: clock
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.1.0-nullsafety.3"
|
||||
version: "1.1.0-nullsafety.1"
|
||||
collection:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: collection
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.15.0-nullsafety.5"
|
||||
version: "1.15.0-nullsafety.3"
|
||||
convert:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: convert
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.1"
|
||||
crypto:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: crypto
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.0.0-nullsafety.0"
|
||||
version: "2.1.3"
|
||||
fake_async:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: fake_async
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.2.0-nullsafety.3"
|
||||
version: "1.2.0-nullsafety.1"
|
||||
ffi:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -89,7 +103,7 @@ packages:
|
||||
name: flutter_colorpicker
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.4.0-nullsafety.0"
|
||||
version: "0.3.4"
|
||||
flutter_test:
|
||||
dependency: "direct dev"
|
||||
description: flutter
|
||||
@ -101,7 +115,7 @@ packages:
|
||||
name: golden_toolkit
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.9.0-nullsafety.0"
|
||||
version: "0.6.0"
|
||||
http:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -129,42 +143,42 @@ packages:
|
||||
name: logging
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.0-nullsafety.0"
|
||||
version: "0.11.4"
|
||||
lottie:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
path: ".."
|
||||
relative: true
|
||||
source: path
|
||||
version: "0.8.0-nullsafety.0"
|
||||
version: "0.7.0+1"
|
||||
matcher:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: matcher
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.12.10-nullsafety.3"
|
||||
version: "0.12.10-nullsafety.1"
|
||||
meta:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: meta
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.3.0-nullsafety.6"
|
||||
version: "1.3.0-nullsafety.3"
|
||||
path:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.8.0-nullsafety.3"
|
||||
version: "1.8.0-nullsafety.1"
|
||||
path_provider:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: path_provider
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.6.27"
|
||||
version: "1.6.21"
|
||||
path_provider_linux:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -178,28 +192,28 @@ packages:
|
||||
name: path_provider_macos
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.0.4+8"
|
||||
version: "0.0.4+4"
|
||||
path_provider_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path_provider_platform_interface
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.4"
|
||||
version: "1.0.3"
|
||||
path_provider_windows:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path_provider_windows
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.0.4+3"
|
||||
version: "0.0.4+1"
|
||||
pedantic:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: pedantic
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.9.2"
|
||||
version: "1.8.0+1"
|
||||
platform:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -232,70 +246,70 @@ packages:
|
||||
name: source_span
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.8.0-nullsafety.4"
|
||||
version: "1.8.0-nullsafety.2"
|
||||
stack_trace:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: stack_trace
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.10.0-nullsafety.6"
|
||||
version: "1.10.0-nullsafety.1"
|
||||
stream_channel:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: stream_channel
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.0-nullsafety.3"
|
||||
version: "2.1.0-nullsafety.1"
|
||||
string_scanner:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: string_scanner
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.1.0-nullsafety.3"
|
||||
version: "1.1.0-nullsafety.1"
|
||||
term_glyph:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: term_glyph
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.2.0-nullsafety.3"
|
||||
version: "1.2.0-nullsafety.1"
|
||||
test_api:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: test_api
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.2.19-nullsafety.6"
|
||||
version: "0.2.19-nullsafety.2"
|
||||
typed_data:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: typed_data
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.3.0-nullsafety.5"
|
||||
version: "1.3.0-nullsafety.3"
|
||||
vector_math:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: vector_math
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.0-nullsafety.5"
|
||||
version: "2.1.0-nullsafety.3"
|
||||
win32:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: win32
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.7.4"
|
||||
version: "1.7.3"
|
||||
xdg_directories:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: xdg_directories
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.1.2"
|
||||
version: "0.1.0"
|
||||
sdks:
|
||||
dart: ">=2.12.0-29.10.beta <3.0.0"
|
||||
flutter: ">=1.24.0-10.2.pre <2.0.0"
|
||||
dart: ">=2.10.0-110 <2.11.0"
|
||||
flutter: ">=1.12.13+hotfix.5 <2.0.0"
|
||||
|
@ -1,14 +1,14 @@
|
||||
name: lottie_example
|
||||
description: A sample app for the Lottie player
|
||||
publish_to: none
|
||||
version: 0.0.1
|
||||
|
||||
environment:
|
||||
sdk: ">=2.12.0-0 <3.0.0"
|
||||
sdk: ">=2.7.0 <3.0.0"
|
||||
|
||||
dependencies:
|
||||
flutter:
|
||||
sdk: flutter
|
||||
flutter_colorpicker: ^0.4.0-nullsafety.0
|
||||
flutter_colorpicker:
|
||||
http:
|
||||
lottie:
|
||||
path: ../
|
||||
@ -17,7 +17,7 @@ dependencies:
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
golden_toolkit: ^0.9.0-nullsafety.0
|
||||
golden_toolkit:
|
||||
|
||||
# For information on the generic Dart part of this file, see the
|
||||
# following page: https://dart.dev/tools/pub/pubspec
|
||||
@ -31,7 +31,6 @@ flutter:
|
||||
- assets/lottiefiles/
|
||||
- assets/Mobilo/
|
||||
- assets/Tests/
|
||||
- assets/Tests/images/
|
||||
- assets/Logo/
|
||||
- assets/Images/
|
||||
- assets/Images/WeAccept/
|
||||
|
@ -7,7 +7,7 @@ import 'package:lottie/lottie.dart';
|
||||
import 'utils.dart';
|
||||
|
||||
void main() {
|
||||
late LottieComposition composition;
|
||||
LottieComposition composition;
|
||||
|
||||
setUpAll(() async {
|
||||
composition = await LottieComposition.fromBytes(
|
||||
@ -15,13 +15,16 @@ void main() {
|
||||
});
|
||||
|
||||
void testGolden(String description, ValueDelegate delegate,
|
||||
{double? progress}) async {
|
||||
{double progress}) async {
|
||||
var screenshotName = description
|
||||
.toLowerCase()
|
||||
.replaceAll(RegExp('[^a-z0-9 ]'), '')
|
||||
.replaceAll(' ', '_');
|
||||
|
||||
testWidgets(description, (tester) async {
|
||||
tester.binding.window.physicalSizeTestValue = Size(500, 400);
|
||||
tester.binding.window.devicePixelRatioTestValue = 1.0;
|
||||
|
||||
var animation =
|
||||
AnimationController(vsync: tester, duration: composition.duration);
|
||||
if (progress != null) {
|
||||
@ -288,8 +291,8 @@ void main() {
|
||||
testGolden(
|
||||
'Opacity interpolation ($progress)',
|
||||
ValueDelegate.transformOpacity(['Shape Layer 1', 'Rectangle'],
|
||||
callback: (frameInfo) => lerpDouble(10, 100,
|
||||
Curves.linear.transform(frameInfo.overallProgress))!
|
||||
callback: (frameInfo) => lerpDouble(
|
||||
10, 100, Curves.linear.transform(frameInfo.overallProgress))
|
||||
.round()),
|
||||
progress: progress);
|
||||
}
|
||||
|
@ -6,6 +6,9 @@ import 'package:lottie/lottie.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('Dynamic test', (tester) async {
|
||||
tester.binding.window.physicalSizeTestValue = Size(500, 400);
|
||||
tester.binding.window.devicePixelRatioTestValue = 1.0;
|
||||
|
||||
var composition = await LottieComposition.fromBytes(
|
||||
File('assets/Tests/DynamicText.json').readAsBytesSync());
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import 'dart:async';
|
||||
import 'package:golden_toolkit/golden_toolkit.dart';
|
||||
|
||||
Future<void> testExecutable(FutureOr<void> Function() testMain) async {
|
||||
Future<void> main(FutureOr<void> Function() testMain) async {
|
||||
await loadAppFonts();
|
||||
return testMain();
|
||||
}
|
||||
|
@ -16,8 +16,7 @@ void main() {
|
||||
var size = Size(500, 400);
|
||||
tester.binding.window.physicalSizeTestValue = size;
|
||||
tester.binding.window.devicePixelRatioTestValue = 1.0;
|
||||
var composition =
|
||||
(await tester.runAsync(() => FileLottie(asset).load()))!;
|
||||
var composition = await tester.runAsync(() => FileLottie(asset).load());
|
||||
|
||||
await tester.pumpWidget(FilmStrip(composition, size: size));
|
||||
|
||||
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 9.5 KiB After Width: | Height: | Size: 9.5 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 9.0 KiB |
Before Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 43 KiB |
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 7.5 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 6.4 KiB |
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 6.9 KiB |
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 6.6 KiB |
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 6.5 KiB |
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 6.0 KiB |
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 6.6 KiB |
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 6.2 KiB |