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',
|
text: 'Cari Tiket',
|
||||||
textColor: Colors.white,
|
textColor: Colors.white,
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
|
||||||
if (selectedAirportFrom == null || selectedAirportTo == null) {
|
if (selectedAirportFrom == null || selectedAirportTo == null) {
|
||||||
SnackbarHelper.showInfo('Info', 'Silakan pilih bandara keberangkatan dan tujuan');
|
SnackbarHelper.showInfo('Info', 'Silakan pilih bandara keberangkatan dan tujuan');
|
||||||
return;
|
return;
|
||||||
|
@ -241,11 +240,29 @@ class _BookingTicketsState extends State<BookingTickets> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Positioned(
|
_buttonSwitch(
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
final tempAirport = selectedAirportFrom;
|
||||||
|
selectedAirportFrom = selectedAirportTo;
|
||||||
|
selectedAirportTo = tempAirport;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buttonSwitch({required VoidCallback onTap}) {
|
||||||
|
return Positioned(
|
||||||
right: 40.w,
|
right: 40.w,
|
||||||
top: 65.h,
|
top: 65.h,
|
||||||
|
child: ZoomTapAnimation(
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () {},
|
onTap: onTap,
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.symmetric(
|
padding: EdgeInsets.symmetric(
|
||||||
horizontal: 10.w,
|
horizontal: 10.w,
|
||||||
|
@ -262,10 +279,6 @@ class _BookingTicketsState extends State<BookingTickets> {
|
||||||
child: CustomeIcons.DataTransferOutline(),
|
child: CustomeIcons.DataTransferOutline(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue