skeletons 0.0.1 copy "skeletons: ^0.0.1" to clipboard
skeletons: ^0.0.1 copied to clipboard

outdated

A Flutter package for building custom skeleton widgets to mimic the page's layout while loading.

Skeletons #

A Flutter package for building custom skeleton widgets to mimic the page's layout while loading.

Examples #

Items
items paragraphs
ListView (Default) ListView (Custom)
listview_default listview_custom
SkeletonTheme Light/Dark modes
skeleton_theme light_dark_modes
Right-To-Left Custom Shimmer
rtl custom_shimmer

All examples can be found here examples.

How To Use #

Can be used by encapsulating the child widget in a Skeleton widget:

import 'package:skeletons/skeletons.dart';

Skeleton(
        isLoading: _isLoading,
        skeleton: SkeletonListView(),
        child: Container(child: Center(child: Text("Content"))),
      )

or directly:

Container(
    child: _isLoading 
    ? SkeletonListView() 
    : Container(child: Center(
                       child: Text("Content"))),
)

a SkeletonTheme can be used to set the default configs for all skeleton descendants in the tree.

SkeletonTheme(
    // themeMode: ThemeMode.light,
    shimmerGradient: LinearGradient(
        colors: [
          Color(0xFFD8E3E7),
          Color(0xFFC8D5DA),
          Color(0xFFD8E3E7),
        ],
        stops: [
          0.1,
          0.5,
          0.9,
        ],
      ),
      darkShimmerGradient: LinearGradient(
        colors: [
          Color(0xFF222222),
          Color(0xFF242424),
          Color(0xFF2B2B2B),
          Color(0xFF242424),
          Color(0xFF222222),
        ],
        stops: [
          0.0,
          0.2,
          0.5,
          0.8,
          1,
        ],
        begin: Alignment(-2.4, -0.2),
        end: Alignment(2.4, 0.2),
        tileMode: TileMode.clamp,
      ),
        child: MateriaApp(
            ...
        ),
      ),

Issues and feedback #

For issues, please report here. Contributions are welcome.

332
likes
0
pub points
98%
popularity

Publisher

verified publisherbadjio.com

A Flutter package for building custom skeleton widgets to mimic the page's layout while loading.

Homepage
Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on skeletons