Git Product home page Git Product logo

flutterdemo's Introduction

Hi, I'm kaina404 🔥

For All



Github

flutterdemo's People

Contributors

kaina404 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

flutterdemo's Issues

gesturedetector 手势冲突

在使用BottomDragWidget中 drawer: getListView()的widget里面有两个独立的gesturedetector,抽屉没有拉起来之前,这个手势不生效,目前分析是事件穿透了,需要阻止事件单独处理

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
],
),
);
}

事件会走MyVerticalDragGestureRecognizer

@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);
}
}

应该这个理冲突了,已经尝试过去掉或者分开写手势但是不生效,最后竞技场还是会被clean

Google

Text(
item.subject.title,
maxLines: 1,
overflow: TextOverflow.ellipsis,
)Text(
item.subject.title,
maxLines: 1,
overflow: TextOverflow.ellipsis,
)

测试

具体内容哈哈哈
加油

Good Luck

Good Luck !!

  • Hello
  • Java
  • Swift
  • Dart

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.