diff --git a/CHANGELOG.md b/CHANGELOG.md index de1cccb8c..73439e533 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,14 +3,42 @@ ### Breaking Changes * To avoid dependency on `dart:io` - `AppConfiguration.httpClient` is now of type [`Client`](https://pub.dev/documentation/http/latest/http/Client-class.html) and - - `AppConfiguration.baseFilePath` is now of type `String` + - `AppConfiguration.baseFilePath` is now of type `String`. + + Assuming you are configuring these today, migration is easy: + ```dart + import 'dart:io'; + import 'package:realm_dart/realm.dart'; + + final client = HttpClient(); + final dir = Directory.current; + final config = AppConfiguration( + 'your-app-id', + httpClient: client, + baseFilePath: dir, + ); + ``` + becomes: + ```dart + import 'dart:io'; + import 'package:realm_dart/realm.dart'; + import 'package:http/io_client.dart'; + + final client = HttpClient(); + final dir = Directory.current; + final config = AppConfiguration( + 'your-app-id', + httpClient: IOClient(client), + baseFilePath: dir.path, + ); + ``` (Issue [#1374](https://github.com/realm/realm-dart/issues/1374)) ### Enhancements * Report the originating error that caused a client reset to occur. (Core 14.9.0) * Allow the realm package, and code generated by realm_generator to be included when building for web without breaking compilation. (Issue [#1374](https://github.com/realm/realm-dart/issues/1374), - PR [#1713](https://github.com/realm/realm-dart/pull/1713)) + PR [#1713](https://github.com/realm/realm-dart/pull/1713)). This does **not** imply that realm works on web! ### Fixed * `Realm.writeAsync` did not handle async callbacks (`Future Function()`) correctly. (Issue [#1667](https://github.com/realm/realm-dart/issues/1667))