With the new release of Dart 2 we’ve updated the servicestack Dart packages to support Dart 2+.
As this is a breaking change we’ve changed the major version number of servicestack Dart package to
1.0.5 which can be referenced with:
dependencies: servicestack: ^1.0.5
Where all non-Web (i.e. Flutter, Dart VM, Server and command-line tests) continue to use the same import and
import 'package:servicestack/client.dart'; var client = new JsonServiceClient(BaseUrl);
Whilst Dart Web and Angular Dart projects instead use:
import 'package:servicestack/web_client.dart'; var client = new JsonWebClient(BaseUrl);
Please refer to the Dart 2 migration guides for how to upgrade your Dart 1.x projects to Dart 2.x. At a minimum it requires changing the
sdk restriction in your
sdk: '>=2.0.0-dev.61.0 <3.0.0'
Normally all changes would be published in the next release notes but the next release is dependent on a new release of VS.NET as it contains support for Xamarin projects being able to the latest ServiceStack.Text which has been modified to use .NET’s new efficient
Span<T> types from the System.Memory NuGet package.