From 8d6cbfdfc9b7c0c41b36050ffa624eac7947dae8 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 4 May 2022 22:32:24 +0300 Subject: [PATCH] Fix docstyle comments --- .../forms/factories/field_cubit_factory.dart | 24 +++++++++---------- .../cubit/forms/validations/validations.dart | 4 ++-- lib/main.dart | 4 ++-- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/lib/logic/cubit/forms/factories/field_cubit_factory.dart b/lib/logic/cubit/forms/factories/field_cubit_factory.dart index c1b8abe7..d3255a5f 100644 --- a/lib/logic/cubit/forms/factories/field_cubit_factory.dart +++ b/lib/logic/cubit/forms/factories/field_cubit_factory.dart @@ -7,14 +7,14 @@ import 'package:selfprivacy/logic/cubit/users/users_cubit.dart'; class FieldCubitFactory { FieldCubitFactory(this.context); - /* A common user login field. - * - Available characters are lowercase a-z, digits and underscore _ - * - Must start with either a-z or underscore - * - Must be no longer than 'userMaxLength' characters - * - Must not be empty - * - Must not be a reserved root login - * - Must be unique - */ + /// A common user login field. + /// + /// - Available characters are lowercase a-z, digits and underscore _ + /// - Must start with either a-z or underscore + /// - Must be no longer than 'userMaxLength' characters + /// - Must not be empty + /// - Must not be a reserved root login + /// - Must be unique FieldCubit createUserLoginField() { final userAllowedRegExp = RegExp(r"^[a-z_][a-z0-9_]+$"); const userMaxLength = 31; @@ -35,10 +35,10 @@ class FieldCubitFactory { ); } - /* A common user password field. - * - Must fail on the regural expression of invalid matches: [\n\r\s]+ - * - Must not be empty - */ + /// A common user password field. + /// + /// - Must fail on the regural expression of invalid matches: [\n\r\s]+ + /// - Must not be empty FieldCubit createUserPasswordField() { var passwordForbiddenRegExp = RegExp(r"[\n\r\s]+"); return FieldCubit( diff --git a/lib/logic/cubit/forms/validations/validations.dart b/lib/logic/cubit/forms/validations/validations.dart index 34338559..91a8f75c 100644 --- a/lib/logic/cubit/forms/validations/validations.dart +++ b/lib/logic/cubit/forms/validations/validations.dart @@ -13,15 +13,15 @@ abstract class LengthStringValidation extends ValidationModel { } } -// String must be equal to [length] class LengthStringNotEqualValidation extends LengthStringValidation { + /// String must be equal to [length] LengthStringNotEqualValidation(int length) : super((n) => n.length != length, 'validations.length_not_equal'.tr(args: [length.toString()])); } -// String must be shorter than or equal to [length] class LengthStringLongerValidation extends LengthStringValidation { + /// String must be shorter than or equal to [length] LengthStringLongerValidation(int length) : super((n) => n.length > length, 'validations.length_longer'.tr(args: [length.toString()])); diff --git a/lib/main.dart b/lib/main.dart index db3f3b96..e5af3656 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -22,8 +22,8 @@ void main() async { await SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]); try { - /* Wakelock support for Linux - * desktop is not yet implemented */ + /// Wakelock support for Linux + /// desktop is not yet implemented await Wakelock.enable(); } on PlatformException catch (e) { print(e);