For All
kaina404 / flutterdemo Goto Github PK
View Code? Open in Web Editor NEWFlutter Widget的大部分demo以及示例代码
Flutter Widget的大部分demo以及示例代码
fewfewef
Widget getListView() {
return Container(
height: 450.0,
width: double.infinity,
color: Colors.white,
child: Column(
children: [
Container(
child: Image.asset(
"assets/images/note_listbar.png",
width: double.infinity,
height: 50,
fit: BoxFit.fill,
),
width: double.infinity,
),
Container(
margin: EdgeInsets.only(left: 15, right: 15, bottom: 10),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
"想法",
style:
TextStyle(fontSize: 18, color: SelectionColor.TitleColor),
),
Row(
children: [
GestureDetector( //这个事件
onTap: () {
Routes.router.navigateTo(context,
"${Routes.notesEdit}?fromByWho=addActicleNote&articleId=${articleDetail.data.id}&albumId=${widget.albumId}");
},
child: ExtendedText.rich(TextSpan(children: [
WidgetSpan(
child: Container(
margin: EdgeInsets.only(right: 5),
child: Image.asset(
"assets/images/write_note.png",
width: 18,
height: 18,
))),
TextSpan(
text: "写想法",
style: TextStyle(
fontSize: 14,
color: SelectionColor.Blue_2B8CFE))
])),
),
GestureDetector( //这个事件
onTap: () {
showModalBottomSheet(
context: context,
builder: (BuildContext context) {
return Container(
child: new ShareListView(
articleID: widget.articleId,
),
);
});
},
child: ExtendedText.rich(TextSpan(children: [
WidgetSpan(
child: Container(
margin: EdgeInsets.only(right: 5, left: 18),
child: Image.asset(
"assets/images/share_article.png",
width: 18,
height: 18,
))),
TextSpan(
text: "分享",
style: TextStyle(
fontSize: 14,
color: SelectionColor.Blue_2B8CFE))
])),
),
],
)
],
),
),
Expanded(child: newListView()) //这个是list
],
),
);
}
@OverRide
void handleEvent(PointerEvent event) {
super.handleEvent(event);
if (!event.synthesized &&
(event is PointerDownEvent || event is PointerMoveEvent)) {
final VelocityTracker tracker = _velocityTrackers[event.pointer];
assert(tracker != null);
tracker.addPosition(event.timeStamp, event.position);
}
}
OK
Text(
item.subject.title,
maxLines: 1,
overflow: TextOverflow.ellipsis,
)Text(
item.subject.title,
maxLines: 1,
overflow: TextOverflow.ellipsis,
)
老铁,listview 使用setState 加载更多数据之后,就捕捉不到 屏幕触发下拉事件了。不知道您是否发现过这个问题呢? 我仔细查看了下代码 当加载更多数据setState 之后 ,触发了DragContainer初始化,但是拖拽事件好像是被屏蔽掉了。无法监听
ffw
加快吃好吃健康
Originally posted by @kaina404 in #6 (comment)
具体内容哈哈哈
加油
fewfewf
Msg
HelloCentent
fewfwf
控件怎么用 给个demo吧
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.