48 lines
1.2 KiB
Dart
48 lines
1.2 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
import 'dialog_input_field_select_item.dart';
|
|
import 'dialog_input_field_type_enum.dart';
|
|
|
|
/// Ein Input-Feld für den dynamischen Dialog
|
|
class DialogInputField {
|
|
/// Erstellt ein neues Input-Feld
|
|
const DialogInputField({
|
|
required this.id,
|
|
this.label,
|
|
this.initialValue,
|
|
this.keyboardType = TextInputType.text,
|
|
this.obscureText = false,
|
|
this.autoFocus = false,
|
|
this.onChanged,
|
|
this.inputType = DialogInputFieldTypeEnum.text,
|
|
this.selectItems = const [],
|
|
});
|
|
|
|
/// Die Id des InputFelds
|
|
final String id;
|
|
|
|
/// Der Label des InputFelds
|
|
final String? label;
|
|
|
|
/// Der initiale Wert des InputFelds
|
|
final dynamic initialValue;
|
|
|
|
/// Der InputTyp des InputFeld
|
|
final TextInputType keyboardType;
|
|
|
|
/// Ob der Text obskur angezeigt werden soll
|
|
final bool obscureText;
|
|
|
|
/// Ob das Textfeld automatisch fokussiert werden soll
|
|
final bool autoFocus;
|
|
|
|
/// Was bei Veränderung des Textfeldes geschehen soll
|
|
final ValueChanged<dynamic>? onChanged;
|
|
|
|
/// Stellt den Eingabetypen des Inputfeldes dar
|
|
final DialogInputFieldTypeEnum inputType;
|
|
|
|
/// Die Auswahlmöglichkeiten für den Select-Input-Typen
|
|
final List<DialogInputFieldSelectItem> selectItems;
|
|
}
|