From e6f006580b7e6c542761c0ccd876e20160964fe7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Overg=C3=A5rd=20Nielsen?= Date: Wed, 21 Sep 2022 12:19:49 +0200 Subject: [PATCH] Fix comments from PR review --- generator/test/test_util.dart | 6 +++--- lib/src/realm_property.dart | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/generator/test/test_util.dart b/generator/test/test_util.dart index 0592c0edb8..b048e87509 100644 --- a/generator/test/test_util.dart +++ b/generator/test/test_util.dart @@ -38,7 +38,7 @@ Future generatorTestBuilder(String directoryName, String inputFileName, Future> getInputFileAsset(String inputFilePath) async { var key = 'pkg|$inputFilePath'; - String inputContent = await File(inputFilePath).readFileAsDartCode(); + String inputContent = await File(inputFilePath).readAsDartCode(); return {key: inputContent}; } @@ -179,7 +179,7 @@ class LinesEqualsMatcher extends Matcher { Future> getExpectedFileAsset(String inputFilePath, String expectedFilePath) async { var key = 'pkg|${_path.setExtension(inputFilePath, '.realm_objects.g.part')}'; return { - key: myersDiff(await File(expectedFilePath).readFileAsDartCode()), + key: myersDiff(await File(expectedFilePath).readAsDartCode()), }; } @@ -195,7 +195,7 @@ extension FileEx on File { return LineSplitter.split(content).join('\n'); } - Future readFileAsDartCode() async { + Future readAsDartCode() async { final content = await readAsString(encoding: utf8); final formatter = DartFormatter(lineEnding: '\n'); return formatter.format(content); diff --git a/lib/src/realm_property.dart b/lib/src/realm_property.dart index e07484c3de..e1392ce548 100644 --- a/lib/src/realm_property.dart +++ b/lib/src/realm_property.dart @@ -34,7 +34,7 @@ abstract class SchemaProperty { /// `true` if the property is a primary key. bool get primaryKey; - /// `true` if the property is a primary key. + /// `true` if the property is indexed. bool get indexed; /// Defines the [Realm] collection type if this property is a collection.