athrainsky 2 gadi atpakaļ
vecāks
revīzija
e35068b1a9
5 mainītis faili ar 323 papildinājumiem un 322 dzēšanām
  1. 2 12
      lib/lang.dart
  2. 258 0
      lib/list copy.dart
  3. 28 233
      lib/list.dart
  4. 14 69
      lib/login.dart
  5. 21 8
      lib/main.dart

+ 2 - 12
lib/lang.dart

@@ -28,16 +28,6 @@ class _LangState extends State<Lang> {
       padding: const EdgeInsets.all(8.0),
       child: Row(
         children: [
-          // BackButton(),
-          // Padding(
-          //   padding: const EdgeInsets.only(right: 0),
-          //   child: Text(
-          //     'Kembali Pindai QR',
-          //     softWrap: true,
-          //     textAlign: TextAlign.left,
-          //   ),
-          // ),
-          Expanded(child: Container()),
           ElevatedButton(
             onPressed: () {
               print('EN');
@@ -62,13 +52,13 @@ class _LangState extends State<Lang> {
                   foregroundColor:
                       MaterialStateProperty.all<Color>(Colors.white),
                   backgroundColor:
-                      MaterialStateProperty.all<Color>(Colors.orange),
+                      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.fromARGB(164, 255, 164, 1)),
+                    side: BorderSide(color: Color(0xffFF6600)),
                   ))),
               child: Text('ID'))
         ],

+ 258 - 0
lib/list copy.dart

