Skip to content
This repository has been archived by the owner on Jan 17, 2024. It is now read-only.

Commit

Permalink
Migrate away from elementAt
Browse files Browse the repository at this point in the history
  • Loading branch information
dcharkes committed Jan 15, 2024
1 parent c926657 commit 2dcd835
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 2.1.1

- Require Dart 3.3.0 or greater.
- Migrate `elementAt` use to `operator +`.

## 2.1.0

- Require Dart 3.0.0 or greater.
Expand Down
2 changes: 1 addition & 1 deletion lib/src/utf16.dart
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ extension Utf16Pointer on Pointer<Utf16> {
final buffer = StringBuffer();
var i = 0;
while (true) {
final char = codeUnits.elementAt(i).value;
final char = (codeUnits + i).value;
if (char == 0) {
return buffer.toString();
}
Expand Down
10 changes: 5 additions & 5 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
name: ffi
version: 2.1.0
version: 2.1.1
description: Utilities for working with Foreign Function Interface (FFI) code.
repository: https://github.com/dart-lang/ffi

topics:
- interop
- ffi
- codegen
- interop
- ffi
- codegen

environment:
sdk: '>=3.0.0 <4.0.0'
sdk: '>=3.3.0-279.1.beta <4.0.0'

dev_dependencies:
test: ^1.21.2
Expand Down

0 comments on commit 2dcd835

Please sign in to comment.