lang.dart 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. import 'package:flutter/material.dart';
  2. class Lang extends StatefulWidget {
  3. const Lang({
  4. Key? key,
  5. }) : super(key: key);
  6. @override
  7. State<Lang> createState() => _LangState();
  8. }
  9. class _LangState extends State<Lang> {
  10. var selectedIndex = 0;
  11. // void _changeLang() {
  12. // setState(() {
  13. // if (selectedIndex == 0) {
  14. // } else {
  15. // }
  16. // });
  17. // }
  18. @override
  19. Widget build(BuildContext context) {
  20. return Padding(
  21. padding: const EdgeInsets.all(8.0),
  22. child: Row(
  23. children: [
  24. // BackButton(),
  25. // Padding(
  26. // padding: const EdgeInsets.only(right: 0),
  27. // child: Text(
  28. // 'Kembali Pindai QR',
  29. // softWrap: true,
  30. // textAlign: TextAlign.left,
  31. // ),
  32. // ),
  33. Expanded(child: Container()),
  34. ElevatedButton(
  35. onPressed: () {
  36. print('EN');
  37. },
  38. style: ButtonStyle(
  39. foregroundColor: MaterialStateProperty.all<Color>(Colors.white),
  40. backgroundColor:
  41. MaterialStateProperty.all<Color>(Colors.white70),
  42. shape: MaterialStateProperty.all<RoundedRectangleBorder>(
  43. RoundedRectangleBorder(
  44. borderRadius: BorderRadius.only(
  45. topLeft: Radius.circular(16),
  46. bottomLeft: Radius.circular(16)),
  47. ))),
  48. child: Text('EN'),
  49. ),
  50. ElevatedButton(
  51. onPressed: () {
  52. print('ID');
  53. },
  54. style: ButtonStyle(
  55. foregroundColor:
  56. MaterialStateProperty.all<Color>(Colors.white),
  57. backgroundColor:
  58. MaterialStateProperty.all<Color>(Colors.orange),
  59. shape: MaterialStateProperty.all<RoundedRectangleBorder>(
  60. RoundedRectangleBorder(
  61. borderRadius: BorderRadius.only(
  62. topRight: Radius.circular(16),
  63. bottomRight: Radius.circular(16)),
  64. side: BorderSide(color: Color.fromARGB(164, 255, 164, 1)),
  65. ))),
  66. child: Text('ID'))
  67. ],
  68. ),
  69. );
  70. }
  71. }