0

I am trying to update a list of data in my real-time database using "Patch" in Flutter. I tried using the following codes but don't where I made mistake or what's wrong with my codes.


Map UpdatetitleMap = {
    'oldname': "Marvel",
    'olddescription': "Avenger",
};

await patch(
        Uri.parse("https://project123-default-rtdb.firebaseio.com/app/olddata.json"),
        body: jsonEncode(UpdatetitleMap));


  • have you used any State Management tool in your project? – Diwyansh Nov 15 '21 at 11:55
  • Sorry dude, I don't understand, would please break it down into easy words or make it easy to understand. Or any specific example about what you're talking about. – Anonymous Trap Nov 15 '21 at 13:45
  • if we regularly want to update our Screen in flutter we have to use State Management tools for that such as Provider, Bloc ,GetX etc. you may getting your data by hitting your your API but to show the updated Screen you have rebuild the state – Diwyansh Nov 15 '21 at 15:48
  • Dude, on this screen I am just updating data and isn't displaying it. Because to display, I have another screen and there I am displaying data fetching it from the real-time database. And I am not using any sort of provider to display my data. And my problem is that I can't update my data in a real-time database using Patch. Because I wanted to update only some of the fields in my table. – Anonymous Trap Nov 16 '21 at 04:35

0 Answers0