Frontend first draft
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
|
||||
class PasswordValidationResult extends StatelessWidget {
|
||||
final String ruleName;
|
||||
final bool result;
|
||||
|
||||
const PasswordValidationResult({
|
||||
super.key,
|
||||
required this.ruleName,
|
||||
required this.result
|
||||
});
|
||||
|
||||
Color _selectColor(BuildContext context, bool res) {
|
||||
final scheme = Theme.of(context).colorScheme;
|
||||
return res ? scheme.secondary : scheme.error;
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Icon(
|
||||
result ? Icons.check : Icons.close,
|
||||
color: _selectColor(context, result),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
ruleName,
|
||||
style: TextStyle(color: _selectColor(context, result)),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user