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