info_ui_package 1.2.3 copy "info_ui_package: ^1.2.3" to clipboard
info_ui_package: ^1.2.3 copied to clipboard

discontinued
retracted[pending analysis]

A Flutter package for creating beautiful and customizable list UIs with headers, cards, and more.

info_ui_package #

A Flutter package that provides a set of UI components for displaying information in a consistent and beautiful way.

Features #

  • InfoList: A flexible list widget that can display any type of data with consistent styling
  • Built-in AsyncValue support for handling loading and error states
  • InfoCard: A card widget that wraps content with a header and body
  • InfoHeader: A header widget for InfoCard with customizable title and style
  • Support for customizable styling and layouts

Getting started #

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

dependencies:
  info_ui_package: ^1.2.3
  flutter_riverpod: ^2.5.1  # Required for AsyncValue support

Usage #

Basic InfoList Usage #

InfoList(
  items: yourItems,
  buildItem: (item) => YourCustomItemWidget(item: item),
  backgroundColor: Colors.white,
  contentPadding: EdgeInsets.zero,
)

InfoList with AsyncValue Support #

InfoList.when(
  value: yourAsyncData,  // AsyncValue<List<YourType>>
  buildItem: (item) => YourCustomItemWidget(item: item),
  shrinkWrap: false,
  physics: const BouncingScrollPhysics(),
  backgroundColor: Colors.white,
  contentPadding: EdgeInsets.zero,
  itemDecoration: const BoxDecoration(
    border: Border(
      bottom: BorderSide(
        color: Colors.grey,
      ),
    ),
  ),
)

InfoList Example

Complete Example with InfoCard #

Info(
  card: InfoCard(
    header: InfoHeader(
      title: 'Patient Information',
      titleStyle: Theme.of(context).textTheme.titleLarge,
      backgroundColor: Colors.white,
    ),
    body: InfoList.when(
      value: patientData,  // AsyncValue<List<Patient>>
      buildItem: (patient) => PatientInfoItem(patient: patient),
      shrinkWrap: false,
      physics: const BouncingScrollPhysics(),
      backgroundColor: Colors.white,
      contentPadding: EdgeInsets.zero,
      itemDecoration: const BoxDecoration(
        border: Border(
          bottom: BorderSide(
            color: Colors.grey,
          ),
        ),
      ),
    ),
  ),
)

Additional Information #

InfoList Parameters #

  • items: List of items to display
  • buildItem: Function to build each item widget
  • backgroundColor: Background color of the list
  • contentPadding: Padding around the list content
  • shrinkWrap: Whether the list should shrink-wrap its content
  • separatorBuilder: Custom separator builder between items
  • physics: Scroll physics for the list
  • itemPadding: Padding for each item
  • itemDecoration: Decoration for each item container
  • removeTopPadding: Whether to remove top padding

AsyncValue Support #

The InfoList.when constructor automatically handles:

  • Loading state with a centered CircularProgressIndicator
  • Error state with a selectable error message
  • Data state with your custom item builder

InfoCard Parameters #

  • header: InfoHeader widget for the card title
  • body: Content to display in the card body

InfoHeader Parameters #

  • title: Text to display in the header
  • titleStyle: Text style for the title
  • backgroundColor: Background color of the header

Dependencies #

  • flutter_riverpod: ^2.5.1 (Required for AsyncValue support)
  • flutter_screenutil: ^5.9.0
  • google_fonts: ^6.1.0
  • cached_network_image: ^3.3.1

Contributing #

Contributions are welcome! Please feel free to submit a Pull Request.

License #

This project is licensed under the MIT License - see the LICENSE file for details.

0
likes
0
points
20
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package for creating beautiful and customizable list UIs with headers, cards, and more.

Repository (GitHub)
View/report issues

License

(pending) (license)

Dependencies

cached_network_image, flutter, flutter_riverpod, flutter_screenutil, google_fonts, riverpod_annotation

More

Packages that depend on info_ui_package