I am passing a value in my product page but it is coming as null even when the value that I am passing is not null.
onTap: () {
setState(() {
ProductListPage(uid: arguments["userId"],);
print(arguments["userId"]);
});
This is the code for product page
const ProductListPage({Key? key, this.uid}) : super(key: key);
final uid;
@override
_ProductListPageState createState() => _ProductListPageState();
}
class _ProductListPageState extends State<ProductListPage>
void getProducts() async {
print("new id");
print(widget.uid);
}