Я пытаюсь делать такие вещи с Flutter: https://storage.googleapis.com/spec-host-backup/mio-design%2Fassets%2F0B3T7oTWa3HiFcHBDaTlreHdVZGc%2Fitem-selection-selecting-items.
var gestureTemp = GestureDetector(
onLongPress: (){
print('LONG PRESSED');
//CHANGE APPBAR
},
child: Padding(
padding: EdgeInsets.only(right:8),
child: Chip(
avatar: CircleAvatar(
backgroundColor: Colors.grey.shade800,
child: icon
),
label: Text(space.label, style: TextStyle(fontSize: 12, color:Colors.grey.shade800))
),
));
Он обнаруживает долгое нажатие, но я не знаю, как изменить свою панель приложений ...
Любые идеи ?
РЕДАКТИРОВАТЬ: вот что я делаю
var appBar1 = AppBar(...);
var appBar2 = AppBar(...);
var appBar = appBar1;
Мой appBar отображается в моем Scaffold.
На моем GestureDetector:
onLongPress: (){
print('LONG PRESSED');
setState(() {
appBar = appBar2;
});
},