You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.2 KiB
Dart
42 lines
1.2 KiB
Dart
import 'package:diplomaticquarterapp/theme/colors.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter_svg/flutter_svg.dart';
|
|
|
|
class GenderSelector extends StatelessWidget{
|
|
|
|
final String vectorUrl;
|
|
final bool isSelected;
|
|
final VoidCallback onTap;
|
|
|
|
const GenderSelector({super.key, required this.vectorUrl, required this.isSelected, required this.onTap});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return GestureDetector(
|
|
onTap: (){
|
|
onTap();
|
|
},
|
|
behavior: HitTestBehavior.opaque,
|
|
child: SizedBox(
|
|
height: 120,width: 120,
|
|
child: Material(
|
|
shape: RoundedRectangleBorder(
|
|
side: isSelected?BorderSide(width: 5, color: CustomColors.accentColor): BorderSide.none,
|
|
borderRadius: BorderRadius.circular(100),
|
|
),
|
|
child: Material(
|
|
color: Colors.white,
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(100),
|
|
),
|
|
child: Padding(
|
|
padding: const EdgeInsets.all(22.0),
|
|
child: SvgPicture.asset(vectorUrl, ),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
|
|
} |