import 'package:flutter/material.dart';

class Lang extends StatefulWidget {
  const Lang({
    super.key,
  });

  @override
  State<Lang> createState() => _LangState();
}

class _LangState extends State<Lang> {
  bool _hasBeenPressed = false;
  @override
  Widget build(BuildContext context) {
    return Padding(
      padding: const EdgeInsets.all(8.0),
      child: Row(
        children: [
          ElevatedButton(
              onPressed: () => {
                    setState(() {
                      _hasBeenPressed = !_hasBeenPressed;
                    })
                  },
              style: ElevatedButton.styleFrom(
                  backgroundColor: _hasBeenPressed
                      ? Colors.white.withOpacity(0.4)
                      : Color(0xffFF6600),
                  shape: RoundedRectangleBorder(
                      borderRadius: BorderRadius.only(
                          topLeft: Radius.circular(30),
                          bottomLeft: Radius.circular(30)))),
              child: Text(
                'EN',
                style: TextStyle(color: Colors.white),
              )),
          ElevatedButton(
              onPressed: () => {
                    setState(() {
                      _hasBeenPressed = !_hasBeenPressed;
                    })
                  },
              style: ElevatedButton.styleFrom(
                  backgroundColor: _hasBeenPressed
                      ? Color(0xffFF6600)
                      : Colors.white.withOpacity(0.4),
                  shape: RoundedRectangleBorder(
                      borderRadius: BorderRadius.only(
                          topRight: Radius.circular(30),
                          bottomRight: Radius.circular(30)))),
              child: Text(
                'ID',
                style: TextStyle(color: Colors.white),
              )),
        ],
      ),
    );
  }
}
