826327700 / flutter_plugins_demo Goto Github PK
View Code? Open in Web Editor NEW挑选日常app开发常用的轮子分享出来,给大家提高搬砖效率,同时也希望flutter的生态越来越完善,轮子越来越多。
挑选日常app开发常用的轮子分享出来,给大家提高搬砖效率,同时也希望flutter的生态越来越完善,轮子越来越多。
咱们现在弹出框只能拖动打开嘛?
我把官方的生成名称列表的demo加入了你的列表动画,但是 itemCount没设置。 只有首屏的10条有动画, 后面addAll的全部没动画。
Widget _buildSuggestions() {
return new ListView.builder(
padding: const EdgeInsets.all(16.0),
// 对于每个建议的单词对都会调用一次itemBuilder,然后将单词对添加到ListTile行中
// 在偶数行,该函数会为单词对添加一个ListTile row.
// 在奇数行,该函数会添加一个分割线widget,来分隔相邻的词对。
// 注意,在小屏幕上,分割线看起来可能比较吃力。
itemBuilder: (context, i) {
// 在每一列之前,添加一个1像素高的分隔线widget
if (i.isOdd) return new Divider();
// 语法 "i ~/ 2" 表示i除以2,但返回值是整形(向下取整),比如i为:1, 2, 3, 4, 5
// 时,结果为0, 1, 1, 2, 2, 这可以计算出ListView中减去分隔线后的实际单词对数量
final index = i ~/ 2;
// 如果是建议列表中最后一个单词对
if (index >= _suggestions.length - 1) {
// ...接着再生成10个单词对,然后添加到建议列表
_suggestions.addAll(generateWordPairs().take(10));
}
return AnimationConfiguration.staggeredList(
position: index,
duration: const Duration(milliseconds: 1000),
child: SlideAnimation( //滑动动画
verticalOffset: 50.0,
child: FadeInAnimation( //渐隐渐现动画
child: _buildRow(_suggestions[index]),
),
),
);
}
);
}
怎么实现圆角矩形进度条呢? 可以加载动态数据吗?
liquid_swipe: ^1.3.0 会报错
../../../environment/flutter/.pub-cache/hosted/pub.flutter-io.cn/liquid_swipe-1.3.0/lib/liquid_swipe.dart:209:20: Error: 'Page' is imported from both 'package:flutter/src/widgets/navigator.dart' and 'package:liquid_swipe/page.dart'.
child: Page(
原因是 liquid_swipe的Page和navigator的Page名字冲突了
建议写成: liquid_swipe: 1.5.0
不过如果之前如果引入过1.5.0版本, 这里写liquid_swipe: ^1.3.0 不会报错,因为本地有1.5.0版本
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.