GithubHelp home page GithubHelp logo

_TypeError was thrown building RawGestureDetector(state: RawGestureDetectorState#1ad0d(gestures: [vertical drag])): type '() => Null' is not a subtype of type '(() => StoryItem)?' of 'orElse' about flutter_instagram_stories HOT 18 CLOSED

awaik avatar awaik commented on July 28, 2024
_TypeError was thrown building RawGestureDetector(state: RawGestureDetectorState#1ad0d(gestures: [vertical drag])): type '() => Null' is not a subtype of type '(() => StoryItem)?' of 'orElse'

from flutter_instagram_stories.

Comments (18)

kevinZartek avatar kevinZartek commented on July 28, 2024 1

same error for me, for the example code itself.
I used firstWhereOrNull instead of 'firstWhere' everywhere in 'story_view.dart', function from 'collection' package and it solved my problem.

from flutter_instagram_stories.

MiguelAngelLopezBlanca avatar MiguelAngelLopezBlanca commented on July 28, 2024

Good, when I go to use the library, the same error has occurred to me, when I click on the story I get an error just like the one you show in the images.
Have you been able to fix it already?

from flutter_instagram_stories.

awaik avatar awaik commented on July 28, 2024

Hi,
I'll try to fix it during the week (or next weekend).

from flutter_instagram_stories.

MiguelAngelLopezBlanca avatar MiguelAngelLopezBlanca commented on July 28, 2024

Ok, thank you

from flutter_instagram_stories.

awaik avatar awaik commented on July 28, 2024

I've updated dependencies in the package and in the example and it works again.
I didn't change the code itself.
Please check how it works with updated package.
flutter_instagram_stories: ^1.0.1

Please pay attention to the new way of Firebase initialization
https://firebase.flutter.dev/docs/overview/#initialization

Screenshot 2022-02-15 at 17 20 19

from flutter_instagram_stories.

MiguelAngelLopezBlanca avatar MiguelAngelLopezBlanca commented on July 28, 2024

Ok, thank you. I will review and update it throughout this week or on the weekend and I'll tell you

from flutter_instagram_stories.

MiguelAngelLopezBlanca avatar MiguelAngelLopezBlanca commented on July 28, 2024

The same thing keeps happening to me, I updated the dependencies to the version you indicated, but it keeps giving me an error. Here I attach the screenshots of it.

Captura de pantalla 2022-02-16 a las 17 51 03

Captura de pantalla 2022-02-16 a las 17 51 27

Captura de pantalla 2022-02-16 a las 17 51 39

from flutter_instagram_stories.

awaik avatar awaik commented on July 28, 2024

It looks like wrong data in the Firestore.
Please double check fields names.

from flutter_instagram_stories.

MiguelAngelLopezBlanca avatar MiguelAngelLopezBlanca commented on July 28, 2024

Captura de pantalla 2022-02-16 a las 22 59 45

This is a screenshot of the firestore data

from flutter_instagram_stories.

MiguelAngelLopezBlanca avatar MiguelAngelLopezBlanca commented on July 28, 2024

Hello @awaik , have you been able to review the capture that I attached in the last comment about the name of the firestore database fields?

from flutter_instagram_stories.

awaik avatar awaik commented on July 28, 2024

Hey @MiguelAngelLopezBlanca
is it array in your database?

Screenshot 2022-02-23 at 20 52 24

from flutter_instagram_stories.

MiguelAngelLopezBlanca avatar MiguelAngelLopezBlanca commented on July 28, 2024

@awaik if it is an array

from flutter_instagram_stories.

MiguelAngelLopezBlanca avatar MiguelAngelLopezBlanca commented on July 28, 2024

Captura de pantalla 2022-02-23 a las 21 00 05

from flutter_instagram_stories.

awaik avatar awaik commented on July 28, 2024

Can you please try to remove all file records and paste test one

"file": [ { "filetype": "image", "url": { "en": "https://firebasestorage.googleapis.com/v0/b/flutter-instagram-stories.appspot.com/o/in31.jpg?alt=media&token=3ff0173a-0d97-4339-8136-86603f449446" } } ]

from flutter_instagram_stories.

Azattu avatar Azattu commented on July 28, 2024

Exact same issue as described by @MiguelAngelLopezBlanca

Can you please try to remove all file records and paste test one

"file": [ { "filetype": "image", "url": { "en": "https://firebasestorage.googleapis.com/v0/b/flutter-instagram-stories.appspot.com/o/in31.jpg?alt=media&token=3ff0173a-0d97-4339-8136-86603f449446" } } ]

@awaik above This not helped

from flutter_instagram_stories.

awaik avatar awaik commented on July 28, 2024

@MiguelAngelLopezBlanca
Had you chance to fix it?

from flutter_instagram_stories.

awaik avatar awaik commented on July 28, 2024

Can't find a bug, because test app with real Firestore database works. You can check it yourself, the database is open to read and Example folder in repo contains all the code.

Screen.Recording.2022-03-12.at.09.44.46.mov

from flutter_instagram_stories.

awaik avatar awaik commented on July 28, 2024

Fixed with the new version, please check
flutter_instagram_stories: ^1.0.2

Thanks for the help @kevinZartek

from flutter_instagram_stories.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.