41 lines
1.1 KiB
Dart
41 lines
1.1 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:ui_kit/select.dart';
|
|
import 'package:ui_kit/utils.dart';
|
|
|
|
class SelectSection extends StatefulWidget {
|
|
const SelectSection({super.key});
|
|
|
|
@override
|
|
State<SelectSection> createState() => _SelectSectionState();
|
|
}
|
|
|
|
class _SelectSectionState extends State<SelectSection> {
|
|
static final selectItems = [
|
|
{'value': ''},
|
|
{'value': 'Мужской'},
|
|
{'value': 'Гарвард Троцкий', 'image': "assets/people.png"},
|
|
];
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return SizedBox(
|
|
width: width(context) * 100,
|
|
height: height(context) * 33,
|
|
child: ListView.builder(
|
|
itemCount: selectItems.length,
|
|
itemBuilder: (BuildContext context, int index) {
|
|
final currenItem = selectItems[index];
|
|
return Container(
|
|
padding: EdgeInsets.only(bottom: height(context) * 2),
|
|
child: SelectWidget(
|
|
hintText: 'Пол',
|
|
selectedValue: currenItem['value'] ?? "",
|
|
image: currenItem['image'],
|
|
),
|
|
);
|
|
},
|
|
),
|
|
);
|
|
}
|
|
}
|