GithubHelp home page GithubHelp logo

mgesmundo / cupertino_lists Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ivirtex/cupertino_lists

0.0 1.0 0.0 1004 KB

Package that implements iOS-style grouped lists.

License: MIT License

Kotlin 0.18% Swift 0.59% Objective-C 0.06% Dart 61.73% CMake 11.95% C++ 24.43% C 1.07%

cupertino_lists's Introduction

cupertino_lists

cupertino_lists is an implementation of iOS-style lists (grouped and inset grouped).

Warning:
This package probably will not be maintained after #78732 gets merged.

The left side is native, and the right side is cupertino_lists.

notes example reminders example settings example

Getting Started

Add the package to your pubspec.yaml:

cupertino_lists: ^1.0.1

Import the library:

import 'package:cupertino_lists/cupertino_lists.dart';

In order to create a modern inset grouped iOS-style list, you need to use the CupertinoListSection.insetGrouped() widget and CupertinoListTile.notched() as its children:

  // Code from the reminders app example above.
  @override
  Widget build(BuildContext context) {
    return CupertinoListSection.insetGrouped(
      header: const Text('My Lists'),
      children: const <CupertinoListTile>[
        CupertinoListTile.notched(
          title: Text('Reminders'),
          leading: _DummyIcon(
            color: CupertinoColors.activeBlue,
            icon: CupertinoIcons.list_bullet,
          ),
          additionalInfo: Text('4'),
          trailing: CupertinoListTileChevron(),
        ),
        CupertinoListTile.notched(
          title: Text('Old Reminders'),
          leading: _DummyIcon(
            color: CupertinoColors.systemYellow,
            icon: CupertinoIcons.list_bullet,
          ),
          additionalInfo: Text('42'),
          trailing: CupertinoListTileChevron(),
        ),
        CupertinoListTile.notched(
          title: Text('Important'),
          leading: _DummyIcon(
            color: CupertinoColors.systemRed,
            icon: CupertinoIcons.list_bullet,
          ),
          additionalInfo: Text('2'),
          trailing: CupertinoListTileChevron(),
        ),
      ],
    );
  }

CupertinoListTileChevron() is a convenience widget that can be used to display an iOS-style chevron on the trailing side of a CupertinoListTile.

If you need old edge-to-edge style, simply use base constructors for CupertinoListSection and CupertinoListTile.

Features, bugs and contributions

Feel free to contribute to this project.

Please file feature requests and bugs at the issue tracker. If you fixed a bug or implemented a feature by yourself, feel free to send a pull request.

cupertino_lists's People

Contributors

ivirtex avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.