giphy_flutter 0.1.0 copy "giphy_flutter: ^0.1.0" to clipboard
giphy_flutter: ^0.1.0 copied to clipboard

A production-ready Flutter SDK and UI package for GIPHY integration.

0.1.0 #

First release with a stable public API. Everything below is relative to 0.0.1, which was never functional as a consumer-facing package.

Breaking changes #

  • GiphyPaginationController's unnamed constructor now takes a GiphyRepository (GiphyPaginationController(repository: ...)). The previous use-case form moved to GiphyPaginationController.fromUseCases(...), and all four use cases there are now required rather than nullable — a missing one used to fail at runtime when the user switched content type.
  • GiphyBottomSheet's type: parameter is now initialType:, matching the fact that it only seeds the initial value.
  • rating is a GiphyRating enum everywhere; the String form is gone.
  • GiphyRepository and GiphyRemoteDataSource gained close(). Custom implementations must add it.
  • GiphyServiceLocator.getDependencies() is gone — it handed out a graph without recording a holder, which defeated the reference counting that now bounds the HTTP client's lifetime. Use acquire(apiKey) and pair it with release(apiKey).
  • GiphyDependencies no longer exposes remoteDataSource, and its generative constructor is private. Build one with GiphyDependencies.fromRepository(...) or GiphyDependencies.forApiKey(...).
  • Dropped provider and flutter_hooks as dependencies. The sheet is a plain StatefulWidget and the controller a plain ChangeNotifier, so the package no longer imposes a state-management choice.
  • Removed json_serializable/build_runner; JSON mapping is hand-written and giphy_models.g.dart is deleted. No codegen step is needed to build the package.
  • Minimum SDK raised to Dart 3.4 / Flutter 3.22.

Fixed #

  • Searches were silently dropped. loadMore bailed out whenever a request was in flight, so typing a new query — or switching between GIFs and stickers — while the first page was loading did nothing. Worse, the stale response then appended into the freshly cleared list. Requests now carry a generation stamp; a superseded response is discarded and the newest intent always wins.
  • Cancellations were detected by matching on an error message string, so any reworded message would have surfaced a cancellation as a real error. There is now a GiphyCancelledException, and it is never reported through controller.error.
  • JSON decoding happened outside the data source's try, so a malformed payload escaped the GiphyException hierarchy as a raw TypeError. Parsing is now inside, and failures arrive as GiphyParseException naming the endpoint.
  • GIPHY omits renditions on some assets; requiring preview_gif and fixed_height meant a single unusual GIF failed the whole page. Parsing falls back through alternative renditions, so original, fixedHeight and preview are always populated.
  • meta.status errors, which GIPHY returns with HTTP 200, were treated as success.
  • toJson() returned nested model objects rather than maps, so encoding a GIF threw. Encoding is now deep and round-trips.
  • No Dio timeouts were configured, so a stalled connection hung forever. Now 10s connect / 20s receive, both overridable.
  • The service locator cached a Dio per API key and never released one, leaking a connection pool per key for the process lifetime. It is now reference counted: acquire/release, closing the client when the last holder leaves.
  • The search debounce timer was not cancelled on dispose, firing a request into a torn-down controller.
  • The attribution footer was hardcoded white and therefore invisible on GiphyTheme.light. It is now themed via attributionStyle.
  • controller.gifs handed out the internal mutable list.
  • Paging past GIPHY's offset ceiling of 4999 produced an API error instead of stopping; GiphyPagination.hasMore now accounts for it.
  • limit is clamped to GIPHY's maximum of 50 instead of being sent verbatim.
  • Removed a Dio interceptor onError handler that could not run, since the data source already converted errors before it was reached.

Added #

  • GiphyRepositoryImpl.withApiKey(apiKey) — previously there was no way for a consumer to construct the repository, because the data source was not exported. The public barrel now exports the data, domain and presentation layers.
  • GiphyLabels for localising every string in the sheet.
  • GiphyServiceLocator.register(apiKey, dependencies), so a caller can route the package's widgets — GiphyBottomSheet included — through a repository they configured themselves, or through a fake in tests. cachedKeyCount and holderCount(apiKey) expose the cache's state for diagnostics.
  • GiphyBottomSheet parameters: pageSize, searchDebounce, heightFactor, labels, and useSafeArea on open.
  • GiphyTheme.copyWith, value equality, and an errorColor.
  • Semantics labels on grid tiles and the type selector.
  • Thumbnails decode at a bounded width, cutting memory use on grids of large GIFs.
  • /// documentation on every public member, with public_member_api_docs enabled.

0.0.1 #

  • Initial scaffold.
0
likes
140
points
124
downloads

Documentation

API reference

Publisher

verified publisherlazyalgorithm.com

Weekly Downloads

A production-ready Flutter SDK and UI package for GIPHY integration.

Repository (GitHub)
View/report issues

Topics

#giphy #gif #stickers #picker

License

MIT (license)

Dependencies

cached_network_image, dio, equatable, flutter

More

Packages that depend on giphy_flutter