flutter_mobile_carousel 1.0.2

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • new49

Flutter carousel #

Flutter carousel slider widget, allow render cells with Drag-and-drop animation.

Installation #

Add flutter_mobile_carousel: ^1.0.2 in your pubspec.yaml dependencies. Import the library via:

import 'package:flutter_mobile_carousel/carousel.dart';

Run example #

In repository directory run this commands in terminal:

cd example
flutter run

demo.gif

Usage #

Create simple Carousel widget:

Carousel(
  rowCount: 3,
  children: [
    'Item 1',
    'Item 2',
    'Item 3',
    'Item 4',
    'Item 5',
    'Item 6',
  ].map((String itemText) {
    return DefaultCarouselItem(itemText);
  }).toList()
),

You can watch more examples in example directory

[1.0.2]

Initial version.

example/README.md

Example #

Create simple Carousel widget:

Carousel(
  rowCount: 3,
  children: [
    'Item 1',
    'Item 2',
    'Item 3',
    'Item 4',
    'Item 5',
    'Item 6',
  ].map((String itemText) {
    return DefaultCarouselItem(itemText);
  }).toList()
),

Use this package as a library

1. Depend on it

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


dependencies:
  flutter_mobile_carousel: ^1.0.2

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter packages get

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

3. Import it

Now in your Dart code, you can use:


import 'package:flutter_mobile_carousel/carousel.dart';
import 'package:flutter_mobile_carousel/carousel_arrow.dart';
import 'package:flutter_mobile_carousel/default_carousel_item.dart';
import 'package:flutter_mobile_carousel/types.dart';
  
Version Uploaded Documentation Archive
1.0.2 Apr 17, 2019 Go to the documentation of flutter_mobile_carousel 1.0.2 Download flutter_mobile_carousel 1.0.2 archive
1.0.1 Apr 17, 2019 Go to the documentation of flutter_mobile_carousel 1.0.1 Download flutter_mobile_carousel 1.0.1 archive
1.0.0 Apr 17, 2019 Go to the documentation of flutter_mobile_carousel 1.0.0 Download flutter_mobile_carousel 1.0.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
97
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
49
Learn more about scoring.

We analyzed this package on Apr 17, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.2.0
  • pana: 0.12.14
  • Flutter: 1.4.7

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health suggestions

Fix lib/carousel.dart. (-2.96 points)

Analysis of lib/carousel.dart reported 6 hints, including:

line 16 col 7: This class (or a class which this class inherits from) is marked as '@immutable', but one or more of its instance fields are not final: Carousel.rowCount, Carousel.leftArrow, Carousel.rightArrow, Carousel.children, Carousel.onDragStart, Carousel.onDrag, Carousel.onDragEnd

line 52 col 20: Name non-constant identifiers using lowerCamelCase.

line 55 col 20: Name non-constant identifiers using lowerCamelCase.

line 117 col 64: Avoid using unnecessary statements.

line 125 col 54: Avoid using unnecessary statements.

Fix lib/default_carousel_item.dart. (-0.50 points)

Analysis of lib/default_carousel_item.dart reported 1 hint:

line 4 col 7: This class (or a class which this class inherits from) is marked as '@immutable', but one or more of its instance fields are not final: DefaultCarouselItem.text

Format lib/carousel_arrow.dart.

Run flutter format to format lib/carousel_arrow.dart.

Format lib/types.dart.

Run flutter format to format lib/types.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11
meta 1.1.6 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test