Closed cjl84914 closed 6 months ago
json:
{ "v": "5.12.2", "fr": 30, "ip": 0, "op": 30, "w": 500, "h": 500, "nm": "合成 1", "ddd": 0, "assets": [], "layers": [ { "ddd": 0, "ind": 1, "ty": 4, "nm": "形状", "sr": 1, "ks": { "o": { "a": 0, "k": 100, "ix": 11 }, "r": { "a": 0, "k": 0, "ix": 10 }, "p": { "a": 0, "k": [ 111, 102, 0 ], "ix": 2, "l": 2 }, "a": { "a": 0, "k": [ 0, 0, 0 ], "ix": 1, "l": 2 }, "s": { "a": 0, "k": [ 100, 100, 100 ], "ix": 6, "l": 2 } }, "ao": 0, "shapes": [ { "ty": "gr", "it": [ { "ty": "rc", "d": 1, "s": { "a": 0, "k": [ 38.172, 38.172 ], "ix": 2 }, "p": { "a": 0, "k": [ 0, 0 ], "ix": 3 }, "r": { "a": 0, "k": 0, "ix": 4 }, "nm": "Rectangle Path 1", "mn": "ADBE Vector Shape - Rect", "hd": false }, { "ty": "fl", "c": { "a": 0, "k": [ 0.928263008595, 0, 0, 1 ], "ix": 4 }, "o": { "a": 0, "k": 100, "ix": 5 }, "r": 1, "bm": 0, "nm": "Fill 1", "mn": "ADBE Vector Graphic - Fill", "hd": false }, { "ty": "tr", "p": { "a": 0, "k": [ -46.414, -42.414 ], "ix": 2 }, "a": { "a": 0, "k": [ 0, 0 ], "ix": 1 }, "s": { "a": 0, "k": [ 100, 100 ], "ix": 3 }, "r": { "a": 0, "k": 0, "ix": 6 }, "o": { "a": 0, "k": 100, "ix": 7 }, "sk": { "a": 0, "k": 0, "ix": 4 }, "sa": { "a": 0, "k": 0, "ix": 5 }, "nm": "变换" } ], "nm": "方形", "np": 3, "cix": 2, "bm": 0, "ix": 2, "mn": "ADBE Vector Group", "hd": false }, { "ty": "gr", "it": [ { "ty": "sr", "sy": 1, "d": 1, "pt": { "a": 0, "k": 5, "ix": 3 }, "p": { "a": 0, "k": [ 0, 0 ], "ix": 4 }, "r": { "a": 0, "k": 0, "ix": 5 }, "ir": { "a": 0, "k": 11, "ix": 6 }, "is": { "a": 0, "k": 0, "ix": 8 }, "or": { "a": 0, "k": 28.99, "ix": 7 }, "os": { "a": 0, "k": 0, "ix": 9 }, "ix": 1, "nm": "Polystar Path 1", "mn": "ADBE Vector Shape - Star", "hd": false }, { "ty": "fl", "c": { "a": 0, "k": [ 0.928263008595, 0, 0, 1 ], "ix": 4 }, "o": { "a": 0, "k": 100, "ix": 5 }, "r": 1, "bm": 0, "nm": "Fill 1", "mn": "ADBE Vector Graphic - Fill", "hd": false }, { "ty": "tr", "p": { "a": 0, "k": [ 35, 43 ], "ix": 2 }, "a": { "a": 0, "k": [ 0, 0 ], "ix": 1 }, "s": { "a": 0, "k": [ 100, 100 ], "ix": 3 }, "r": { "a": 0, "k": 0, "ix": 6 }, "o": { "a": 0, "k": 100, "ix": 7 }, "sk": { "a": 0, "k": 0, "ix": 4 }, "sa": { "a": 0, "k": 0, "ix": 5 }, "nm": "变换" } ], "nm": "Star", "np": 2, "cix": 2, "bm": 0, "ix": 3, "mn": "ADBE Vector Group", "hd": false } ], "ip": 0, "op": 61.0610610610611, "st": 0, "ct": 1, "bm": 0 } ], "markers": [], "props": {} }
flutter code:
class _Animation2 extends StatefulWidget { @override State<_Animation2> createState() => _AnimationState2(); } class _AnimationState2 extends State<_Animation2> { @override Widget build(BuildContext context) { return Lottie.asset( 'assets/测试.json', delegates: LottieDelegates( text: (initialText) => '**$initialText**', values: [ ValueDelegate.color( const ['形状', 'Star', 'Fill 1'], value: Colors.yellow, ), ValueDelegate.position( const ['形状', '方形', '**'], value: const Offset(120, 250), ), ValueDelegate.position( const ['形状', 'Star', '**'], value: const Offset(120, 250), ), ], ), ); } }
Star position has not changed.
json:
flutter code:
Star position has not changed.