@@ -0,0 +1,258 @@
+import 'package:flutter/material.dart';
+
+class ListPage extends StatelessWidget {
+  const ListPage({Key? key}) : super(key: key);
+
+  @override
+  Widget build(BuildContext context) {
+    return Scaffold(
+        resizeToAvoidBottomInset: false,
+        backgroundColor: Theme.of(context).colorScheme.primaryContainer,
+        body: ListView(
+          children: [
+            Row(
+              children: [
+                BackButton(),
+              ],
+            ),
+            Card(
+              child: Column(
+                children: [
+                  Row(
+                    children: [
+                      Text(
+                        'Top Menu',
+                        textAlign: TextAlign.left,
+                      ),
+                      Expanded(child: Container()),
+                      ElevatedButton(
+                          onPressed: () {
+                            print('Done');
+                          },
+                          child: Text('Done'))
+                    ],
+                  ),
+                  Row(
+                    children: [
+                      Image.asset(
+                        'assets/images/food.png',
+                        width: 60,
+                        height: 60,
+                        fit: BoxFit.cover,
+                      ),
+                      Column(
+                        crossAxisAlignment: CrossAxisAlignment.start,
+                        children: [
+                          Text('Foods & Drinks'),
+                          Text('Description of foods & drink'),
+                        ],
+                      ),
+                      Expanded(child: Container()),
+                      Icon(Icons.do_not_disturb_on),
+                      Icon(Icons.dehaze),
+                    ],
+                  ),
+                  Row(
+                    children: [
+                      Image.asset(
+                        'assets/images/service.png',
+                        width: 60,
+                        height: 60,
+                        fit: BoxFit.cover,
+                      ),
+                      Column(
+                        children: [
+                          Text('Services'),
+                          Text('Description of services'),
+                        ],
+                      ),
+                      Expanded(child: Container()),
+                      Icon(Icons.do_not_disturb_on),
+                      Icon(Icons.dehaze),
+                    ],
+                  ),
+                  Row(
+                    children: [
+                      Image.asset(
+                        'assets/images/additional.png',
+                        width: 60,
+                        height: 60,
+                        fit: BoxFit.cover,
+                      ),
+                      Column(
+                        children: [
+                          Text('Additional'),
+                          Text('Description of additional'),
+                        ],
+                      ),
+                      Expanded(child: Container()),
+                      Icon(Icons.do_not_disturb_on),
+                      Icon(Icons.dehaze),
+                    ],
+                  ),
+                  Row(
+                    children: [
+                      Image.asset(
+                        'assets/images/firstaid.png',
+                        width: 60,
+                        height: 60,
+                        fit: BoxFit.cover,
+                      ),
+                      Column(
+                        children: [
+                          Text('First Aid'),
+                          Text('Description of first aid'),
+                        ],
+                      ),
+                      Expanded(child: Container()),
+                      Icon(Icons.do_not_disturb_on),
+                      Icon(Icons.dehaze),
+                    ],
+                  ),
+                  Row(
+                    children: [
+                      Image.asset(
+                        'assets/images/ticket.png',
+                        width: 60,
+                        height: 60,
+                        fit: BoxFit.cover,
+                      ),
+                      Column(
+                        children: [
+                          Text('Ticket'),
+                          Text('Description of ticket'),
+                        ],
+                      ),
+                      Expanded(child: Container()),
+                      Icon(Icons.do_not_disturb_on),
+                      Icon(Icons.dehaze),
+                    ],
+                  ),
+                  Row(
+                    children: [
+                      Image.asset(
+                        'assets/images/vacation.png',
+                        width: 60,
+                        height: 60,
+                        fit: BoxFit.cover,
+                      ),
+                      Column(
+                        children: [
+                          Text('Vacation'),
+                          Text('Description of vacation'),
+                        ],
+                      ),
+                      Expanded(child: Container()),
+                      Icon(Icons.do_not_disturb_on),
+                      Icon(Icons.dehaze),
+                    ],
+                  ),
+                  Row(
+                    children: [
+                      Image.asset(
+                        'assets/images/transportation.png',
+                        width: 60,
+                        height: 60,
+                        fit: BoxFit.cover,
+                      ),
+                      Column(
+                        children: [
+                          Text('Transportation'),
+                          Text('Description of transportation'),
+                        ],
+                      ),
+                      Expanded(child: Container()),
+                      Icon(Icons.do_not_disturb_on),
+                      Icon(Icons.dehaze),
+                    ],
+                  ),
+                ],
+              ),
+            ),
+            Card(
+              child: Column(
+                children: [
+                  Row(
+                    children: [
+                      Text(
+                        'Available Menu',
+                        textAlign: TextAlign.left,
+                      ),
+                    ],
+                  ),
+                  Row(
+                    children: [
+                      Image.asset(
+                        'assets/images/food.png',
+                        width: 60,
+                        height: 60,
+                        fit: BoxFit.cover,
+                      ),
+                      Column(
+                        children: [
+                          Text('Foods & Drinks'),
+                          Text('Description of foods & drink'),
+                        ],
+                      ),
+                      Expanded(child: Container()),
+                      Icon(Icons.add_circle),
+                    ],
+                  ),
+                  Row(
+                    children: [
+                      Image.asset(
+                        'assets/images/service.png',
+                        width: 60,
+                        height: 60,
+                        fit: BoxFit.cover,
+                      ),
+                      Column(
+                        children: [
+                          Text('Services'),
+                          Text('Description of services'),
+                        ],
+                      ),
+                      Expanded(child: Container()),
+                      Icon(Icons.add_circle),
+                    ],
+                  ),
+                  Row(
+                    children: [
+                      Image.asset(
+                        'assets/images/additional.png',
+                        width: 60,
+                        height: 60,
+                        fit: BoxFit.cover,
+                      ),
+                      Column(
+                        children: [
+                          Text('Additional'),
+                          Text('Description of additional'),
+                        ],
+                      ),
+                      Expanded(child: Container()),
+                      Icon(Icons.add_circle),
+                    ],
+                  ),
+                ],
+              ),
+            ),
+            // Text(
+            //   'Demo Headline 2',
+            //   style: TextStyle(fontSize: 18),
+            // ),
+            // Expanded(
+            //   child: ListView.builder(
+            //     shrinkWrap: true,
+            //     itemBuilder: (context, int) {
+            //       return Card(
+            //         child: ListTile(title: Text('aaa $int'),
+            //         subtitle: Text('desc'),),
+            //       );
+            //     })
+            //   ),
+            // ),
+          ],
+        ));
+  }
+}

+ 28 - 233
lib/list.dart

