//Reference Database Query dbRef = FirebaseDatabase.instance.ref().child('People'); DatabaseReference reference = FirebaseDatabase.instance.ref().child('People'); //This is just a block with all the database's info Widget listItem({ required Map People, }) { //shared Preferences start savebool() async { SharedPreferences prefs = await SharedPreferences.getInstance(); await prefs.setBool("People['Joined']", true); } //shared prefs end return Slidable( startActionPane: ActionPane( motion: const BehindMotion(), extentRatio: 1 / 5, children: [ SlidableAction( backgroundColor: Colors.black, icon: Icons.add, label: 'Join', onPressed: (BuildContext context) { setState(() { //change value from false to true People['Joined'] = true; }); //now i save it savebool(); //but when I refresh it didn't save// }, ), ], ),...}
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)