GithubHelp home page GithubHelp logo

awaik / flutter_instagram_stories Goto Github PK

View Code? Open in Web Editor NEW
138.0 6.0 52.0 19.09 MB

Stories like in Instagram, each story can include multiple images and videos. Package supports video, titles, preliminary caching.

License: Other

Dart 59.24% Kotlin 0.10% Ruby 2.22% Swift 1.44% Objective-C 0.03% HTML 3.24% CMake 14.03% C++ 17.52% C 1.18% Makefile 1.00%

flutter_instagram_stories's Issues

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

I have been having an issue trying to use the packages when upon on click the story, it will crash straight away. I wondering if you have faced similar issues in the past or anyone of the community have the same issue.
@awaik

The error I have been getting:
══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
The following _TypeError was thrown building   @@RawGestureDetector(state:
RawGestureDetectorState#1ad0d(gestures: [vertical drag])):
type '() => Null' is not a subtype of type '(() => StoryItem)?' of 'orElse'

The relevant error-causing widget was:
  GestureDetector
  file:///Users/edwin/Development/flutter/.pub-cache/git/flutter_instagram_stories-eb421e9e12c7a9e6956036e0503158fe55f7b29d/lib/grouped_stories_view.dart:160:26

When the exception was thrown, this was the stack:
#0      ListMixin.firstWhere (dart:collection/list.dart)
#1      StoryViewState.initState (package:flutter_instagram_stories/story_view.dart:337:41)
#2      StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4711:57)
#3      ComponentElement.mount (package:flutter/src/widgets/framework.dart:4548:5)
...     Normal element mounting (32 frames)
#35     Element.inflateWidget (package:flutter/src/widgets/framework.dart:3611:14)
#36     MultiChildRenderObjectElement.inflateWidget (package:flutter/src/widgets/framework.dart:6221:36)
#37     MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6232:32)
...     Normal element mounting (29 frames)
#66     Element.inflateWidget (package:flutter/src/widgets/framework.dart:3611:14)
#67     Element.updateChild (package:flutter/src/widgets/framework.dart:3360:20)
#68     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4599:16)
#69     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4746:11)
#70     Element.rebuild (package:flutter/src/widgets/framework.dart:4267:5)
#71     BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2582:33)
#72     WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:875:21)
#73     RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:328:5)
#74     SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1144:15)
#75     SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1082:9)
#76     SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:998:5)
#80     _invoke (dart:ui/hooks.dart:163:10)
#81     PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:259:5)
#82     _drawFrame (dart:ui/hooks.dart:126:31)
(elided 3 frames from dart:async)

20211112-173512

20211112-173519

20211112-173519

Flexible ontap/gesture event

I can't get why you are using pushAndRemoveUntil for showing stories while it could be made by push. It will be better and less laggy as with removing all the pages now.

Missing license

This library should include my license since it makes use of most of my original codebase.

As good practice, your library should make use of story_view package rather than copying the source over verbatim. Your implementation is great and builds upon the base functionality of story_view. It will be better if you rather made that separation and whatever improvements made to the story_view part can be shared with the original library.

I find it that this library still has the same core limitations identified in the original story_view. And I am skeptical of the fact that, fixes I may author in future will also just be copied over verbatim like this.

Let's do good!

_CastError (type '_InternalLinkedHashMap<String, dynamic>' is not a subtype of type 'List<dynamic>?' in type cast)

Stories _$StoriesFromJson(Map<String, dynamic> json) {
return Stories(
storyId: json['storyId'] as String?,
date: json['date'] == null ? null : DateTime.parse(json['date'] as String),
file: (json['file'] as List<dynamic>?)?.map((e) => StoryData.fromJson(e as Map<String, dynamic>)).toList(),
previewImage: json['previewImage'] as String?,
previewTitle: (json['previewTitle'] as Map<String, dynamic>?)?.map(
(k, e) => MapEntry(k, e as String),
),
);
}

Timer issue

Stories doesn't delete from database after 24hours.

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.