better_skeleton 0.1.0 copy "better_skeleton: ^0.1.0" to clipboard
better_skeleton: ^0.1.0 copied to clipboard

A flutter package to make better loading times using skeleton.

Glass effect - for your skeleton loading #

Show a glass effect using a single AnimationController over a list of Widgets.



Apparence.io logo

Developed with 💙  by Apparence.io

Apparence.io better skeleton plugin gif

Tldr - features? #

  • Show a glass effect using a single AnimationController over a list of Widgets

Getting Started #

Create an animation controller in repeat mode then just provide this controller to every AnimatedSkeleton. This effect is made using a custom RenderWidget.

Example of using:

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> with SingleTickerProviderStateMixin {
  late final AnimationController animationController;

  @override
  void initState() {
    super.initState();
    animationController = AnimationController(vsync: this, duration: Duration(milliseconds: 1000))..repeat();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Column(
          children: [
            SizedBox(height: 100),
            AnimatedSkeleton(
              listenable: animationController,
              child: FakeCard(),
            ),
            AnimatedSkeleton(
              listenable: animationController,
              child: FakeCard(),
            ),
            AnimatedSkeleton(
              listenable: animationController,
              child: FakeCard2(),
            ),
          ],
        ),
      ),
    );
  }
}

Note: FakeCard is a container widget we made with just a grey background. See example.

27
likes
150
points
3.71k
downloads

Publisher

verified publisherapparence.io

Weekly Downloads

A flutter package to make better loading times using skeleton.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, vector_math

More

Packages that depend on better_skeleton