Refactoring + Checkpoint
This commit is contained in:
26
lib/presentation/widgets/fields/privacy_rules_field.dart
Normal file
26
lib/presentation/widgets/fields/privacy_rules_field.dart
Normal file
@@ -0,0 +1,26 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class PrivacyRulesField extends StatelessWidget {
|
||||
final Function(String?) onSaved;
|
||||
|
||||
const PrivacyRulesField({Key? key, required this.onSaved}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return TextFormField(
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Règles de confidentialité',
|
||||
border: OutlineInputBorder(),
|
||||
filled: true,
|
||||
fillColor: Colors.white,
|
||||
),
|
||||
validator: (value) {
|
||||
if (value == null || value.isEmpty) {
|
||||
return 'Veuillez entrer des règles de confidentialité';
|
||||
}
|
||||
return null;
|
||||
},
|
||||
onSaved: onSaved,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user