Fix docstyle comments

This commit is contained in:
NaiJi 2022-05-04 22:32:24 +03:00
parent 4c7cf05578
commit 8d6cbfdfc9
3 changed files with 16 additions and 16 deletions

View File

@ -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<String> 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<String> createUserPasswordField() {
var passwordForbiddenRegExp = RegExp(r"[\n\r\s]+");
return FieldCubit(

View File

@ -13,15 +13,15 @@ abstract class LengthStringValidation extends ValidationModel<String> {
}
}
// 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()]));

View File

@ -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);