I am trying to display the data on the page But this error appears to me Is there a solution to this?
controller
RxInt pprofit = 0.obs ;
void onInit() async{
super.onInit();
// TODO: implement onInit
CollectionReference fprofits = FirebaseFirestore.instance.collection('admin');
await fprofits.doc('profits').get().then((value) {
pprofit = value.data()['profits'];
}); }
iam trying to get this value only

error
Error: The operator '[]' isn't defined for the class 'Object?'.
- 'Object' is from 'dart:core'.
Try correcting the operator to an existing operator, or defining a '[]' operator.
pprofit = value.data()['profits'];