style: use conts for constructors

This commit is contained in:
Aleksey Kulikov 2021-09-23 10:48:23 +03:00
parent e0e16aea30
commit 7187d890d6
17 changed files with 39 additions and 69 deletions

View file

@ -1,16 +1,13 @@
import 'dart:ffi';
import 'bindings/libgit2_bindings.dart';
import 'bindings/odb.dart' as bindings;
import 'util.dart';
class Odb {
/// Initializes a new instance of [Odb] class from provided
/// pointer to Odb object in memory.
Odb(this._odbPointer) {
libgit2.git_libgit2_init();
}
const Odb(this._odbPointer);
late final Pointer<git_odb> _odbPointer;
final Pointer<git_odb> _odbPointer;
/// Pointer to memory address for allocated oid object.
Pointer<git_odb> get pointer => _odbPointer;