mirrored_repositories/virtual_traveller_flutter/lib/ui/pages/home
import 'package:flutter/material.dart';

class FlightDestinationSearchSwitcher extends StatelessWidget {
  const FlightDestinationSearchSwitcher({
    Key? key,
    required this.onPressed,
    required this.icon,
    required this.label,
    this.isPressed = false,
  })  : super(key: key);

  final VoidCallback? onPressed;
  final IconData icon;
  final String label;
  final bool isPressed;

  @override
  Widget build(BuildContext context) {
    return RaisedButton(
      onPressed: onPressed,
      color: isPressed ? Colors.black.withAlpha(50) : Colors.transparent,
      elevation: 0.0,
      highlightElevation: 0.0,
      hoverElevation: 0.0,
      shape: RoundedRectangleBorder(
        borderRadius: BorderRadius.circular(40.0),
      ),
      child: Row(
        children: [
          Icon(
            icon,
            size: 16.0,
            color: Colors.white,
          ),
          SizedBox(width: 9.0),
          Text(
            label,
            style: TextStyle(
              color: Colors.white,
              fontSize: 13.0,
              fontWeight: FontWeight.w500,
            ),
          ),
        ],
      ),
    );
  }
}
