bazookon / giphy_get Goto Github PK
View Code? Open in Web Editor NEWFlutter plugin
License: MIT License
Flutter plugin
License: MIT License
It would be great if we could select which size we want as displayed in the Giphy Render Guide https://developers.giphy.com/docs/optional-settings/#rendition-guide. GiphyGifWidget is rendering the gif in a small format making it look weird in the chat.
I have a giphy url gif is it possible to display it by passing the bitlyGifUrl
value?
Any ideas on how to write integration tests for widgets having giphy_get?
A normal flow would be like
Finder
optional steps:
Any tips would be helpful
Emojis no longer load on v3.0.0 due to this error:
E/flutter (10673): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: type 'Null' is not a subtype of type 'int' in type cast
E/flutter (10673): #0 new GiphyPagination.fromJson (package:giphy_get/src/client/models/collection.dart:54:43)
E/flutter (10673): #1 new GiphyCollection.fromJson (package:giphy_get/src/client/models/collection.dart:17:33)
E/flutter (10673): #2 GiphyClient._fetchCollection (package:giphy_get/src/client/client.dart:117:28)
E/flutter (10673): <asynchronous suspension>
E/flutter (10673): #3 _GiphyTabDetailState._loadMore (package:giphy_get/src/views/tab/giphy_tab_detail.dart:209:21)
E/flutter (10673): <asynchronous suspension>
E/flutter (10673):
When I scroll through the list, it dims the screen from time to time.
Seems to be the case when I loads more results...
Looks not so nice :(
Hi, when I try to do search with invalid keyword and tap on keyboard enter the loader keeps on loading on and does not stop until we clear the text.
Thanks
Thank you for making this plugin :) Is there an easy way to discard a selected GIF?
An example use case for this would be to display a selected GIF in the UI with a "remove" button next to it and to remove the selected GIF from the UI when that "remove" button is tapped.
Opening the Giphy sheet sometimes causes this exception when loading.
══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
I/flutter (15444): The following RangeError was thrown building:
I/flutter (15444): RangeError (index): Invalid value: Valid value range is empty: 7
I/flutter (15444):
I/flutter (15444): When the exception was thrown, this was the stack:
I/flutter (15444): #0 List.[] (dart:core-patch/growable_array.dart:254:60)
I/flutter (15444): #1 _GiphyTabDetailState.build.<anonymous closure> (package:giphy_get/src/views/tab/giphy_tab_detail.dart:130:34)
I/flutter (15444): #2 SliverChildBuilderDelegate.build (package:flutter/src/widgets/sliver.dart:455:22)
I/flutter (15444): #3 SliverVariableSizeBoxAdaptorElement._build.<anonymous closure> (package:flutter_staggered_grid_view/src/widgets/sliver.dart:154:38)
I/flutter (15444): #4 _HashMap.putIfAbsent (dart:collection-patch/collection_patch.dart:140:29)
I/flutter (15444): #5 SliverVariableSizeBoxAdaptorElement._build (package:flutter_staggered_grid_view/src/widgets/sliver.dart:153:26)
I/flutter (15444): #6 SliverVariableSizeBoxAdaptorElement.createChild.<anonymous closure> (package:flutter_staggered_grid_view/src/widgets/sliver.dart:164:55)
I/flutter (15444): #7 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2535:19)
I/flutter (15444): #8 SliverVariableSizeBoxAdaptorElement.createChild (package:flutter_staggered_grid_view/src/widgets/sliver.dart:160:12)
I/flutter (15444): #9 RenderSliverVariableSizeBoxAdaptor._createOrObtainChild.<anonymous closure> (package:flutter_staggered_grid_view/src/rendering/sliver_variable_size_box_adaptor.dart:252:23)
I/flutter (15444): #10 RenderObject.invokeLayoutCallback.<anonymous closure> (package:flutter/src/rendering/object.dart:1889:59)
I/flutter (15444): #11 PipelineOwner._enableMutationsToDirtySubtrees (package:flutter/src/rendering/object.dart:912:15)
I/flutter (15444): #12 RenderObject.invokeLayoutCallback (package:flutter/src/rendering/object.dart:1889:14)
I/flutter (15444): #13 RenderSliverVariableSizeBoxAdaptor._createOrObtainChild (package:flutter_staggered_grid_view/src/rendering/sliver_variable_size_box_adaptor.dart:240:5)
I/flutter (15444): #14 RenderSliverVariableSizeBoxAdaptor.addAndLayoutChild (package:flutter_staggered_grid_view/src/rendering/sliver_variable_size_box_adaptor.dart:317:5)
I/flutter (15444): #15 RenderSliverStaggeredGrid.performLayout (package:flutter_staggered_grid_view/src/rendering/sliver_staggered_grid.dart:336:17)
I/flutter (15444): #16 RenderObject.layout (package:flutter/src/rendering/object.dart:1779:7)
I/flutter (15444): #17 RenderSliverEdgeInsetsPadding.performLayout (package:flutter/src/rendering/sliver_padding.dart:137:12)
I/flutter (15444): #18 RenderSliverPadding.performLayout (package:flutter/src/rendering/sliver_padding.dart:371:11)
I/flutter (15444): #19 RenderObject.layout (package:flutter/src/rendering/object.dart:1779:7)
I/flutter (15444): #20 RenderViewportBase.layoutChildSequence (package:flutter/src/rendering/viewport.dart:510:13)
I/flutter (15444): #21 RenderViewport._attemptLayout (package:flutter/src/rendering/viewport.dart:1574:12)
I/flutter (15444): #22 RenderViewport.performLayout (package:flutter/src/rendering/viewport.dart:1483:20)
I/flutter (15444): #23 RenderObject._layoutWithoutResize (package:flutter/src/rendering/object.dart:1636:7)
I/flutter (15444): #24 PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:881:18)
I/flutter (15444): #25 RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:462:19)
I/flutter (15444): #26 WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:876:13)
I/flutter (15444): #27 RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:328:5)
I/flutter (15444): #28 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1144:15)
I/flutter (15444): #29 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1082:9)
I/flutter (15444): #30 SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:998:5)
I/flutter (15444): #34 _invoke (dart:ui/hooks.dart:163:10)
I/flutter (15444): #35 PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:259:5)
I/flutter (15444): #36 _drawFrame (dart:ui/hooks.dart:126:31)
I/flutter (15444): (elided 3 frames from dart:async)
If I want to add Giphy to image or video
with the same width and height , which parameter allow to me know them ?
It would be really great to request trending gifs with the endpoint they have in their SDK.
Also, it might be considerable to differentiate the command in the GiphyGet
class so you can call GiphyGet.getTrends()
, GiphyGet.search()
or GiphyGet.byId()
.
After upgrading myself to null-safety, and using the latest null-safety version for this package, now it breaks on opening, trying to cast a null to string while parsing Json internally:
type 'Null' is not a subtype of type 'String' in type cast #0 new GiphyPreviewImage.fromJson (package:giphy_get/src/client/models/image.dart:329:24) #1 new GiphyImages.fromJson (package:giphy_get/src/client/models/images.dart:100:31) #2 new GiphyGif.fromJson (package:giphy_get/src/client/models/gif.dart:66:27) #3 new GiphyCollection.fromJson.<anonymous closure> (package:giphy_get/src/client/models/collection.dart:13:60) #4 MappedListIterable.elementAt (dart:_internal/iterable.dart:411:31) #5 ListIterator.moveNext (dart:_internal/iterable.dart:340:26) #6 new _GrowableList._ofEfficientLengthIterable (dart:core-patch/growable_array.dart:188:27) #7 new _GrowableList.of (dart:core-patch/growable_array.dart:150:28) #8 new List.of (dart:core-patch/array_patch.dart:50:28) #9 ListIterable.toList (dart:_internal/iterable.dart:211:44) #10 new GiphyCollection.fromJson (package:giphy_get/src/client/models/collection.dart:13:73) #11 GiphyClient._fetchCollection (package:giphy_get/src/client/client.dart:117:28) <asynchronous suspension> #12 _GiphyTabDetailState._loadMore (package:giphy_get/src/views/tab/giphy_tab_detail.dart:232:23) <asynchronous suspension>
Currently, search queries are executing with each keystroke. Added an optional parameter to GiphyGet.getGif
called debounceTimeInMilliseconds
defaulting to 350 milliseconds.
My search results were coming out strange. When I type "cabin", I get the results for the letter "C" for a while. Eventually it gives proper results for the chosen query, but the user is confused by the earlier partial queries.
Also, theoretically, it should make search results seem faster, as it's not doing the full work with each keystroke.
I have included a Debounce
class that is self-disposing, and placed it in /lib/src/tools
. I have also updated the documentation to reflect the change.
It would be nice with an option to hide the other tabs - such as sticker and emoji's. We are only interested in GIFs
Can we update this package to extended_image 8.0.0?
Please explain how to set content rating for gifs.
Nice work on the bottom modal.
There is an issue with the width calculation anytime the view doesn't take up the full screen (landscape tablets or web implementations). line 91 in giphy_tab_detail.dart is using (MediaQuery.of(context).size.width which is simply the width of the screen and not the width of the view. Using a LayoutBuilder to get the constraints maxwidth would fix this issue.
I have set up everything as the documentation on pub.dev stated.
Here is the main.dart file, exactly how it was written in the documentation.
And Here is where i'm getting the GIFs. My API is working just fine, i'm able to get the GIPHY client random ID
But when i'm trying to access this, i'm getting an error, something about a NULL check on a NULL value
And here's the error am getting on my Device 👇
I'm running this application, on my Android Device, and everything else is working fine, i was using another GIPHY package (giphy_picker)
and it was and still working fine, decided to start using this package cuz it seem to be better than the other. So Help as fast as possible what can i do? to Fix this,
My Flutter and Dart Version 👇
Flutter 3.0.4 • channel stable • https://github.com/flutter/flutter.git Framework • revision 85684f9300 (4 weeks ago) • 2022-06-30 13:22:47 -0700 Engine • revision 6ba2af10bb Tools • Dart 2.17.5 • DevTools 2.12.2
On 1.0.0 if the background page has any text fields it gets focused when we focus the text field of giphy_get
I see in the guidelines than one must show the Powered by Giphy logo,
has anyone been able to get a key approved?
from Giphy Docs:
Attribution
We require all apps that use GIPHY API to conspicuously display "Powered By GIPHY" attribution marks where the API is utilized (see SDK attribution guide here). You can find approved official logo marks here
https://mailchi.mp/0762226d308c/important-updates-for-your-giphy-integration.
It's breaking in Flutter 2.0
First of all, this plugin is amazing! My concern is, is it okay or is it ethical to store an selected gif object/URL in my backend database? If not, can anyone help me out with what can be an ethical solution for the same? Thanx in advance!
I have a question. Why exactly is cached network image being used here as it will fill the cache without any way to clear that particular cache , also it adds a minimum 1.20.0 version restriction which is quiet unstable for now. I would propose to use extended_image or just no caching
Upgrade the extended_image to latest.
Can you guys update the dependencies, because in my case version solving is getting failed again and again
Hi I added the package to my flutter web project. It works nearly as expected. But the Emojis are only showing the loader. Any idea what is going wrong?
This would be an excellent feature to add. In the meantime does anyone have a good idea how to do this? I've played around with downloading the gif and sharing via something like: https://pub.dev/packages/appinio_social_share
This results in only the first frame of the gif being uploaded as an image. So then I thought I guess I need to convert it to an mp4 first. This is most likely possible but does anyone have a better way?
Thanks!
Right now giphy_get is great but the look and feel cannot be customized to match the app's brand.
Here is a screenshot with things that might be useful to customize:
I know that package giphy_picker allows for more customization (but I can't use it because they don't allow opening the picker in a modal view and opens a new page instead), would it make sense to use the same types of optional builders for each part of the modal to build the modal with customized widgets ?
I could propose a PR for this, let me know
Currently, to be able to get a production key, one needs to add the "Powered by Giphy" icon and add shortcut to each giphys creator, as according to this:
https://developers.giphy.com/docs/sdk/#data-collection
Is this work in the pipeline?
I just upgraded to latest version and I am suddenly getting the warnings below
../../../../.pub-cache/hosted/pub.dartlang.org/giphy_get-3.0.4/lib/src/views/tab/giphy_tab_detail.dart:238:22: Warning: Operand of null-aware operation '!' has type 'List' which excludes null.
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.