skeleton_animation 0.1.4 copy "skeleton_animation: ^0.1.4" to clipboard
skeleton_animation: ^0.1.4 copied to clipboard

Display skeleton animations in your app. It works on android, iOS and the web.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:skeleton_animation/skeleton_animation.dart';

List tileList = [
  [null, null],
  [null, Colors.blue],
  [null, Colors.blue.shade900],
  [Colors.green, Colors.blue.shade900],
  [null, Colors.green],
  [null, Colors.green.shade900],
  [null, Colors.red],
  [null, Colors.red.shade200]
];

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text('Skeleton animation'),
        ),
        body: Container(
            child: CustomScrollView(
          slivers: [
            SliverList(
              delegate: SliverChildBuilderDelegate(
                  (context, i) => ListTile(
                        contentPadding: EdgeInsets.symmetric(horizontal: 16.0),
                        tileColor: tileList[i][1],
                        title: Skeleton(
                          style: SkeletonStyle.text,
                          textColor: tileList[i][0],
                          height: 14.0,
                        ),
                        subtitle: Text(
                          'Loaded Text',
                          style: TextStyle(color: tileList[i][0]),
                        ),
                        onTap: () {},
                      ),
                  childCount: tileList.length),
            )
          ],
        )),
      ),
      // enable dark mode
      darkTheme: ThemeData(brightness: Brightness.dark),
    );
  }
}
32
likes
130
pub points
88%
popularity

Publisher

verified publisherwjtje.dev

Display skeleton animations in your app. It works on android, iOS and the web.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on skeleton_animation