import 'package:flutter/material.dart'; class Lang extends StatefulWidget { const Lang({ Key? key, }) : super(key: key); @override State createState() => _LangState(); } class _LangState extends State { var selectedIndex = 0; // void _changeLang() { // setState(() { // if (selectedIndex == 0) { // } else { // } // }); // } @override Widget build(BuildContext context) { return Padding( padding: const EdgeInsets.all(8.0), child: Row( children: [ ElevatedButton( onPressed: () { print('EN'); }, style: ButtonStyle( foregroundColor: MaterialStateProperty.all(Colors.white), backgroundColor: MaterialStateProperty.all(Color(0xffFFFFFF).withOpacity(0.4)), shape: MaterialStateProperty.all( RoundedRectangleBorder( borderRadius: BorderRadius.only( topLeft: Radius.circular(16), bottomLeft: Radius.circular(16)), ))), child: Text('EN'), ), ElevatedButton( onPressed: () { print('ID'); }, style: ButtonStyle( foregroundColor: MaterialStateProperty.all(Colors.white), backgroundColor: MaterialStateProperty.all(Color(0xffFF6600)), shape: MaterialStateProperty.all( RoundedRectangleBorder( borderRadius: BorderRadius.only( topRight: Radius.circular(16), bottomRight: Radius.circular(16)), side: BorderSide(color: Color(0xffFF6600)), ))), child: Text('ID')) ], ), ); } }