1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- import 'package:flutter/material.dart';
- class Lang extends StatefulWidget {
- const Lang({
- Key? key,
- }) : super(key: key);
- @override
- State<Lang> createState() => _LangState();
- }
- class _LangState extends State<Lang> {
- 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<Color>(Colors.white),
- backgroundColor:
- MaterialStateProperty.all<Color>(Color(0xffFFFFFF).withOpacity(0.4)),
- shape: MaterialStateProperty.all<RoundedRectangleBorder>(
- RoundedRectangleBorder(
- borderRadius: BorderRadius.only(
- topLeft: Radius.circular(16),
- bottomLeft: Radius.circular(16)),
- ))),
- child: Text('EN'),
- ),
- ElevatedButton(
- onPressed: () {
- print('ID');
- },
- style: ButtonStyle(
- foregroundColor:
- MaterialStateProperty.all<Color>(Colors.white),
- backgroundColor:
- MaterialStateProperty.all<Color>(Color(0xffFF6600)),
- shape: MaterialStateProperty.all<RoundedRectangleBorder>(
- RoundedRectangleBorder(
- borderRadius: BorderRadius.only(
- topRight: Radius.circular(16),
- bottomRight: Radius.circular(16)),
- side: BorderSide(color: Color(0xffFF6600)),
- ))),
- child: Text('ID'))
- ],
- ),
- );
- }
- }
|