I have a dummy list of items I want to show a floating action button in swip up direction and hide it in down direction. how can I implement this functionality ?
class _MyHomePageState extends State<MyHomePage> {
bool upDirection = true;
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(),
body: Center(
child: Container(
child: Row(
children: <Widget>[
Expanded(
child: ListView.builder(
itemCount: 100,
itemBuilder: (context,index){
return ListTile(
title: Text(index.toString()),
);
},
),
)
],
),
),
),
floatingActionButton:upDirection==true?FloatingActionButton(onPressed: (){},):Container() ,
);
}
}