updates
parent
84c718656b
commit
48a0e0d949
@ -0,0 +1,42 @@
|
||||
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, ),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue