How to Detect scroll on the widget underneath the stack?
I am trying to implement GuillotineMenu as per this tutorial and I managed to create the awesome animated menu but the listview below the menu does not detect the gesture(scroll). How can I send the scroll gesture to the listview? when I use IgnorePointer on the menu the scroll works but the menu does not. I can I detect gestures on both widgets on stack?
P.S In this code I have used gesture detector instead of listview
code:
home.dart
import 'package:Pixelitg/GuillotineMenu.dart';
import 'package:flutter/material.dart';
class Home extends StatefulWidget {
@override
_HomeState createState() => new _HomeState();
}
class _HomeState extends State<Home> {
@override
Widget build(BuildContext context) {
return SafeArea(
top: false,
bottom: false,
child: new Container(
child: new Stack(
alignment: Alignment.topLeft,
children: <Widget>[
new Page(),
new GuillotineMenu(),
],
),
),
);
}
}
GuillotineMenu:
import 'package:Pixelitg/news.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
class GuillotineMenu extends StatefulWidget {
@override
_GuillotineMenuState createState() => new _GuillotineMenuState();
}
enum _GuillotineAnimationStatus { closed, open, animating }
class _GuillotineMenuState extends State<GuillotineMenu>
with SingleTickerProviderStateMixin {
double pi = 22 / 7;
String _title = "Our Work";
AnimationController animationControllerMenu;
Animation<double> animationMenu;
Animation<double> animationTitleFadeInOut;
_GuillotineAnimationStatus menuAnimationStatus =
_GuillotineAnimationStatus.closed;
double rotationAngle = 0.0;
_handleMenuOpenClose() {
if (menuAnimationStatus == _GuillotineAnimationStatus.closed) {
animationControllerMenu.forward().orCancel;
} else if (menuAnimationStatus == _GuillotineAnimationStatus.open) {
animationControllerMenu.reverse().orCancel;
}
}
@override
void initState() {
super.initState();
///
/// Initialization of the animation controller
///
animationControllerMenu = new AnimationController(
duration: const Duration(milliseconds: 1000), vsync: this)
..addListener(() {
setState(() {});
})
..addStatusListener((AnimationStatus status) {
if (status == AnimationStatus.completed) {
///
/// When the animation is at the end, the menu is open
///
menuAnimationStatus = _GuillotineAnimationStatus.open;
} else if (status == AnimationStatus.dismissed) {
///
/// When the animation is at the beginning, the menu is closed
///
menuAnimationStatus = _GuillotineAnimationStatus.closed;
} else {
///
/// Otherwise the animation is running
///
menuAnimationStatus = _GuillotineAnimationStatus.animating;
}
});
animationTitleFadeInOut =
new Tween(begin: 1.0, end: 0.0).animate(new CurvedAnimation(
parent: animationControllerMenu,
curve: new Interval(
0.0,
0.5,
curve: Curves.ease,
),
));
animationMenu =
new Tween(begin: -pi / 2.0, end: 0.0).animate(new CurvedAnimation(
parent: animationControllerMenu,
curve: Curves.bounceOut,
reverseCurve: Curves.bounceIn,
));
///
/// Initialization of the menu appearance animation
///
new Tween(begin: -pi / 2.0, end: 0.0).animate(animationControllerMenu);
}
@override
void dispose() {
animationControllerMenu.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
MediaQueryData mediaQueryData = MediaQuery.of(context);
double screenWidth = mediaQueryData.size.width;
double screenHeight = mediaQueryData.size.height;
return new Material(
color: Colors.transparent,
child: new Transform.rotate(
angle: animationMenu.value,
origin: new Offset(24.0, 56.0),
alignment: Alignment.topLeft,
child: Container(
width: screenWidth,
height: screenHeight,
color: Color(0xFF333333),
child: new Stack(
children: <Widget>[
_buildMenuTitle(),
_buildMenuIcon(),
_buildMenuContent(),
],
),
),
),
);
}
///
/// Menu Title
///
Widget _buildMenuTitle() {
double screenWidth = MediaQuery.of(context).size.width;
return new Positioned(
top: 32.0,
left: 40.0,
width: screenWidth,
height: 24.0,
child: new Transform.rotate(
alignment: Alignment.topLeft,
origin: Offset.zero,
angle: pi / 2.0,
child: new Center(
child: new Container(
width: double.infinity,
height: double.infinity,
child: new Opacity(
opacity: animationTitleFadeInOut.value,
child: new Text(_title,
textAlign: TextAlign.center,
style: new TextStyle(
color: Colors.white,
fontSize: 20.0,
fontWeight: FontWeight.bold,
letterSpacing: 2.0,
)),
),
),
)),
);
}
///
/// Menu Icon
///
Widget _buildMenuIcon() {
return new Positioned(
top: 32.0,
left: 4.0,
child: new IconButton(
icon: const Icon(
Icons.menu,
color: Colors.white,
),
onPressed: _handleMenuOpenClose,
),
);
}
///
/// Menu content
///
Widget _buildMenuContent() {
final List<Map> _menus = <Map>[
{
"icon": Icons.work,
"title": "Our Work",
},
{
"icon": FontAwesomeIcons.plusSquare,
"title": "Services",
},
{
"icon": Icons.view_agenda,
"title": "News Feed",
},
{
"icon": Icons.person,
"title": "Our Team",
},
{
"icon": FontAwesomeIcons.phoneVolume,
"title": "Contact Us",
},
];
return new Padding(
padding: const EdgeInsets.only(left: 64.0, top: 96.0),
child: new Container(
width: double.infinity,
height: double.infinity,
child: new Column(
mainAxisAlignment: MainAxisAlignment.start,
children: _menus.map((menuItem) {
return new FlatButton(
child: ListTile(
leading: new Icon(
menuItem["icon"],
color:
menuItem["title"] == _title ? Colors.cyan : Colors.white,
),
title: new Text(
menuItem["title"],
style: new TextStyle(
color: menuItem["title"] == _title
? Colors.cyan
: Colors.white,
fontSize: 24.0),
),
),
onPressed: () {
setState(() {
_title = menuItem["title"];
_handleMenuOpenClose();
});
},
);
}).toList(),
),
),
);
}
}
class Page extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
body: GestureDetector(
child: Container(
padding: const EdgeInsets.only(top: 90.0),
child: News(),
),
onDoubleTap: (){print('object');},
),
);
}
}


