I fetched the amount from firestore, And in the UI has text field user can add value to that text field that also string I want summation both that "(oneAmount?.amount)! + (amountController.text)"
code
void displayMessage() {
if (amountController.text != null) {
int amount = ((oneAmount?.amount)! + (amountController.text)) as int;
FirebaseFirestore.instance
.collection("recharge")
.doc("${loggedInUser.uid}")
.set({
"amount": amount,
});
Navigator.push(
context,
MaterialPageRoute(builder: (context) => const HomeScreen()),
);
} else {}
}