Feat: done logic button switcher
This commit is contained in:
parent
45194729c6
commit
00083b6e75
|
@ -211,7 +211,6 @@ class _BookingTicketsState extends State<BookingTickets> {
|
|||
text: 'Cari Tiket',
|
||||
textColor: Colors.white,
|
||||
onTap: () {
|
||||
|
||||
if (selectedAirportFrom == null || selectedAirportTo == null) {
|
||||
SnackbarHelper.showInfo('Info', 'Silakan pilih bandara keberangkatan dan tujuan');
|
||||
return;
|
||||
|
@ -241,27 +240,14 @@ class _BookingTicketsState extends State<BookingTickets> {
|
|||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
right: 40.w,
|
||||
top: 65.h,
|
||||
child: InkWell(
|
||||
onTap: () {},
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 10.w,
|
||||
vertical: 10.h,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
shape: BoxShape.circle,
|
||||
border: Border.all(
|
||||
strokeAlign: 1.5,
|
||||
color: GrayColors.gray200,
|
||||
),
|
||||
),
|
||||
child: CustomeIcons.DataTransferOutline(),
|
||||
),
|
||||
),
|
||||
_buttonSwitch(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
final tempAirport = selectedAirportFrom;
|
||||
selectedAirportFrom = selectedAirportTo;
|
||||
selectedAirportTo = tempAirport;
|
||||
});
|
||||
},
|
||||
)
|
||||
],
|
||||
),
|
||||
|
@ -270,6 +256,33 @@ class _BookingTicketsState extends State<BookingTickets> {
|
|||
);
|
||||
}
|
||||
|
||||
Widget _buttonSwitch({required VoidCallback onTap}) {
|
||||
return Positioned(
|
||||
right: 40.w,
|
||||
top: 65.h,
|
||||
child: ZoomTapAnimation(
|
||||
child: InkWell(
|
||||
onTap: onTap,
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 10.w,
|
||||
vertical: 10.h,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
shape: BoxShape.circle,
|
||||
border: Border.all(
|
||||
strokeAlign: 1.5,
|
||||
color: GrayColors.gray200,
|
||||
),
|
||||
),
|
||||
child: CustomeIcons.DataTransferOutline(),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildFlightClassRadio() {
|
||||
return Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
|
|
Loading…
Reference in New Issue