@@ -6,238 +6,33 @@ class ListPage extends StatelessWidget {
   @override
   Widget build(BuildContext context) {
     return Scaffold(
-        resizeToAvoidBottomInset: false,
-        backgroundColor: Theme.of(context).colorScheme.primaryContainer,
-        body: ListView(
-          children: [
-            Row(
-              children: [
-                BackButton(),
-              ],
-            ),
-            Card(
-              child: Column(
-                children: [
-                  Row(
-                    children: [
-                      Text(
-                        'Top Menu',
-                        textAlign: TextAlign.left,
-                      ),
-                      Expanded(child: Container()),
-                      ElevatedButton(
-                          onPressed: () {
-                            print('Done');
-                          },
-                          child: Text('Done'))
-                    ],
-                  ),
-                  Row(
-                    children: [
-                      Image.asset(
-                        'assets/images/food.png',
-                        width: 60,
-                        height: 60,
-                        fit: BoxFit.cover,
-                      ),
-                      Column(
-                        crossAxisAlignment: CrossAxisAlignment.start,
-                        children: [
-                          Text('Foods & Drinks'),
-                          Text('Description of foods & drink'),
-                        ],
-                      ),
-                      Expanded(child: Container()),
-                      Icon(Icons.do_not_disturb_on),
-                      Icon(Icons.dehaze),
-                    ],
-                  ),
-                  Row(
-                    children: [
-                      Image.asset(
-                        'assets/images/service.png',
-                        width: 60,
-                        height: 60,
-                        fit: BoxFit.cover,
-                      ),
-                      Column(
-                        children: [
-                          Text('Services'),
-                          Text('Description of services'),
-                        ],
-                      ),
-                      Expanded(child: Container()),
-                      Icon(Icons.do_not_disturb_on),
-                      Icon(Icons.dehaze),
-                    ],
-                  ),
-                  Row(
-                    children: [
-                      Image.asset(
-                        'assets/images/additional.png',
-                        width: 60,
-                        height: 60,
-                        fit: BoxFit.cover,
-                      ),
-                      Column(
-                        children: [
-                          Text('Additional'),
-                          Text('Description of additional'),
-                        ],
-                      ),
-                      Expanded(child: Container()),
-                      Icon(Icons.do_not_disturb_on),
-                      Icon(Icons.dehaze),
-                    ],
-                  ),
-                  Row(
-                    children: [
-                      Image.asset(
-                        'assets/images/firstaid.png',
-                        width: 60,
-                        height: 60,
-                        fit: BoxFit.cover,
-                      ),
-                      Column(
-                        children: [
-                          Text('First Aid'),
-                          Text('Description of first aid'),
-                        ],
-                      ),
-                      Expanded(child: Container()),
-                      Icon(Icons.do_not_disturb_on),
-                      Icon(Icons.dehaze),
-                    ],
-                  ),
-                  Row(
-                    children: [
-                      Image.asset(
-                        'assets/images/ticket.png',
-                        width: 60,
-                        height: 60,
-                        fit: BoxFit.cover,
-                      ),
-                      Column(
-                        children: [
-                          Text('Ticket'),
-                          Text('Description of ticket'),
-                        ],
-                      ),
-                      Expanded(child: Container()),
-                      Icon(Icons.do_not_disturb_on),
-                      Icon(Icons.dehaze),
-                    ],
-                  ),
-                  Row(
-                    children: [
-                      Image.asset(
-                        'assets/images/vacation.png',
-                        width: 60,
-                        height: 60,
-                        fit: BoxFit.cover,
-                      ),
-                      Column(
-                        children: [
-                          Text('Vacation'),
-                          Text('Description of vacation'),
-                        ],
-                      ),
-                      Expanded(child: Container()),
-                      Icon(Icons.do_not_disturb_on),
-                      Icon(Icons.dehaze),
-                    ],
-                  ),
-                  Row(
-                    children: [
-                      Image.asset(
-                        'assets/images/transportation.png',
-                        width: 60,
-                        height: 60,
-                        fit: BoxFit.cover,
-                      ),
-                      Column(
-                        children: [
-                          Text('Transportation'),
-                          Text('Description of transportation'),
-                        ],
-                      ),
-                      Expanded(child: Container()),
-                      Icon(Icons.do_not_disturb_on),
-                      Icon(Icons.dehaze),
-                    ],
-                  ),
-                ],
-              ),
-            ),
-            Card(
-              child: Column(
-                children: [
-                  Row(
-                    children: [
-                      Text(
-                        'Available Menu',
-                        textAlign: TextAlign.left,
-                      ),
-                    ],
-                  ),
-                  Row(
-                    children: [
-                      Image.asset(
-                        'assets/images/food.png',
-                        width: 60,
-                        height: 60,
-                        fit: BoxFit.cover,
-                      ),
-                      Column(
-                        children: [
-                          Text('Foods & Drinks'),
-                          Text('Description of foods & drink'),
-                        ],
-                      ),
-                      Expanded(child: Container()),
-                      Icon(Icons.add_circle),
-                    ],
-                  ),
-                  Row(
-                    children: [
-                      Image.asset(
-                        'assets/images/service.png',
-                        width: 60,
-                        height: 60,
-                        fit: BoxFit.cover,
-                      ),
-                      Column(
-                        children: [
-                          Text('Services'),
-                          Text('Description of services'),
-                        ],
-                      ),
-                      Expanded(child: Container()),
-                      Icon(Icons.add_circle),
-                    ],
-                  ),
-                  Row(
-                    children: [
-                      Image.asset(
-                        'assets/images/additional.png',
-                        width: 60,
-                        height: 60,
-                        fit: BoxFit.cover,
-                      ),
-                      Column(
-                        children: [
-                          Text('Additional'),
-                          Text('Description of additional'),
-                        ],
-                      ),
-                      Expanded(child: Container()),
-                      Icon(Icons.add_circle),
-                    ],
-                  ),
-                ],
-              ),
-            ),
-          ],
-        ));
+        body: Column(
+      crossAxisAlignment: CrossAxisAlignment.start,
+      children: [
+        Text(
+          'Top Menu',
+          style: TextStyle(
+            fontSize: 18,
+          ),
+        ),
+        Expanded(
+            child: ListView.builder(
+                shrinkWrap: true,
+                // itemCount: 15,
+                // ignore: avoid_types_as_parameter_names
+                itemBuilder: (context, int) {
+                  return Card(
+                    child: ListTile(
+                      title: Text('aaa'),
+                      subtitle: Text('Description of $int'),
+                      trailing: Icon(
+                        Icons.do_not_disturb_on,
+                        color: Colors.red,
+                      ),
+                    ),
+                  );
+                })),
+      ],
+    ));
   }
 }

