voyager_list 0.2.0

pub package Codemagic build status codecov

voyager_list #

Allows mapping a list of arbitrary objects to a list view.

voyager-keynote 001

Usage #

Say you have 3 different classes...

class Shoe {
    final id;
    final name;

class Bulb {
    final id;
    final name;

class Duck {
    final id;
    final name;

...a mixed list of items of these types:

final items = [
    Shoe("mk", "Mike"),
    Bulb("bl", "Phillip"),
    Duck("rb", "Rubber")

and respective widgets:

class ShoeWidget extends StatelessWidget {
  Widget build(BuildContext context) {
    final Shoe shoe = Provider.of<VoyagerArgument>(context).value;
    return Text("Shoe: ${}");

class DuckWidget extends StatelessWidget {
  Widget build(BuildContext context) {
    final Duck duck = Provider.of<VoyagerArgument>(context).value;
    return Text("Duck: ${}");

class BulbWidget extends StatelessWidget {
  Widget build(BuildContext context) {
    final Bulb bulb = Provider.of<VoyagerArgument>(context).value;
    return Text("Bulb: ${}");

You can simply map your object list to a list view:

String idMapper(dynamic item) =>;
String objectMapper(dynamic item) =>
VoyagerListView(items, idMapper, objectMapper);

provided your navigation map specifies following mapping:

  type: object_item
  widget: "%{className}Widget"

0.2.0 #

  • Use voyager 2.0.0

0.1.0 #

  • Use provider 4.0.0

0.0.2 #

  • Change dependencies constraints

0.0.1 #

  • Moved out VoyagerListView code from main voyager package to external package

Use this package as a library

1. Depend on it

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

  voyager_list: ^0.2.0

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:voyager_list/voyager_list.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 Feb 12, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.5
  • Flutter: 1.12.13+hotfix.7

Maintenance suggestions

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and voyager_list.dart. Packages with multiple examples should provide example/

For more information see the pub package layout conventions.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
provider ^4.0.0 4.0.4 4.1.0-dev
voyager ^2.0.0+1 2.0.0+1
Transitive dependencies
charcode 1.1.3
collection 1.14.11 1.14.12
meta 1.1.8
nested 0.0.4
path 1.6.4
sky_engine 0.0.99
source_span 1.6.0
sprintf 4.0.2
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
vector_math 2.0.8
yaml 2.2.0
Dev dependencies