pit_carousel 0.2.1
Carousel by PIT #
Our custom Carousel
Note: This plugin is still under development, and some Components might not be available yet or still has so many bugs.
Installation #
First, add pit_carousel
as a dependency in your pubspec.yaml file.
pit_carousel: ^0.2.1
Example #
class PitCarouselDemo extends StatefulWidget {
@override
_PitCarouselDemoState createState() => _PitCarouselDemoState();
}
class _PitCarouselDemoState extends State<PitCarouselDemo> {
List<Widget> _pages = [
Image.network(
"http://androidcut.com/wp-content/uploads/2017/07/Boat-River-View-1920x1080-Portrait.jpg",
fit: BoxFit.cover),
Image.network(
"http://androidcut.com/wp-content/uploads/2017/08/Beach-Top-View-Wallpaper-Portrait-1920x1080.jpg",
fit: BoxFit.cover),
Image.network(
"http://www.sompaisoscatalans.cat/simage/8/85501/wallpaper-portrait-android.jpg",
fit: BoxFit.cover),
Image.network(
"https://c.wallhere.com/photos/dd/c9/architecture_building_skyscraper_blueprints_digital_art_3d_object_render_CGI-88920.jpg!d",
fit: BoxFit.cover),
Image.network("https://pbs.twimg.com/media/C2dVR-sWEAAaId7.jpg",
fit: BoxFit.cover),
Image.network(
"https://www.gambar.co.id/wp-content/uploads/2018/04/wallpaper-xiaomi-mi-a1-hd-download-hd-wallpapers-of-digital-art-portrait-display-of-wallpaper-xiaomi-mi-a1-hd.png",
fit: BoxFit.cover),
Image.network(
"http://htc-wallpaper.com/wp-content/uploads/2013/11/Moon1.jpg",
fit: BoxFit.cover),
];
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Plugin example app'),
),
body: AdvCarousel(
children: _pages,
dotAlignment: Alignment.topLeft,
height: double.infinity,
animationCurve: Curves.easeIn,
animationDuration: Duration(milliseconds: 300),
displayDuration: Duration(seconds: 3),
),
),
);
}
}
0.0.1 #
- Initial Release
0.0.2 #
- Add argument for dot position
0.0.3 #
- Bug fixes
0.0.4 #
- Bug fixes
0.1.0 #
- Initial stable release
0.2.0 #
- Upgrade to AndroidX
0.2.1 #
- Add placeholder argument for Carousel
example/README.md
import 'package:flutter/material.dart';
import 'package:pit_carousel/pit_carousel.dart';
void main() => runApp(PitCarouselDemo());
class PitCarouselDemo extends StatefulWidget {
@override
_PitCarouselDemoState createState() => _PitCarouselDemoState();
}
class _PitCarouselDemoState extends State<PitCarouselDemo> {
List<Widget> _pages = [
Image.network(
"http://androidcut.com/wp-content/uploads/2017/07/Boat-River-View-1920x1080-Portrait.jpg",
fit: BoxFit.cover),
Image.network(
"http://androidcut.com/wp-content/uploads/2017/08/Beach-Top-View-Wallpaper-Portrait-1920x1080.jpg",
fit: BoxFit.cover),
Image.network(
"http://www.sompaisoscatalans.cat/simage/8/85501/wallpaper-portrait-android.jpg",
fit: BoxFit.cover),
Image.network(
"https://c.wallhere.com/photos/dd/c9/architecture_building_skyscraper_blueprints_digital_art_3d_object_render_CGI-88920.jpg!d",
fit: BoxFit.cover),
Image.network("https://pbs.twimg.com/media/C2dVR-sWEAAaId7.jpg",
fit: BoxFit.cover),
Image.network(
"https://www.gambar.co.id/wp-content/uploads/2018/04/wallpaper-xiaomi-mi-a1-hd-download-hd-wallpapers-of-digital-art-portrait-display-of-wallpaper-xiaomi-mi-a1-hd.png",
fit: BoxFit.cover),
Image.network(
"http://htc-wallpaper.com/wp-content/uploads/2013/11/Moon1.jpg",
fit: BoxFit.cover),
];
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Plugin example app'),
),
body: AdvCarousel(
children: _pages,
dotAlignment: Alignment.topLeft,
height: double.infinity,
animationCurve: Curves.easeIn,
animationDuration: Duration(milliseconds: 300),
displayDuration: Duration(seconds: 3),
),
),
);
}
}
Use this package as a library
1. Depend on it
Add this to your package's pubspec.yaml file:
dependencies:
pit_carousel: ^0.2.1
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:pit_carousel/pit_carousel.dart';
Popularity:
Describes how popular the package is relative to other packages.
[more]
|
63
|
Health:
Code health derived from static analysis.
[more]
|
100
|
Maintenance:
Reflects how tidy and up-to-date the package is.
[more]
|
100
|
Overall:
Weighted score of the above.
[more]
|
81
|
We analyzed this package on Dec 5, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
- Dart: 2.6.1
- pana: 0.12.21
- Flutter: 1.9.1+hotfix.6
Platforms
Detected platforms: Flutter
References Flutter, and has no conflicting libraries.
Health suggestions
Format lib/pit_carousel.dart
.
Run flutter format
to format lib/pit_carousel.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 | 1.14.12 | |
meta | 1.1.7 | 1.1.8 | |
sky_engine | 0.0.99 | ||
typed_data | 1.1.6 | ||
vector_math | 2.0.8 |