62 lines
1.6 KiB
Dart
62 lines
1.6 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:fforte/l10n/app_localizations.dart';
|
|
|
|
class FotoFilm extends StatefulWidget {
|
|
final Function(String) onFotoFilmChanged;
|
|
final String initialFotoFilm;
|
|
|
|
const FotoFilm(
|
|
{super.key,
|
|
required this.onFotoFilmChanged,
|
|
this.initialFotoFilm = 'foto'});
|
|
|
|
@override
|
|
State<FotoFilm> createState() => _FotoFilmState();
|
|
}
|
|
|
|
class _FotoFilmState extends State<FotoFilm> {
|
|
String? _selectedFotoFilm;
|
|
|
|
@override
|
|
void initState() {
|
|
super.initState();
|
|
_selectedFotoFilm = widget.initialFotoFilm;
|
|
}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Column(
|
|
children: [
|
|
ListTile(
|
|
visualDensity: const VisualDensity(vertical: -4),
|
|
title: Text(AppLocalizations.of(context)!.foto),
|
|
leading: Radio<String>(
|
|
value: 'Foto',
|
|
groupValue: _selectedFotoFilm,
|
|
onChanged: (value) {
|
|
setState(() {
|
|
_selectedFotoFilm = value;
|
|
widget.onFotoFilmChanged(value!);
|
|
});
|
|
},
|
|
),
|
|
),
|
|
ListTile(
|
|
visualDensity: const VisualDensity(vertical: -4),
|
|
title: Text(AppLocalizations.of(context)!.film),
|
|
leading: Radio<String>(
|
|
value: 'Film',
|
|
groupValue: _selectedFotoFilm,
|
|
onChanged: (value) {
|
|
setState(() {
|
|
_selectedFotoFilm = value;
|
|
widget.onFotoFilmChanged(value!);
|
|
});
|
|
},
|
|
),
|
|
),
|
|
],
|
|
);
|
|
}
|
|
}
|