+ 14 - 69
lib/login.dart

@@ -18,13 +18,24 @@ class LoginPage extends StatelessWidget {
         child: Column(
           mainAxisAlignment: MainAxisAlignment.spaceEvenly,
           children: [
-            // BackButton(),
-            Lang(),
+            Row(
+              children: [
+                BackButton(color: Colors.white),
+                Text(
+                  'Kembali Pindai QR',
+                  softWrap: true,
+                  textAlign: TextAlign.left,
+                  style: TextStyle(color: Colors.white),
+                ),
+                Expanded(child: Container()),
+                Lang(),
+              ],
+            ),
             Expanded(
               child: Center(
                   child: Text(
                 'telnow',
-                style: TextStyle(color: Colors.orange, fontSize: 48),
+                style: TextStyle(color: Color(0xffFF6600), fontSize: 48),
               )),
             ),
             Expanded(
@@ -103,69 +114,3 @@ class LoginPage 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;
-
-//   @override
-//   Widget build(BuildContext context) {
-//     return Padding(
-//       padding: const EdgeInsets.all(8.0),
-//       child: Row(
-//         children: [
-//           BackButton(),
-//           Padding(
-//             padding: const EdgeInsets.only(right: 0),
-//             child: Text(
-//               'Kembali Pindai QR',
-//               softWrap: true,
-//               textAlign: TextAlign.left,
-//             ),
-//           ),
-//           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'))
-//         ],
-//       ),
-//     );
-//   }
-// }

+ 21 - 8
lib/main.dart

@@ -30,11 +30,12 @@ class MyApp extends StatelessWidget {
   @override
   Widget build(BuildContext context) {
     return MaterialApp.router(
+      debugShowCheckedModeBanner: false,
       title: 'TelNow Lat',
       theme: ThemeData(
         useMaterial3: true,
-        colorScheme:
-            ColorScheme.fromSeed(seedColor: Color.fromARGB(255, 0, 255, 255)),
+        // colorScheme:
+        //     ColorScheme.fromSeed(seedColor: Color(0xffD9D9D1)),
       ),
       routerConfig: _router,
     );
@@ -45,22 +46,34 @@ class MyHomePage extends StatelessWidget {
   @override
   Widget build(BuildContext context) {
     return Scaffold(
-      //backgroundColor: Theme.of(context).colorScheme.primaryContainer,
       body: Container(
         decoration: BoxDecoration(
+            gradient: LinearGradient(
+                begin: Alignment.topCenter,
+                end: Alignment.bottomCenter,
+                colors: [
+                  Color(0xffD9D9D1),
+                  Color(0xff968E73),
+                  Color(0xff000000)
+                ]),
             image: DecorationImage(
-          image: AssetImage("assets/images/building.jpg"),
-          fit: BoxFit.cover,
-        )),
+              image: AssetImage("assets/images/building.jpg"),
+              fit: BoxFit.cover,
+            )),
         child: Column(
           mainAxisAlignment: MainAxisAlignment.spaceEvenly,
           children: [
-            Lang(),
+            Row(
+              mainAxisAlignment: MainAxisAlignment.end,
+              children: [
+                Lang(),
+              ],
+            ),
             Expanded(
               child: Center(
                   child: Text(
                 'telnow',
-                style: TextStyle(color: Colors.orange, fontSize: 48),
+                style: TextStyle(color: Color(0xffFF6600), fontSize: 48),
               )),
             ),
             Padding(