Skip to content

Commit

Permalink
chore: fix pana issues (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
VladislavFitz authored Sep 5, 2023
1 parent 0b16baa commit e2fced4
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 38 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

## 📦 Packages

| Package | Description | Version | Release stage |
|----------------------------------|-----------------------------|----------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------|
| [algolia_insights](insights) | Algolia Insights for Dart | [![pub package](https://img.shields.io/pub/v/algolia_insights.svg)](https://pub.dev/packages/algolia_insights) | ![beta version](https://img.shields.io/badge/release-beta-yellowgreen) |
| [algolia_helper_flutter](helper) | Algolia Helpers for Flutter | [![pub package](https://img.shields.io/pub/v/algolia_helper_flutter.svg)](https://pub.dev/packages/algolia_helper_flutter) | ![beta version](https://img.shields.io/badge/release-beta-yellowgreen) |
| Package | Description | Version | Release stage |
|----------------------------------|------------------------------|----------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------|
| [algolia_insights](insights) | Algolia Insights for Flutter | [![pub package](https://img.shields.io/pub/v/algolia_insights.svg)](https://pub.dev/packages/algolia_insights) | ![beta version](https://img.shields.io/badge/release-beta-yellowgreen) |
| [algolia_helper_flutter](helper) | Algolia Helpers for Flutter | [![pub package](https://img.shields.io/pub/v/algolia_helper_flutter.svg)](https://pub.dev/packages/algolia_helper_flutter) | ![beta version](https://img.shields.io/badge/release-beta-yellowgreen) |

## 📄 Documentation

Expand Down
10 changes: 5 additions & 5 deletions helper/example/multi_searcher.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ void main() {
// Instantiate a facet searcher from multi searcher
final facetSearcher = multiSearcher.addFacetSearcher(
initialState: const FacetSearchState(
facet: 'brand',
searchState: SearchState(
indexName: 'instant_search',
),
));
facet: 'brand',
searchState: SearchState(
indexName: 'instant_search',
),
));

// Use facet and hits searcher as independent components

Expand Down
17 changes: 8 additions & 9 deletions helper/example/multi_searcher_app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,14 @@ class _MyHomePageState extends State<MyHomePage> {
);
facetSearcher = multiSearcher.addFacetSearcher(
initialState: const FacetSearchState(
facet: 'brand',
searchState: SearchState(
indexName: 'instant_search',
),
));
facet: 'brand',
searchState: SearchState(
indexName: 'instant_search',
),
));
}

SizedBox header(String title) =>
SizedBox(
SizedBox header(String title) => SizedBox(
width: double.infinity,
child: Padding(
padding: const EdgeInsets.only(left: 15),
Expand Down Expand Up @@ -146,7 +145,7 @@ class _MyHomePageState extends State<MyHomePage> {
text: TextSpan(
style: Theme.of(context).textTheme.titleSmall,
children:
hit.getHighlightedString('name').toInlineSpans(),
hit.getHighlightedString('name').toInlineSpans(),
),
),
);
Expand All @@ -161,4 +160,4 @@ class _MyHomePageState extends State<MyHomePage> {
]),
);
}
}
}
22 changes: 11 additions & 11 deletions helper/lib/src/highlighting_core.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,17 @@ extension HighlightableFacet on Facet {
/// ```dart
/// var highlightedString = facet.getHighlightedString();
/// ```
HighlightedString getHighlightedString(
{
String preTag = '<em>',
String postTag = '</em>',
bool inverted = false,
}) => HighlightedString.of(
highlighted as String,
preTag: preTag,
postTag: postTag,
inverted: inverted,
);
HighlightedString getHighlightedString({
String preTag = '<em>',
String postTag = '</em>',
bool inverted = false,
}) =>
HighlightedString.of(
highlighted as String,
preTag: preTag,
postTag: postTag,
inverted: inverted,
);
}

/// Highlighted string as a list of [tokens].
Expand Down
2 changes: 1 addition & 1 deletion helper/lib/src/searcher/multi_searcher.dart
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ class _MultiSearcher with DisposableMixin implements MultiSearcher {
}) {
_log.finest(
'add facet searcher for index ${initialState.searchState.indexName}, '
'attribute: ${initialState.facet}');
'attribute: ${initialState.facet}');
final service = ProxyFacetSearchService();
final searcher = FacetSearcher.custom(
service,
Expand Down
2 changes: 1 addition & 1 deletion helper/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: algolia_helper_flutter
description: Patterns and APIs to implement advanced search features with Algolia for Flutter
version: 0.4.0
homepage: https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/flutter/
repository: https://github.com/algolia/algoliasearch-helper-flutter/tree/main/helper_flutter
repository: https://github.com/algolia/algoliasearch-helper-flutter/tree/main/helper
environment:
sdk: '>=3.0.0 <4.0.0'
flutter: '>=1.17.0'
Expand Down
2 changes: 1 addition & 1 deletion helper/test/version_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ void main() {
expect(match, isNotNull);
expect(libVersion, match?.group(1)?.trim());
});
}
}
8 changes: 4 additions & 4 deletions insights/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Algolia Insights for Dart
## Algolia Insights for Flutter

Algolia Insights is a Flutter library for tracking and analyzing user behavior on search and discovery experiences powered
by Algolia. The purpose of Algolia Insights is to provide a simple and flexible way to track events such as clicks,
Expand All @@ -13,7 +13,7 @@ Add the Algolia Insights package to your pubspec.yaml file:

```yaml
dependencies:
algolia_insights: ^0.1.0
algolia_insights: ^0.2.0
```
### Initializing the Insights
Expand All @@ -25,8 +25,8 @@ Algolia application ID and API key.
import 'package:algolia_insights/algolia_insights.dart';

Insights insights = Insights(
'YourApplicationID',
'YourAPIKey',
applicationID: 'YourApplicationID',
apiKey: 'YourAPIKey',
);
```

Expand Down
2 changes: 1 addition & 1 deletion insights/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: algolia_insights
description: Algolia Insights for Dart provides a simple and flexible way to track events such as clicks, conversions, and views on search results.
version: 0.2.0
homepage: https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/flutter/
repository: https://github.com/algolia/algoliasearch-helper-flutter/tree/main/insights_dart
repository: https://github.com/algolia/algoliasearch-helper-flutter/tree/main/insights

environment:
sdk: ">=2.17.5 <4.0.0"
Expand Down
2 changes: 1 addition & 1 deletion insights/test/version_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ void main() {
expect(match, isNotNull);
expect(libVersion, match?.group(1)?.trim());
});
}
}

0 comments on commit e2fced4

Please sign in to comment.