add a comment |
I am trying to implement GuillotineMenu as per this tutorial and I managed to create the awesome animated menu but the listview below the menu does not detect the gesture(scroll). How can I send the scroll gesture to the listview? when I use IgnorePointer on the menu the scroll works but the menu does not. I can I detect gestures on both widgets on stack?
P.S In this code I have used gesture detector instead of listview
code:
home.dart
import 'package:Pixelitg/GuillotineMenu.dart';
import 'package:flutter/material.dart';
class Home extends StatefulWidget {
@override
_HomeState createState() => new _HomeState();
}
class _HomeState extends State<Home> {
@override
Widget build(BuildContext context) {
return SafeArea(
top: false,
bottom: false,
child: new Container(
child: new Stack(
alignment: Alignment.topLeft,
children: <Widget>[
new Page(),
new GuillotineMenu(),
],
),
),
);
}
}
GuillotineMenu:
import 'package:Pixelitg/news.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
class GuillotineMenu extends StatefulWidget {
@override
_GuillotineMenuState createState() => new _GuillotineMenuState();
}
enum _GuillotineAnimationStatus { closed, open, animating }
class _GuillotineMenuState extends State<GuillotineMenu>
with SingleTickerProviderStateMixin {
double pi = 22 / 7;
String _title = "Our Work";
AnimationController animationControllerMenu;
Animation<double> animationMenu;
Animation<double> animationTitleFadeInOut;
_GuillotineAnimationStatus menuAnimationStatus =
_GuillotineAnimationStatus.closed;
double rotationAngle = 0.0;
_handleMenuOpenClose() {
if (menuAnimationStatus == _GuillotineAnimationStatus.closed) {
animationControllerMenu.forward().orCancel;
} else if (menuAnimationStatus == _GuillotineAnimationStatus.open) {
animationControllerMenu.reverse().orCancel;
}
}
@override
void initState() {
super.initState();
///
/// Initialization of the animation controller
///
animationControllerMenu = new AnimationController(
duration: const Duration(milliseconds: 1000), vsync: this)
..addListener(() {
setState(() {});
})
..addStatusListener((AnimationStatus status) {
if (status == AnimationStatus.completed) {
///
/// When the animation is at the end, the menu is open
///
menuAnimationStatus = _GuillotineAnimationStatus.open;
} else if (status == AnimationStatus.dismissed) {
///
/// When the animation is at the beginning, the menu is closed
///
menuAnimationStatus = _GuillotineAnimationStatus.closed;
} else {
///
/// Otherwise the animation is running
///
menuAnimationStatus = _GuillotineAnimationStatus.animating;
}
});
animationTitleFadeInOut =
new Tween(begin: 1.0, end: 0.0).animate(new CurvedAnimation(
parent: animationControllerMenu,
curve: new Interval(
0.0,
0.5,
curve: Curves.ease,
),
));
animationMenu =
new Tween(begin: -pi / 2.0, end: 0.0).animate(new CurvedAnimation(
parent: animationControllerMenu,
curve: Curves.bounceOut,
reverseCurve: Curves.bounceIn,
));
///
/// Initialization of the menu appearance animation
///
new Tween(begin: -pi / 2.0, end: 0.0).animate(animationControllerMenu);
}
@override
void dispose() {
animationControllerMenu.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
MediaQueryData mediaQueryData = MediaQuery.of(context);
double screenWidth = mediaQueryData.size.width;
double screenHeight = mediaQueryData.size.height;
return new Material(
color: Colors.transparent,
child: new Transform.rotate(
angle: animationMenu.value,
origin: new Offset(24.0, 56.0),
alignment: Alignment.topLeft,
child: Container(
width: screenWidth,
height: screenHeight,
color: Color(0xFF333333),
child: new Stack(
children: <Widget>[
_buildMenuTitle(),
_buildMenuIcon(),
_buildMenuContent(),
],
),
),
),
);
}
///
/// Menu Title
///
Widget _buildMenuTitle() {
double screenWidth = MediaQuery.of(context).size.width;
return new Positioned(
top: 32.0,
left: 40.0,
width: screenWidth,
height: 24.0,
child: new Transform.rotate(
alignment: Alignment.topLeft,
origin: Offset.zero,
angle: pi / 2.0,
child: new Center(
child: new Container(
width: double.infinity,
height: double.infinity,
child: new Opacity(
opacity: animationTitleFadeInOut.value,
child: new Text(_title,
textAlign: TextAlign.center,
style: new TextStyle(
color: Colors.white,
fontSize: 20.0,
fontWeight: FontWeight.bold,
letterSpacing: 2.0,
)),
),
),
)),
);
}
///
/// Menu Icon
///
Widget _buildMenuIcon() {
return new Positioned(
top: 32.0,
left: 4.0,
child: new IconButton(
icon: const Icon(
Icons.menu,
color: Colors.white,
),
onPressed: _handleMenuOpenClose,
),
);
}
///
/// Menu content
///
Widget _buildMenuContent() {
final List<Map> _menus = <Map>[
{
"icon": Icons.work,
"title": "Our Work",
},
{
"icon": FontAwesomeIcons.plusSquare,
"title": "Services",
},
{
"icon": Icons.view_agenda,
"title": "News Feed",
},
{
"icon": Icons.person,
"title": "Our Team",
},
{
"icon": FontAwesomeIcons.phoneVolume,
"title": "Contact Us",
},
];
return new Padding(
padding: const EdgeInsets.only(left: 64.0, top: 96.0),
child: new Container(
width: double.infinity,
height: double.infinity,
child: new Column(
mainAxisAlignment: MainAxisAlignment.start,
children: _menus.map((menuItem) {
return new FlatButton(
child: ListTile(
leading: new Icon(
menuItem["icon"],
color:
menuItem["title"] == _title ? Colors.cyan : Colors.white,
),
title: new Text(
menuItem["title"],
style: new TextStyle(
color: menuItem["title"] == _title
? Colors.cyan
: Colors.white,
fontSize: 24.0),
),
),
onPressed: () {
setState(() {
_title = menuItem["title"];
_handleMenuOpenClose();
});
},
);
}).toList(),
),
),
);
}
}
class Page extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
body: GestureDetector(
child: Container(
padding: const EdgeInsets.only(top: 90.0),
child: News(),
),
onDoubleTap: (){print('object');},
),
);
}
}


