I am fairly new to flutter. I know that the long press is fired when the user touches the screen for more than 500 milliseconds. Is there a way to change it to maybe like 2 seconds?
In my code I used inkresponse to get two different functions from the fab. On tap it goes to 1st page and on long press it goes to the 2nd page. I wanted the long press to be fairly longer and maybe add animation to indicate that the button is being pressed.
Here is the code that I have written-
floatingActionButtonLocation:
FloatingActionButtonLocation.endFloat,
floatingActionButton: InkResponse(
splashColor: Colors.tealAccent,
onLongPress: () {
Navigator.of(context).push(new MaterialPageRoute(
builder: (BuildContext context) => new firstPage(),));
},
child: new Container(
width: 57.0,
height: 57.0,
child: Align(
alignment: Alignment(1, 1.05),
child: FloatingActionButton(
onPressed: () {
Navigator.of(context).push(new MaterialPageRoute(
builder: (BuildContext context) => new secondpage(),
));},
),),
),),