refactor!: use named arguments if there is more than one

This commit is contained in:
Aleksey Kulikov 2021-09-30 18:04:36 +03:00
parent ec80ad3dd4
commit 5f7fdf4bd3
66 changed files with 1920 additions and 1136 deletions

View file

@ -10,12 +10,12 @@ import '../util.dart';
/// either the name or the email parameter.
///
/// Throws a [LibGit2Error] if error occured.
Pointer<git_signature> create(
String name,
String email,
int time,
int offset,
) {
Pointer<git_signature> create({
required String name,
required String email,
required int time,
required int offset,
}) {
final out = calloc<Pointer<git_signature>>();
final nameC = name.toNativeUtf8().cast<Int8>();
final emailC = email.toNativeUtf8().cast<Int8>();
@ -34,7 +34,7 @@ Pointer<git_signature> create(
/// Create a new action signature with a timestamp of 'now'.
///
/// Throws a [LibGit2Error] if error occured.
Pointer<git_signature> now(String name, String email) {
Pointer<git_signature> now({required String name, required String email}) {
final out = calloc<Pointer<git_signature>>();
final nameC = name.toNativeUtf8().cast<Int8>();
final emailC = email.toNativeUtf8().cast<Int8>();