slick_list_items 1.0.2 copy "slick_list_items: ^1.0.2" to clipboard
slick_list_items: ^1.0.2 copied to clipboard

discontinued
outdated

Collection of ListItems primarily designed to be used within ListViews.

A collection of ListItems primarily to be used within a ListView #

pub-package

twitter

About #

Collection of ListItem widgets.

Description #

This package contains a collection of ListItem widgets that are primarily designed to be used within ListViews. Some ListItems are optimized to display only textual information, some to display graphical information, while as some are optimized to display both textual as well as graphical information. Though, these ListItems are typically used within ListViews, however, there use in any case is not limited only to ListViews.

Using #

Simply import package: slick_list_items/slick_list_items.dart and choose one or all from the following:-

  • FlatListItem: A FlatListItem displays textual information. A FlatListItems is divided into three columns, wherein, first one on the left displays an icon, the second and the third columns both have 2 rows. The first row displays the label of the data it represents and the second row displays the data itself. Columns may be separted using a hanging divider in a FlatListItem. The rightDataText can be customized to choose between 10 different font families.
  • BrickListItem: A BrickListItem is created on the analogy of a wall and bricks. The container that holds all the widgets is called a 'wall' and the individual widgets within the wall are called 'bricks'. When bricks are added to the wall they automatically resize and position themselves to fit the wall. It also allows for nesting, i.e. you can nest BrickListItems within one another.
  • InfoListItem: An InfoListItem displays textual information. An InfoListItem displays an icon on the left and title, subTitle, and footer texts on the right. The text on the right adapts to the size of the icon on the left. It allows for nesting and automatically resizes itself if added to a widget with padding. It supports 10 different fonts for title, subtitle, and footer texts.

Using FlatListItem #

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

class TransactionsList extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return ListView.builder(
      itemBuilder: _buildList,
    );
  }

  Widget _buildList(BuildContext context, int index) {
    return FlatListItem.transparent(
      context: context,
      scalePreset: ScalePreset.minimal,
      icon: Icon(Icons.monetization_on, color: Colors.black,),
      leftLabelText: 'Amount',
      leftDataText: '0123456789',
      rightLabelText: 'Description',
      rightDataText: 'Bought grocery at...',
    );
  }
}

Using BrickListItem #

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

class TestPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Widget Test'),
      ),
      body: ListView.builder(
        itemBuilder: _buildList,
      ),
    );
  }

  Widget _buildList(BuildContext context, int index) {
    return BrickListItem.ocean(
      widgets: <Widget>[
        Icon(
          Icons.android,
          color: Colors.black,
        ),
        Text(
          'BrickListItem',
          style: TextStyle(color: Colors.brown),
        ),
      ],
    );
  }
}

Using InfoListItem #

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

class TestPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Widget Test'),
      ),
      body: ListView.builder(
        itemBuilder: _buildList,
      ),
    );
  }

  Widget _buildList(BuildContext context, int index) {
    return InfoListItem.whitePro(
      icon: Icon(Icons.android, size: 48.0,),
      titleText: 'When things go...',
      subTitleText: 'wrong as they sometimes will, when the road you are trudging',
      footerText: 'May 15th, 2019',
    );
  }
}

Screenshots #

FlatListItem FlatListItem FlatListItem FlatListItem InfoListItem InfoListItem InfoListItem InfoListItem InfoListItem InfoListItem InfoListItem

Feedback #

This project requires your valuable contribution to make it great. Please share your feedback either through email or follow me on twitter.

1
likes
30
pub points
0%
popularity

Publisher

unverified uploader

Collection of ListItems primarily designed to be used within ListViews.

Homepage

License

BSD-3-Clause (LICENSE)

Dependencies

flutter

More

Packages that depend on slick_list_items