Skip to content

docs(showcase): add Perplexity Dart & Flutter SDKs showcase #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 2, 2025

Conversation

vishnu32510
Copy link
Contributor

Description

Adding comprehensive documentation for perplexity_dart and perplexity_flutter - open-source SDKs that provide type-safe, developer-friendly integration with Perplexity's API. Includes practical examples, installation guides, and advanced usage patterns.

Type of Contribution

  • Example Tutorial
  • Showcase Project
  • Article/Integration Guide
  • Documentation Update
  • Bug Fix
  • Other (please describe)

Checklist

  • My code follows the cookbook's style guidelines
  • I have included comprehensive documentation
  • I have tested my code and it works as expected
  • I have included all necessary dependencies and setup instructions
  • My MDX file includes proper frontmatter (title, description, keywords)
  • I have linked to any external repositories or live demos

Project Details

What problem does this solve?
Integrating with Perplexity's API requires handling raw HTTP requests, streaming logic, and complex multimodal processing. These SDKs solve:

  • Complex API integration and JSON parsing
  • Real-time streaming implementation
  • Type safety for API responses
  • Multimodal text + image processing
  • Flutter state management integration
  • Error handling and model management

What makes this contribution valuable to other developers?

  1. Type-Safe Integration - Fully typed models with IntelliSense support
  2. Multimodal Capabilities - Easy text + image processing with MessagePart system
  3. Streaming Support - Built-in real-time response handling
  4. Flutter Widgets - Drop-in UI components with BLoC state management
  5. Future-Proof - Custom model string support for new releases
  6. Production Ready - Error handling, security best practices, comprehensive docs
  7. Open Source - Published on pub.dev for community use
  8. Developer Experience - Reduces integration time from hours to minutes

External Links:

Testing

Core API Testing:

  • Non-streaming chat completions with all model variants
  • Streaming responses with proper chunk handling
  • Multi-image processing (base64, data URI, HTTPS URLs)
  • Advanced configuration (temperature, top-p, search filters)
  • Error handling for API failures and rate limits
  • Cross-platform compatibility (iOS, Android, Web, Desktop)

Flutter Widget Testing:

  • ChatWrapperWidget integration with BLoC state management
  • Real-time message display and user interaction handling
  • Flutter app integration and lifecycle management

Real-World Usage:

  • Used in production for Fact Dynamics app
  • Tested in hackathon environment with scale requirements
  • Community feedback incorporated from pub.dev releases

Additional Notes

These SDKs provide production-ready tools for Flutter/Dart developers to integrate Perplexity's AI capabilities with minimal setup time. The two-layer architecture (core API + Flutter widgets) offers flexibility for different use cases while maintaining type safety and comprehensive error handling.

Copy link
Collaborator

@kesku kesku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is super comprehensive — great job on the SDKs! That said, this doc reads more like a technical reference or full README.

Let's trim it to just showcase the project:

  • What the Dart + Flutter SDKs are
  • What problems they solve for app devs
  • How they use Sonar
  • Key links (pub.dev, repo, example apps)

@vishnu32510 vishnu32510 requested a review from kesku August 2, 2025 06:13
@vishnu32510
Copy link
Contributor Author

Hi @kesku! Thank you for the feedback. I've updated the docs as you suggested.

@kesku kesku merged commit c17d4f5 into perplexityai:main Aug 2, 2025
5 checks passed
@kesku
Copy link
Collaborator

kesku commented Aug 2, 2025

Live on https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter - next to the other showcase - thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants