Skip to content

Item Builder ⛑

Compare
Choose a tag to compare
@jogboms jogboms released this 04 Nov 12:21
· 126 commits to master since this release
f9f9d32

Before

SpinKitFadingCircle(
 color: Colors.white,
 size: 50.0,
);

Now, there is an itemBuilder alternative

SpinKitFadingCircle(
 itemBuilder: (_, int index) {
   return DecoratedBox(
     decoration: BoxDecoration(
       color: index.isEven ? Colors.red : Colors.green,
     ),
   );
 },
);

Which produces