{"id":23315400,"url":"https://github.com/thriveengineer/brave_api","last_synced_at":"2026-05-04T08:36:00.057Z","repository":{"id":268928124,"uuid":"905898715","full_name":"ThriveEngineer/brave_api","owner":"ThriveEngineer","description":"A Package for Flutter that makes it to use the Brave API easy.","archived":false,"fork":false,"pushed_at":"2024-12-19T19:11:23.000Z","size":28,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-07T03:30:54.644Z","etag":null,"topics":["api","brave","brave-api","dart","dart-package","flutter","flutter-package","package"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/brave_api","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ThriveEngineer.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-19T18:40:30.000Z","updated_at":"2024-12-19T19:11:26.000Z","dependencies_parsed_at":"2024-12-25T22:06:33.340Z","dependency_job_id":null,"html_url":"https://github.com/ThriveEngineer/brave_api","commit_stats":null,"previous_names":["thriveengineer/brave_api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ThriveEngineer/brave_api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThriveEngineer%2Fbrave_api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThriveEngineer%2Fbrave_api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThriveEngineer%2Fbrave_api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThriveEngineer%2Fbrave_api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ThriveEngineer","download_url":"https://codeload.github.com/ThriveEngineer/brave_api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThriveEngineer%2Fbrave_api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281171643,"owners_count":26455534,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-26T02:00:06.575Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","brave","brave-api","dart","dart-package","flutter","flutter-package","package"],"created_at":"2024-12-20T15:34:48.717Z","updated_at":"2025-10-26T20:49:38.036Z","avatar_url":"https://github.com/ThriveEngineer.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Brave Search Flutter\n\nA highly customizable Flutter package that provides a search interface using the Brave Search API. This package offers a rich set of features and customization options for creating a seamless search experience in your Flutter applications.\n[pub.dev](https://pub.dev/packages/brave_api)\n## Features\n\n🔍 **Core Features**\n- Full-featured search interface using Brave Search API\n- Built-in WebView for Android\n- External URL launcher for iOS\n- Search result caching\n- Error handling\n\n🎨 **Customization Options**\n- Fully customizable search screen\n- Custom themes and styling\n- Custom loading states\n- Custom error handling\n- Custom result rendering\n- Custom animations and transitions\n\n🛠️ **Advanced Features**\n- Platform-specific behavior handling\n- Extensive callback system\n- Navigation controls\n- Progress indicators\n- JavaScript control\n- Custom scroll physics\n\n## Installation\n\nAdd this to your package's `pubspec.yaml` file:\n\n```yaml\ndependencies:\n  brave_api: ^1.0.1\n```\n\nThen run:\n```bash\nflutter pub get\n```\n\n## Setup\n\n1. Initialize the package with your Brave Search API key:\n\n```dart\nvoid main() {\n  BraveSearchConfig.initialize(apiKey: 'YOUR_BRAVE_API_KEY');\n  runApp(MyApp());\n}\n```\n\n2. Import the package:\n\n```dart\nimport 'package:brave_api/brave_api.dart';\n```\n\n## Basic Usage\n\n```dart\nclass MyApp extends StatelessWidget {\n  @override\n  Widget build(BuildContext context) {\n    return MaterialApp(\n      home: BraveSearchScreen(\n        title: 'Search',\n        onResultSelected: (result) {\n          print('Selected: ${result.title}');\n        },\n      ),\n    );\n  }\n}\n```\n\n## Advanced Customization\n\n### Custom Search Screen Styling\n\n```dart\nBraveSearchScreen(\n  title: 'Custom Search',\n  titleStyle: TextStyle(\n    fontSize: 24,\n    fontWeight: FontWeight.bold,\n    color: Colors.indigo,\n  ),\n  searchDecoration: InputDecoration(\n    hintText: 'What are you looking for?',\n    prefixIcon: Icon(Icons.search),\n    border: OutlineInputBorder(\n      borderRadius: BorderRadius.circular(15),\n    ),\n  ),\n  backgroundColor: Colors.grey[50],\n  resultsPadding: EdgeInsets.all(16),\n)\n```\n\n### Custom Loading and Error States\n\n```dart\nBraveSearchScreen(\n  loadingIndicator: Column(\n    mainAxisAlignment: MainAxisAlignment.center,\n    children: [\n      CircularProgressIndicator(),\n      SizedBox(height: 16),\n      Text('Searching...'),\n    ],\n  ),\n  errorBuilder: (context, error) =\u003e Center(\n    child: Column(\n      mainAxisAlignment: MainAxisAlignment.center,\n      children: [\n        Icon(Icons.error_outline),\n        Text('Error: $error'),\n        ElevatedButton(\n          onPressed: () =\u003e print('Retry'),\n          child: Text('Retry'),\n        ),\n      ],\n    ),\n  ),\n)\n```\n\n### Custom Result Rendering\n\n```dart\nBraveSearchScreen(\n  resultBuilder: (context, result) =\u003e Card(\n    margin: EdgeInsets.symmetric(horizontal: 16, vertical: 8),\n    child: ListTile(\n      title: Text(\n        result.title,\n        style: TextStyle(fontWeight: FontWeight.bold),\n      ),\n      subtitle: Text(result.description),\n      trailing: Icon(Icons.arrow_forward),\n      onTap: () =\u003e print('Selected: ${result.title}'),\n    ),\n  ),\n)\n```\n\n### Custom WebView Configuration\n\n```dart\nWebViewScreen(\n  url: 'https://example.com',\n  enableJavaScript: true,\n  enableZoom: true,\n  loadingIndicator: CircularProgressIndicator(),\n  navigationActions: [\n    IconButton(\n      icon: Icon(Icons.refresh),\n      onPressed: () =\u003e print('Refresh'),\n    ),\n  ],\n)\n```\n\n## Available Customization Options\n\n### Search Screen Options\n- `title`: Custom title for the search screen\n- `titleStyle`: Custom style for the title\n- `searchDecoration`: Custom decoration for the search input field\n- `theme`: Custom theme for the entire search screen\n- `appBar`: Custom app bar widget\n- `loadingIndicator`: Custom loading indicator widget\n- `errorBuilder`: Custom error widget builder\n- `emptyResultsWidget`: Custom empty results widget\n- `resultBuilder`: Custom search result builder\n- `backgroundColor`: Custom background color\n- `resultDivider`: Custom divider between results\n- `animationDuration`: Animation duration for loading states\n- `scrollPhysics`: Custom scroll physics for the results list\n- `resultsPadding`: Custom padding for search results\n\n### WebView Options\n- `enableJavaScript`: Enable/disable JavaScript\n- `enableZoom`: Enable/disable zoom controls\n- `userAgent`: Custom user agent string\n- `navigationDelegate`: Custom navigation handling\n- `progressIndicatorBuilder`: Custom progress indicator\n- `navigationActions`: Custom navigation controls\n\n### Callback Options\n- `onSearch`: Triggered when a search is performed\n- `onResultSelected`: Triggered when a result is selected\n- `onError`: Triggered when an error occurs\n\n## Platform Specific Behavior\n\nThe package automatically handles platform-specific behaviors:\n- Android: Opens results in an in-app WebView\n- iOS: Opens results in the default browser using URL launcher\n\n## Contributing\n\nWe welcome contributions! Please feel free to submit a Pull Request.\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthriveengineer%2Fbrave_api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthriveengineer%2Fbrave_api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthriveengineer%2Fbrave_api/lists"}