Fix a couple Vale linter warnings

This commit is contained in:
Jeroen Leenarts
2022-12-06 15:41:05 +01:00
parent dbbb2f26be
commit a338b9b95f
67 changed files with 303 additions and 303 deletions
+1 -1
View File
@@ -50,7 +50,7 @@ pubspec.lock
# If you don't generate documentation locally you can remove this line.
doc/api/
# Avoid committing generated Javascript files:
# Avoid committing generated JavaScript files:
*.dart.js
*.info.json # Produced by the --dump-info flag.
*.js # When generated by dart2js. Don't specify *.js if your
+13 -13
View File
@@ -17,7 +17,7 @@
🛑️ Breaking Changes from `5.0.0-beta.2`
- `Channel.addMembers`, `Channel.removeMembers`, `Channel.inviteMembers` and `Channel.update`
positional params are now optional params.
positional parameters are now optional parameters.
```dart
// previous
@@ -390,21 +390,21 @@ the [V4 Migration Guide](https://getstream.io/chat/docs/sdk/flutter/guides/migra
🛑️ Breaking Changes from `1.5.3`
- migrate this package to null safety
- `ConnectUserWithProvider` now requires `tokenProvider` as a required param. (Removed from the
- `ConnectUserWithProvider` now requires `tokenProvider` as a required parameter. (Removed from the
constructor)
- `client.disconnect()` is now divided into two different functions
- `client.closeConnection()` -> for closing user websocket connection.
- `client.closeConnection()` -> for closing user web socket connection.
- `client.disconnectUser()` -> for disconnecting user and resetting client state.
- `client.devToken()` now returns a `Token` model instead of `String`.
- `ApiError` is removed in favor of `StreamChatError`
- `StreamChatError` -> parent type for all the stream errors.
- `StreamWebSocketError` -> for user websocket related errors.
- `StreamWebSocketError` -> for user web socket related errors.
- `StreamChatNetworkError` -> for network related errors.
- `client.queryChannels()`, `channel.query()` options param is removed in favor of individual params
- `client.queryChannels()`, `channel.query()` options parameter is removed in favor of individual parameters
- `option.state` -> bool state
- `option.watch` -> bool watch
- `option.presence` -> bool presence
- `client.queryUsers()` options param is removed in favor of individual params
- `client.queryUsers()` options parameter is removed in favor of individual parameters
- `option.presence` -> bool presence
- Migrate this package to null safety
- Added typed filters
@@ -438,28 +438,28 @@ the [V4 Migration Guide](https://getstream.io/chat/docs/sdk/flutter/guides/migra
🛑️ Breaking Changes from `2.0.0-nullsafety.6`
- `ConnectUserWithProvider` now requires `tokenProvider` as a required param. (Removed from the
- `ConnectUserWithProvider` now requires `tokenProvider` as a required parameter. (Removed from the
constructor)
- `client.disconnect()` is now divided into two different functions
- `client.closeConnection()` -> for closing user websocket connection.
- `client.closeConnection()` -> for closing user web socket connection.
- `client.disconnectUser()` -> for disconnecting user and resetting client state.
- `client.devToken()` now returns a `Token` model instead of `String`.
- `ApiError` is removed in favor of `StreamChatError`
- `StreamChatError` -> parent type for all the stream errors.
- `StreamWebSocketError` -> for user websocket related errors.
- `StreamWebSocketError` -> for user web socket related errors.
- `StreamChatNetworkError` -> for network related errors.
- `client.queryChannels()`, `channel.query()` options param is removed in favor of individual params
- `client.queryChannels()`, `channel.query()` options parameter is removed in favor of individual parameters
- `option.state` -> bool state
- `option.watch` -> bool watch
- `option.presence` -> bool presence
- `client.queryUsers()` options param is removed in favor of individual params
- `client.queryUsers()` options parameter is removed in favor of individual parameters
- `option.presence` -> bool presence
✅ Added
- New `Location` enum is introduced for easily changing the client location/baseUrl.
- New `client.openConnection()` and `client.closeConnection()` is introduced to connect/disconnect
user ws connection.
user WS connection.
🔄 Changed
@@ -562,7 +562,7 @@ the [V4 Migration Guide](https://getstream.io/chat/docs/sdk/flutter/guides/migra
- 🛑 **BREAKING** Renamed `Client` to less generic `StreamChatClient`
- 🛑 **BREAKING** Segregated the persistence layer into separate
package [stream_chat_persistence](https://pub.dev/packages/stream_chat_persistence)
package [`stream_chat_persistence`](https://pub.dev/packages/stream_chat_persistence)
- 🛑 **BREAKING** Moved `Client.backgroundKeepAlive`
to [core package](https://pub.dev/packages/stream_chat_core)
- 🛑 **BREAKING** Moved `Client.showLocalNotification`
+6 -6
View File
@@ -39,7 +39,7 @@ There is a detailed Flutter example project in the `example` folder. You can dir
## Setup API Client
First you need to instantiate a chat client. The Chat client will manage API call, event handling and manage the websocket connection to Stream Chat servers. You should only create the client once and re-use it across your application.
First you need to instantiate a chat client. The Chat client will manage API call, event handling and manage the web socket connection to Stream Chat servers. You should only create the client once and re-use it across your application.
```dart
final client = StreamChatClient("stream-chat-api-key");
@@ -47,7 +47,7 @@ final client = StreamChatClient("stream-chat-api-key");
### Logging
By default the Chat Client will write all messages with level Warn or Error to stdout.
By default the Chat Client will write all messages with level Warn or Error to `stdout`.
#### Change Logging Level
@@ -59,7 +59,7 @@ final client = StreamChatClient("stream-chat-api-key", logLevel: Level.INFO);
#### Custom Logger
You can handle the log messages directly instead of have them written to stdout, this is very convenient if you use an error tracking tool or if you want to centralize your logs into one facility.
You can handle the log messages directly instead of have them written to `stdout`, this is very convenient if you use an error tracking tool or if you want to centralize your logs into one facility.
```dart
myLogHandlerFunction = (LogRecord record) {
@@ -71,7 +71,7 @@ final client = StreamChatClient("stream-chat-api-key", logHandlerFunction: myLog
### Offline storage
To add data persistance you can extend the class `ChatPersistenceClient` and pass an instance to the `StreamChatClient`.
To add data persistence, you can extend the class `ChatPersistenceClient` and pass an instance to the `StreamChatClient`.
```dart
class CustomChatPersistentClient extends ChatPersistenceClient {
@@ -84,7 +84,7 @@ final client = StreamChatClient(
)..chatPersistenceClient = CustomChatPersistentClient();
```
We provide an official persistent client in the [stream_chat_persistence](https://pub.dev/packages/stream_chat_persistence) package.
We provide an official persistent client in the [`stream_chat_persistence`](https://pub.dev/packages/stream_chat_persistence) package.
```dart
import 'package:stream_chat_persistence/stream_chat_persistence.dart';
@@ -104,7 +104,7 @@ final client = StreamChatClient(
### Code conventions
- Make sure that you run `dartfmt` before commiting your code
- Make sure that you run `dartfmt` before you commit your code
- Make sure all public methods and functions are well documented
### Running tests
+1 -1
View File
@@ -50,7 +50,7 @@ pubspec.lock
# If you don't generate documentation locally you can remove this line.
doc/api/
# Avoid committing generated Javascript files:
# Avoid committing generated JavaScript files:
*.dart.js
*.info.json # Produced by the --dump-info flag.
*.js # When generated by dart2js. Don't specify *.js if your
+8 -8
View File
@@ -1,4 +1,4 @@
## Upcomming
## Upcoming
🔄 Changed
@@ -43,7 +43,7 @@
✅ Added
- Added `StreamMemberGridView` and `StreamMemberListView`.
- Added support for additional text field params in `StreamMessageInput`
- Added support for additional text field parameters in `StreamMessageInput`
* `maxLines`
* `minLines`
* `textInputAction`
@@ -228,7 +228,7 @@
- Fix commands resetting the `StreamMessageInputController.value`.
- [[#996]](https://github.com/GetStream/stream-chat-flutter/issues/996) Videos break bottom photo
carousal.
- Fix: URLs with path and/or query params are not enriched.
- Fix: URLs with path and/or query parameters are not enriched.
- [[#1194]](https://github.com/GetStream/stream-chat-flutter/issues/1194) Request permission to
access gallery when opening the file picker.
@@ -892,11 +892,11 @@ typedef MessageBuilder = Widget Function(
## 1.0.0-beta
- **Refreshed widgets design**
- Improved api documentation
- Improved API documentation
- Updated `stream_chat` dependency to `^1.0.0-beta`
- Extracted sample app into dedicated [repo](https://github.com/GetStream/flutter-samples)
- Reimplemented existing widgets
using [stream_chat_flutter_core](https://pub.dev/packages/stream_chat_flutter_core)
- Extracted sample app into dedicated [repository](https://github.com/GetStream/flutter-samples)
- Re-implemented existing widgets
using [`stream_chat_flutter_core`](https://pub.dev/packages/stream_chat_flutter_core)
## 0.2.21
@@ -905,7 +905,7 @@ typedef MessageBuilder = Widget Function(
## 0.2.20+4
- Fix channelPreview when the message list is empty
- Fix `channelPreview` when the message list is empty
## 0.2.20+3
+9 -9
View File
@@ -32,7 +32,7 @@ It teaches you how to use this SDK and also shows how to make frequently require
## Example App
This repo includes a fully functional example app with setup instructions.
This repository includes a fully functional example app with setup instructions.
The example is available under the [example](https://github.com/GetStream/stream-chat-flutter/tree/master/packages/stream_chat_flutter/example) folder.
## Add dependency
@@ -46,7 +46,7 @@ You should then run `flutter packages get`
### Android
The package uses [photo_manager](https://pub.dev/packages/photo_manager) to access the device's photo library.
The package uses [`photo_manager`](https://pub.dev/packages/photo_manager) to access the device's photo library.
Follow [this wiki](https://pub.dev/packages/photo_manager#android-10-q-29) to fulfil the Android requirements.
### iOS
@@ -55,9 +55,9 @@ The library uses [flutter file picker plugin](https://github.com/miguelpruivo/fl
files from the os.
Follow [this wiki](https://github.com/miguelpruivo/flutter_file_picker/wiki/Setup#ios) to fulfill iOS requirements.
We also use [video_player](https://pub.dev/packages/video_player) to reproduce videos. Follow [this guide](https://pub.dev/packages/video_player#installation) to fulfill the requirements.
We also use [`video_player`](https://pub.dev/packages/video_player) to reproduce videos. Follow [this guide](https://pub.dev/packages/video_player#installation) to fulfill the requirements.
To pick images from the camera, we use the [image_picker](https://pub.dev/packages/image_picker) plugin.
To pick images from the camera, we use the [`image_picker`](https://pub.dev/packages/image_picker) plugin.
Follow [these instructions](https://pub.dev/packages/image_picker#ios) to check the requirements.
### Web
@@ -70,7 +70,7 @@ For the web, edit your `index.html` and add the following in the `<body>` tag in
### MacOS
For MacOS use the [file_selector](https://pub.dev/packages/file_selector#macos) package.
For MacOS use the [`file_selector`](https://pub.dev/packages/file_selector#macos) package.
Follow [these instructions](https://pub.dev/packages/file_selector#macos) to check the requirements.
You also need to add the following [entitlement](https://docs.flutter.dev/development/platform-integration/desktop#entitlements-and-the-app-sandbox):
@@ -88,8 +88,8 @@ If it seems related to the [flutter file picker plugin](https://github.com/migue
## Docs
This package provides UI components required for integrating Stream Chat into your application.
Alternatively, you may use the core package [stream_chat_flutter_core](https://github.com/GetStream/stream-chat-flutter/tree/master/packages/stream_chat_flutter_core) which allows more customisation and provides business logic but no UI components.
If you require the maximum amount of control over the API, please use the low level client package: [stream_chat](https://github.com/GetStream/stream-chat-flutter/tree/master/packages/stream_chat).
Alternatively, you may use the core package [`stream_chat_flutter_core`](https://github.com/GetStream/stream-chat-flutter/tree/master/packages/stream_chat_flutter_core) which allows more customisation and provides business logic but no UI components.
If you require the maximum amount of control over the API, please use the low level client package: [`stream_chat`](https://github.com/GetStream/stream-chat-flutter/tree/master/packages/stream_chat).
### UI Components
@@ -175,7 +175,7 @@ Out of the box, all chat widgets use their default styling, and there are two wa
### Offline storage
To add data persistance you can extend the class `ChatPersistenceClient` and pass an instance to the `StreamChatClient`.
To add data persistence you can extend the class `ChatPersistenceClient` and pass an instance to the `StreamChatClient`.
```dart
class CustomChatPersistentClient extends ChatPersistenceClient {
@@ -207,7 +207,7 @@ final client = StreamChatClient(
## Contributing
We welcome code changes that improve this library or fix a problem,
please make sure to follow all best practices and add tests if applicable before submitting a Pull Request on Github.
please make sure to follow all best practices and add tests if applicable before submitting a Pull Request on GitHub.
We are pleased to merge your code into the official repository.
Make sure to sign our [Contributor License Agreement (CLA)](https://docs.google.com/forms/d/e/1FAIpQLScFKsKkAJI7mhCr7K9rEIOpqIDThrWxuvxnwUq2XkHyG154vQ/viewform) first.
See our license file for more details.
@@ -21,7 +21,7 @@ import 'package:stream_chat_flutter/stream_chat_flutter.dart';
///
/// - We set up the Chat [StreamChatClient] with the API key
///
/// - We set the the current user for Chat with [StreamChatClient.connectUser]
/// - We set the current user for Chat with [StreamChatClient.connectUser]
/// and a pre-generated user token
///
/// - We make [StreamChat] the root Widget of our application