add a comment |
I am trying to implement GuillotineMenu as per this tutorial and I managed to create the awesome animated menu but the listview below the menu does not detect the gesture(scroll). How can I send the scroll gesture to the listview? when I use IgnorePointer on the menu the scroll works but the menu does not. I can I detect gestures on both widgets on stack?
P.S In this code I have used gesture detector instead of listview
code:
home.dart
import 'package:Pixelitg/GuillotineMenu.dart';
import 'package:flutter/material.dart';
class Home extends StatefulWidget {
@override
_HomeState createState() => new _HomeState();
}
class _HomeState extends State<Home> {
@override
Widget build(BuildContext context) {
return SafeArea(
top: false,
bottom: false,
child: new Container(
child: new Stack(
alignment: Alignment.topLeft,
children: <Widget>[
new Page(),
new GuillotineMenu(),
],
),
),
);
}
}
GuillotineMenu:
import 'package:Pixelitg/news.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
class GuillotineMenu extends StatefulWidget {
@override
_GuillotineMenuState createState() => new _GuillotineMenuState();
}
enum _GuillotineAnimationStatus { closed, open, animating }
class _GuillotineMenuState extends State<GuillotineMenu>
with SingleTickerProviderStateMixin {
double pi = 22 / 7;
String _title = "Our Work";
AnimationController animationControllerMenu;
Animation<double> animationMenu;
Animation<double> animationTitleFadeInOut;
_GuillotineAnimationStatus menuAnimationStatus =
_GuillotineAnimationStatus.closed;
double rotationAngle = 0.0;
_handleMenuOpenClose() {
if (menuAnimationStatus == _GuillotineAnimationStatus.closed) {
animationControllerMenu.forward().orCancel;
} else if (menuAnimationStatus == _GuillotineAnimationStatus.open) {
animationControllerMenu.reverse().orCancel;
}
}
@override
void initState() {
super.initState();
///
/// Initialization of the animation controller
///
animationControllerMenu = new AnimationController(
duration: const Duration(milliseconds: 1000), vsync: this)
..addListener(() {
setState(() {});
})
..addStatusListener((AnimationStatus status) {
if (status == AnimationStatus.completed) {
///
/// When the animation is at the end, the menu is open
///
menuAnimationStatus = _GuillotineAnimationStatus.open;
} else if (status == AnimationStatus.dismissed) {
///
/// When the animation is at the beginning, the menu is closed
///
menuAnimationStatus = _GuillotineAnimationStatus.closed;
} else {
///
/// Otherwise the animation is running
///
menuAnimationStatus = _GuillotineAnimationStatus.animating;
}
});
animationTitleFadeInOut =
new Tween(begin: 1.0, end: 0.0).animate(new CurvedAnimation(
parent: animationControllerMenu,
curve: new Interval(
0.0,
0.5,
curve: Curves.ease,
),
));
animationMenu =
new Tween(begin: -pi / 2.0, end: 0.0).animate(new CurvedAnimation(
parent: animationControllerMenu,
curve: Curves.bounceOut,
reverseCurve: Curves.bounceIn,
));
///
/// Initialization of the menu appearance animation
///
new Tween(begin: -pi / 2.0, end: 0.0).animate(animationControllerMenu);
}
@override
void dispose() {
animationControllerMenu.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
MediaQueryData mediaQueryData = MediaQuery.of(context);
double screenWidth = mediaQueryData.size.width;
double screenHeight = mediaQueryData.size.height;
return new Material(
color: Colors.transparent,
child: new Transform.rotate(
angle: animationMenu.value,
origin: new Offset(24.0, 56.0),
alignment: Alignment.topLeft,
child: Container(
width: screenWidth,
height: screenHeight,
color: Color(0xFF333333),
child: new Stack(
children: <Widget>[
_buildMenuTitle(),
_buildMenuIcon(),
_buildMenuContent(),
],
),
),
),
);
}
///
/// Menu Title
///
Widget _buildMenuTitle() {
double screenWidth = MediaQuery.of(context).size.width;
return new Positioned(
top: 32.0,
left: 40.0,
width: screenWidth,
height: 24.0,
child: new Transform.rotate(
alignment: Alignment.topLeft,
origin: Offset.zero,
angle: pi / 2.0,
child: new Center(
child: new Container(
width: double.infinity,
height: double.infinity,
child: new Opacity(
opacity: animationTitleFadeInOut.value,
child: new Text(_title,
textAlign: TextAlign.center,
style: new TextStyle(
color: Colors.white,
fontSize: 20.0,
fontWeight: FontWeight.bold,
letterSpacing: 2.0,
)),
),
),
)),
);
}
///
/// Menu Icon
///
Widget _buildMenuIcon() {
return new Positioned(
top: 32.0,
left: 4.0,
child: new IconButton(
icon: const Icon(
Icons.menu,
color: Colors.white,
),
onPressed: _handleMenuOpenClose,
),
);
}
///
/// Menu content
///
Widget _buildMenuContent() {
final List<Map> _menus = <Map>[
{
"icon": Icons.work,
"title": "Our Work",
},
{
"icon": FontAwesomeIcons.plusSquare,
"title": "Services",
},
{
"icon": Icons.view_agenda,
"title": "News Feed",
},
{
"icon": Icons.person,
"title": "Our Team",
},
{
"icon": FontAwesomeIcons.phoneVolume,
"title": "Contact Us",
},
];
return new Padding(
padding: const EdgeInsets.only(left: 64.0, top: 96.0),
child: new Container(
width: double.infinity,
height: double.infinity,
child: new Column(
mainAxisAlignment: MainAxisAlignment.start,
children: _menus.map((menuItem) {
return new FlatButton(
child: ListTile(
leading: new Icon(
menuItem["icon"],
color:
menuItem["title"] == _title ? Colors.cyan : Colors.white,
),
title: new Text(
menuItem["title"],
style: new TextStyle(
color: menuItem["title"] == _title
? Colors.cyan
: Colors.white,
fontSize: 24.0),
),
),
onPressed: () {
setState(() {
_title = menuItem["title"];
_handleMenuOpenClose();
});
},
);
}).toList(),
),
),
);
}
}
class Page extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
body: GestureDetector(
child: Container(
padding: const EdgeInsets.only(top: 90.0),
child: News(),
),
onDoubleTap: (){print('object');},
),
);
}
}


