loadinglistview 0.0.2

  • Readme
  • Changelog
  • Example
  • Installing
  • 63

loadinglistview #

This package provide an easy way to show loading indicator(Widget) in a listview or a gridview while the app is still fetching the real data. Once the real data is fetched, the loading indicators are replaced with the actual data.

How it works #

  1. Provide a Future<List<T>>
  2. Provide a function that takes T and returns a widget
  3. Provide a loading widget

As regards the loading widget, there are two predefined highly customizable widgets that should work for most use cases. In case non of this two works for your use case, feel free to supply your custom widget

  1. ListTileLoadingStyle
  2. GridLoadingStyle

check the example folder to see how all these are connected together.

Basic Usage #

Given that loadPersons() return Future<List<Person>> and singlePersonWidget is of type Widget ContentWidget<T>(T data)

        futureData: loadPersons(),
        contentWidget: singlePersonWidget,
        loadingWidget: ListTileLoadingStyle(),
        futureData: loadPersons(),
        contentWidget: singlePersonWidget,
        loadingWidget: GridLoadingStyle(),

More customized loading widget

        leadingShape: BoxShape.rectangle,
        leadingSize: 70,
        titleWidth: 150,
        subtitleWidth: 120,
        titleBorderRadius: 0,
        subtitleBorderRadius: 0,

With shimmering effect

If you want a shimmering effect on the loading widget consider wrapping SkeletonAnimation around it.

License #

This package is licensed under the MIT license. See LICENSE for details.

[0.0.2] - April 10, 2020 #

  • Added a README.md file


import 'package:flutter/material.dart';

import 'profile_example.dart';
import 'restaurant_example.dart';
import 'youtube_example.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      // home: ColleagueExample(),
      home: RestaurantExample(),
      // home: YouTubeExample(),
      //home: FriendRequestExample(),

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  loadinglistview: ^0.0.2

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:loadinglistview/loadinglistview.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Jul 14, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.15
  • Flutter: 1.17.5

Analysis suggestions

Package not compatible with SDK dart


  • loadinglistview that is a package requiring null.

Maintenance suggestions

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.6.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.12 1.14.13
meta 1.1.8 1.2.2
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
vector_math 2.0.8 2.1.0-nullsafety
Dev dependencies