athrainsky 2 years ago
parent
commit
8fefc99e62
3 changed files with 69 additions and 67 deletions
  1. 68 0
      lib/lang.dart
  2. 1 0
      lib/list.dart
  3. 0 67
      lib/main.dart

+ 68 - 0
lib/lang.dart

@@ -0,0 +1,68 @@
+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: [
+          Expanded(child: Container()),
+          ElevatedButton(
+            onPressed: () {
+              print('EN');
+            },
+            style: ButtonStyle(
+                foregroundColor: MaterialStateProperty.all<Color>(Colors.white),
+                backgroundColor:
+                    MaterialStateProperty.all<Color>(Colors.white70),
+                shape: MaterialStateProperty.all<RoundedRectangleBorder>(
+                    RoundedRectangleBorder(
+                  borderRadius: BorderRadius.only(
+                      topLeft: Radius.circular(20),
+                      bottomLeft: Radius.circular(20)),
+                ))),
+            child: Text('EN'),
+          ),
+          ElevatedButton(
+              onPressed: () {
+                print('ID');
+              },
+              style: ButtonStyle(
+                  foregroundColor:
+                      MaterialStateProperty.all<Color>(Colors.white),
+                  backgroundColor: MaterialStateProperty.all<Color>(Colors.red),
+                  shape: MaterialStateProperty.all<RoundedRectangleBorder>(
+                      RoundedRectangleBorder(
+                    borderRadius: BorderRadius.only(
+                        topRight: Radius.circular(20),
+                        bottomRight: Radius.circular(20)),
+                    side: BorderSide(color: Colors.red),
+                  ))),
+              child: Text('ID'))
+        ],
+      ),
+    );
+  }
+}

+ 1 - 0
lib/list.dart

@@ -41,6 +41,7 @@ class ListPage extends StatelessWidget {
                         fit: BoxFit.cover,
                       ),
                       Column(
+                        crossAxisAlignment: CrossAxisAlignment.start,
                         children: [
                           Text('Foods & Drinks'),
                           Text('Description of foods & drink'),

+ 0 - 67
lib/main.dart

@@ -96,73 +96,6 @@ class MyHomePage extends StatelessWidget {
   }
 }
 
-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: [
-          Expanded(child: Container()),
-          ElevatedButton(
-            onPressed: () {
-              print('EN');
-            },
-            style: ButtonStyle(
-                foregroundColor: MaterialStateProperty.all<Color>(Colors.white),
-                backgroundColor:
-                    MaterialStateProperty.all<Color>(Colors.white70),
-                shape: MaterialStateProperty.all<RoundedRectangleBorder>(
-                    RoundedRectangleBorder(
-                  borderRadius: BorderRadius.only(
-                      topLeft: Radius.circular(20),
-                      bottomLeft: Radius.circular(20)),
-                ))),
-            child: Text('EN'),
-          ),
-          ElevatedButton(
-              onPressed: () {
-                print('ID');
-              },
-              style: ButtonStyle(
-                  foregroundColor:
-                      MaterialStateProperty.all<Color>(Colors.white),
-                  backgroundColor: MaterialStateProperty.all<Color>(Colors.red),
-                  shape: MaterialStateProperty.all<RoundedRectangleBorder>(
-                      RoundedRectangleBorder(
-                    borderRadius: BorderRadius.only(
-                        topRight: Radius.circular(20),
-                        bottomRight: Radius.circular(20)),
-                    side: BorderSide(color: Colors.red),
-                  ))),
-              child: Text('ID'))
-        ],
-      ),
-    );
-  }
-}
-
 class Pindai extends StatelessWidget {
   const Pindai({
     Key? key,