0
    Widget build(BuildContext context) {
    double height = MediaQuery.of(context).size.height / 815;
    double width = MediaQuery.of(context).size.width / 375;
    var data = Provider.of<AppNotifiers>(context);
    return FutureBuilder(
      future: data.getFinalData(),
      builder: ((BuildContext context, AsyncSnapshot<FinalModel> snapshot) {
        if (snapshot.hasError) {
          return const Center(
            child: Text("Oops! Try again later!"),
          );
        }
        if (snapshot.hasData) {
          return ListView.builder(
            physics: const AlwaysScrollableScrollPhysics(
                parent: BouncingScrollPhysics()),
            itemCount: snapshot.data!.data!.coins!.length,
            shrinkWrap: true,
            scrollDirection: Axis.horizontal,
            itemBuilder: ((context, index) {

I have encountered an error. The error is Could not find the correct Provider above this.

Philippe Remy
  • 2,967
  • 4
  • 25
  • 39

0 Answers0