v0.0.3circle_wheel_scroll
基于 Flutter 团队的 ListWheelScrollView 的 Flutter 圆形轮盘列表视图。
86喜欢 133近 30 天下载70Pub 分数
平台暂无数据
适用于 Flutter 的圆形轮盘滚动视图
以下为英文项目原文快照,最新内容请访问 GitHub。
Modified version of original ListWheelScrollView to create effect of scroling on circle.
To use plugin, just import package import 'package:circle_wheel_scroll/circle_wheel_scroll_view.dart';
import 'package:flutter/material.dart';
import 'package:circle_wheel_scroll/circle_wheel_scroll_view.dart';
class WheelExample extends StatelessWidget {
Widget _buildItem(int i) {
return Center(
child: ClipRRect(
borderRadius: BorderRadius.circular(40),
child: Container(
width: 80,
padding: EdgeInsets.all(20),
color: Colors.blue[100 * ((i % 8) + 1)],
child: Center(
child: Text(
i.toString(),
),
),
),
),
);
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Wheel'),
),
body: SafeArea(
child: Center(
child: Container(
// height: 260,
// width: 160,
child: CircleListScrollView(
physics: CircleFixedExtentScrollPhysics(),
axis: Axis.horizontal,
itemExtent: 80,
children: List.generate(20, _buildItem),
radius: MediaQuery.of(context).size.width * 0.6,
),
),
),
),
);
}
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: WheelExample(),
);
}
}
void main() => runApp(MyApp());
依赖清单 3 项
{"sdk":"flutter"}^2.1.4{"sdk":"flutter"}先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