begin dog section
This commit is contained in:
92
lib/screens/Excursion/widgets/hund_u_leine.dart
Normal file
92
lib/screens/Excursion/widgets/hund_u_leine.dart
Normal file
@@ -0,0 +1,92 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
|
||||
class HundULeine extends StatefulWidget {
|
||||
final Function(String) onMHundChanged;
|
||||
|
||||
const HundULeine({super.key, required this.onMHundChanged});
|
||||
|
||||
@override
|
||||
HundULeineState createState() => HundULeineState();
|
||||
}
|
||||
|
||||
class HundULeineState extends State<HundULeine> {
|
||||
String? _selectedValue;
|
||||
TextEditingController controller = TextEditingController();
|
||||
bool visible = false;
|
||||
|
||||
void onChanged(String mHund, String name, String mLeine) {
|
||||
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
children: [
|
||||
Text(AppLocalizations.of(context)!.mHund),
|
||||
ListTile(
|
||||
visualDensity: const VisualDensity(vertical: -4),
|
||||
title: Text(AppLocalizations.of(context)!.ja),
|
||||
leading: Radio<String>(
|
||||
value: "ja",
|
||||
groupValue: _selectedValue,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
_selectedValue = value;
|
||||
visible = value == "ja" ? true : false;
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
ListTile(
|
||||
visualDensity: const VisualDensity(vertical: -4),
|
||||
title: Text(AppLocalizations.of(context)!.nein),
|
||||
leading: Radio<String>(
|
||||
value: "nein",
|
||||
groupValue: _selectedValue,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
_selectedValue = value;
|
||||
visible = value == "ja" ? true : false;
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
if (visible) ...[
|
||||
TextField(
|
||||
controller: controller,
|
||||
),
|
||||
Text(AppLocalizations.of(context)!.mLeine),
|
||||
ListTile(
|
||||
visualDensity: const VisualDensity(vertical: -4),
|
||||
title: Text(AppLocalizations.of(context)!.ja),
|
||||
leading: Radio<String>(
|
||||
value: "ja",
|
||||
groupValue: _selectedValue,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
_selectedValue = value;
|
||||
widget.onMHundChanged(value!);
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
ListTile(
|
||||
visualDensity: const VisualDensity(vertical: -4),
|
||||
title: Text(AppLocalizations.of(context)!.nein),
|
||||
leading: Radio<String>(
|
||||
value: "nein",
|
||||
groupValue: _selectedValue,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
_selectedValue = value;
|
||||
widget.onMHundChanged(value!);
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
]
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
0
lib/screens/Excursion/widgets/hund_u_leine.dart~
Normal file
0
lib/screens/Excursion/widgets/hund_u_leine.dart~
Normal file
Reference in New Issue
Block a user