@@ -92,7 +92,10 @@ class _AnimationViewState extends State<AnimationView> {
9292 if (doc == null ) {
9393 _ticker? .cancel ();
9494 _ticker = null ;
95- return const dom.div (classes: 'hui-animation-player is-empty' , < Widget > []);
95+ return const dom.div (
96+ classes: 'hui-animation-player is-empty' ,
97+ < Widget > [],
98+ );
9699 }
97100 _syncTicker (doc);
98101 final String id = _store.menuId;
@@ -103,7 +106,10 @@ class _AnimationViewState extends State<AnimationView> {
103106 dom.div (classes: 'hui-animation-frame-stage' , < Widget > [
104107 dom.div (classes: 'hui-animation-frame-large' , < Widget > [
105108 GlossTextLine (
106- render: renderGlossLine (frame, emoji: _store.workspaceEmoji),
109+ render: renderGlossAnimationFramePreview (
110+ frame,
111+ emoji: _store.workspaceEmoji,
112+ ),
107113 ),
108114 ]),
109115 dom.div (classes: 'hui-animation-frame-meta' , < Widget > [
@@ -171,39 +177,40 @@ class _AnimationViewState extends State<AnimationView> {
171177 ),
172178 ]);
173179
174- Widget _strip (GlossAnimationDoc doc, String id, int index) =>
175- dom. div ( classes: 'hui-animation-strip' , < Widget > [
176- for ( int i = 0 ; i < doc.frames.length; i ++ )
177- dom. button (
178- classes : 'hui-animation-strip-frame${ i == index ? ' is-active' : '' }' ,
179- attributes : < String , String > {
180- 'type' : 'button' ,
181- 'aria-label ': 'Show frame ${ i + 1 } ' ,
182- } ,
183- events : < String , EventCallback > {
184- 'click' : ( Object ? _) => setState (() => _player. scrubTo (i, doc)),
185- } ,
186- < Widget > [
187- dom. span (classes : 'hui-animation-strip-index' , < Widget > [
188- Text ( '${ i + 1 }' ),
189- ] ),
190- GlossTextLine (
191- render : renderGlossLine (
192- doc.frames[i],
193- emoji : _store.workspaceEmoji ,
194- ) ,
180+ Widget _strip (GlossAnimationDoc doc, String id, int index) => dom. div (
181+ classes: 'hui-animation-strip' ,
182+ < Widget > [
183+ for ( int i = 0 ; i < doc.frames.length; i ++ )
184+ dom. button (
185+ classes : 'hui-animation-strip-frame${ i == index ? ' is-active' : '' }' ,
186+ attributes : < String , String > {
187+ 'type ': 'button ' ,
188+ 'aria-label' : 'Show frame ${ i + 1 }' ,
189+ },
190+ events : < String , EventCallback > {
191+ 'click' : ( Object ? _) => setState (() => _player. scrubTo (i, doc)) ,
192+ },
193+ < Widget > [
194+ dom. span (classes : 'hui-animation-strip-index' , < Widget > [
195+ Text ( '${ i + 1 }' ),
196+ ]),
197+ GlossTextLine (
198+ render : renderGlossAnimationFramePreview (
199+ doc.frames[i] ,
200+ emoji : _store.workspaceEmoji ,
195201 ),
196- ],
197- ),
198- ]);
202+ ),
203+ ],
204+ ),
205+ ],
206+ );
199207
200208 /// The range input's value, off `event.target.value` .
201209 static String ? _rangeValue (Object ? event) {
202210 final JSObject ? object = event as JSObject ? ;
203211 final JSAny ? target = object? .getProperty <JSAny ?>('target' .toJS);
204212 if (target == null || ! target.isA <JSObject >()) return null ;
205- final JSAny ? value =
206- (target as JSObject ).getProperty <JSAny ?>('value' .toJS);
213+ final JSAny ? value = (target as JSObject ).getProperty <JSAny ?>('value' .toJS);
207214 return value.isA <JSString >() ? (value! as JSString ).toDart : null ;
208215 }
209216}
0 commit comments