awaik / flutter_instagram_stories Goto Github PK
View Code? Open in Web Editor NEWStories like in Instagram, each story can include multiple images and videos. Package supports video, titles, preliminary caching.
License: Other
Stories like in Instagram, each story can include multiple images and videos. Package supports video, titles, preliminary caching.
License: Other
Start timer only when video file loading OR implement it like on youtube - start to display video after first 2-3 seconds loaded.
https://pub.dev/packages/flutter_instagram_stories#-example-tab-
fix this page info
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!
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),
),
);
}
when opening the story i get this error
type '() => Null' is not a subtype of type '(() => StoryItem)?' of 'orElse'
can you help
stories are well displayed in the mobile application. but it doesn't show up in the web app
Right now it works only with Firestore.
Stories doesn't delete from database after 24hours.
for users who viewed the story
Greatly appreciate the word, just wondering like the original story_view whether there is a goal to add caption support?
Many Thanks
Kindly add a way users can like, share and comment on individual stories
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.
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)
How can I set the stories from json api?
For now, the video uses fixed time 10 seconds. Change the time as video length.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.