I am trying to implement GuillotineMenu as per this tutorial and I managed to create the awesome animated menu but the listview below the menu does not detect the gesture(scroll). How can I send the scroll gesture to the listview? when I use IgnorePointer on the menu the scroll works but the menu does not. I can I detect gestures on both widgets on stack?
P.S In this code I have used gesture detector instead of listview
code:
home.dart
import 'package:Pixelitg/GuillotineMenu.dart';
import 'package:flutter/material.dart';
class Home extends StatefulWidget {
@override
_HomeState createState() => new _HomeState();
}
class _HomeState extends State<Home> {
@override
Widget build(BuildContext context) {
return SafeArea(
top: false,
bottom: false,
child: new Container(
child: new Stack(
alignment: Alignment.topLeft,
children: <Widget>[
new Page(),
new GuillotineMenu(),
],
),
),
);
}
}
GuillotineMenu:
import 'package:Pixelitg/news.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
class GuillotineMenu extends StatefulWidget {
@override
_GuillotineMenuState createState() => new _GuillotineMenuState();
}
enum _GuillotineAnimationStatus { closed, open, animating }
class _GuillotineMenuState extends State<GuillotineMenu>
with SingleTickerProviderStateMixin {
double pi = 22 / 7;
String _title = "Our Work";
AnimationController animationControllerMenu;
Animation<double> animationMenu;
Animation<double> animationTitleFadeInOut;
_GuillotineAnimationStatus menuAnimationStatus =
_GuillotineAnimationStatus.closed;
double rotationAngle = 0.0;
_handleMenuOpenClose() {
if (menuAnimationStatus == _GuillotineAnimationStatus.closed) {
animationControllerMenu.forward().orCancel;
} else if (menuAnimationStatus == _GuillotineAnimationStatus.open) {
animationControllerMenu.reverse().orCancel;
}
}
@override
void initState() {
super.initState();
///
/// Initialization of the animation controller
///
animationControllerMenu = new AnimationController(
duration: const Duration(milliseconds: 1000), vsync: this)
..addListener(() {
setState(() {});
})
..addStatusListener((AnimationStatus status) {
if (status == AnimationStatus.completed) {
///
/// When the animation is at the end, the menu is open
///
menuAnimationStatus = _GuillotineAnimationStatus.open;
} else if (status == AnimationStatus.dismissed) {
///
/// When the animation is at the beginning, the menu is closed
///
menuAnimationStatus = _GuillotineAnimationStatus.closed;
} else {
///
/// Otherwise the animation is running
///
menuAnimationStatus = _GuillotineAnimationStatus.animating;
}
});
animationTitleFadeInOut =
new Tween(begin: 1.0, end: 0.0).animate(new CurvedAnimation(
parent: animationControllerMenu,
curve: new Interval(
0.0,
0.5,
curve: Curves.ease,
),
));
animationMenu =
new Tween(begin: -pi / 2.0, end: 0.0).animate(new CurvedAnimation(
parent: animationControllerMenu,
curve: Curves.bounceOut,
reverseCurve: Curves.bounceIn,
));
///
/// Initialization of the menu appearance animation
///
new Tween(begin: -pi / 2.0, end: 0.0).animate(animationControllerMenu);
}
@override
void dispose() {
animationControllerMenu.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
MediaQueryData mediaQueryData = MediaQuery.of(context);
double screenWidth = mediaQueryData.size.width;
double screenHeight = mediaQueryData.size.height;
return new Material(
color: Colors.transparent,
child: new Transform.rotate(
angle: animationMenu.value,
origin: new Offset(24.0, 56.0),
alignment: Alignment.topLeft,
child: Container(
width: screenWidth,
height: screenHeight,
color: Color(0xFF333333),
child: new Stack(
children: <Widget>[
_buildMenuTitle(),
_buildMenuIcon(),
_buildMenuContent(),
],
),
),
),
);
}
///
/// Menu Title
///
Widget _buildMenuTitle() {
double screenWidth = MediaQuery.of(context).size.width;
return new Positioned(
top: 32.0,
left: 40.0,
width: screenWidth,
height: 24.0,
child: new Transform.rotate(
alignment: Alignment.topLeft,
origin: Offset.zero,
angle: pi / 2.0,
child: new Center(
child: new Container(
width: double.infinity,
height: double.infinity,
child: new Opacity(
opacity: animationTitleFadeInOut.value,
child: new Text(_title,
textAlign: TextAlign.center,
style: new TextStyle(
color: Colors.white,
fontSize: 20.0,
fontWeight: FontWeight.bold,
letterSpacing: 2.0,
)),
),
),
)),
);
}
///
/// Menu Icon
///
Widget _buildMenuIcon() {
return new Positioned(
top: 32.0,
left: 4.0,
child: new IconButton(
icon: const Icon(
Icons.menu,
color: Colors.white,
),
onPressed: _handleMenuOpenClose,
),
);
}
///
/// Menu content
///
Widget _buildMenuContent() {
final List<Map> _menus = <Map>[
{
"icon": Icons.work,
"title": "Our Work",
},
{
"icon": FontAwesomeIcons.plusSquare,
"title": "Services",
},
{
"icon": Icons.view_agenda,
"title": "News Feed",
},
{
"icon": Icons.person,
"title": "Our Team",
},
{
"icon": FontAwesomeIcons.phoneVolume,
"title": "Contact Us",
},
];
return new Padding(
padding: const EdgeInsets.only(left: 64.0, top: 96.0),
child: new Container(
width: double.infinity,
height: double.infinity,
child: new Column(
mainAxisAlignment: MainAxisAlignment.start,
children: _menus.map((menuItem) {
return new FlatButton(
child: ListTile(
leading: new Icon(
menuItem["icon"],
color:
menuItem["title"] == _title ? Colors.cyan : Colors.white,
),
title: new Text(
menuItem["title"],
style: new TextStyle(
color: menuItem["title"] == _title
? Colors.cyan
: Colors.white,
fontSize: 24.0),
),
),
onPressed: () {
setState(() {
_title = menuItem["title"];
_handleMenuOpenClose();
});
},
);
}).toList(),
),
),
);
}
}
class Page extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
body: GestureDetector(
child: Container(
padding: const EdgeInsets.only(top: 90.0),
child: News(),
),
onDoubleTap: (){print('object');},
),
);
}
}




asked Nov 19 '18 at 20:20


Ashutosh SharmaAshutosh Sharma
5710
5710
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53382067%2fhow-to-detect-scroll-on-the-widget-underneath-the-stack%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53382067%2fhow-to-detect-scroll-on-the-widget-underneath-the-stack%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown