v1.0.6carousel_indicator
인덱스를 인수로 받아 인디케이터 인덱스를 업데이트하는 최소 및 간단한 캐러셀 인디케이터 라이브러리입니다. 이 라이브러리는 사전 구축된 슬라이드 애니메이션이 포함되어 있습니다.
36좋아요 2.1천30일 다운로드140Pub 점수
AndroidiOSWebmacOSWindowsLinux
최소 및 간단한 카루셀 인디케이터 라이브러리
{"sdk":"flutter"}^1.0.4{"sdk":"flutter"}아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
A Minimal and Simple carousel indicator library.
Tech Skape (Love K.) techskape@gmail.com
showcases
import 'package:carousel_indicator/carousel_indicator.dart';
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
visualDensity: VisualDensity.adaptivePlatformDensity,
),
home: MyHomePage(),
);
}
}
class MyHomePage extends StatefulWidget {
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
int pageIndex=0;
List<Widget> _demo=[
Container(height: 300,color: Colors.amber),
Container(height: 300,color: Colors.black),
Container(height: 300,color: Colors.blue),
Container(height: 300,color: Colors.green),
];
@override
Widget build(BuildContext context) {
return Column(
children: [
Container(
height: 300,
width: double.infinity,
child: PageView(
children: _demo,
onPageChanged: (index){
setState(() {
pageIndex=index;
});
},
),
),
SizedBox(height: 40,),
CarouselIndicator(
count: _demo.length,
index: pageIndex,
),
],
);
}
}
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.