athrainsky 2 years ago
parent
commit
3c9d5ca52f
4 changed files with 89 additions and 584 deletions
  1. 0 46
      lib/list coba.dart
  2. 0 495
      lib/list copy.dart
  3. 77 37
      lib/list.dart
  4. 12 6
      lib/login.dart

+ 0 - 46
lib/list coba.dart

@@ -1,46 +0,0 @@
-import 'package:flutter/material.dart';
-
-class ListPage extends StatelessWidget {
-  const ListPage({Key? key}) : super(key: key);
-
-  @override
-  Widget build(BuildContext context) {
-    var items = [
-      'Foods & Drinks',
-      'Services',
-      'Additional',
-      'First Aid',
-      'Ticket',
-      'Vacation',
-      'Transportation'
-    ];    
-    return Scaffold(
-        body: Column(
-      crossAxisAlignment: CrossAxisAlignment.start,
-      children: [
-        Text(
-          'Top Menu',
-          style: TextStyle(
-            fontSize: 18,
-          ),
-        ),
-        Expanded(
-            child: ListView.builder(
-                shrinkWrap: true,
-                itemCount: items.length,
-                itemBuilder: (context, index) {
-                  return Card(
-                    child: ListTile(
-                      title: Text(items[index]),
-                      subtitle: Text('Description of ${items[index]}'),
-                      // trailing: Icon(
-                      //   Icons.do_not_disturb_on,
-                      //   color: Colors.red,
-                      // ),
-                    ),
-                  );
-                })),
-      ],
-    ));
-  }
-}

+ 0 - 495
lib/list copy.dart

@@ -1,495 +0,0 @@
-import 'package:flutter/material.dart';
-
-class ListPage extends StatelessWidget {
-  const ListPage({Key? key}) : super(key: key);
-
-  @override
-  Widget build(BuildContext context) {
-    var items = [
-      'Foods & Drinks',
-      'Services',
-      'Additional',
-      'First Aid',
-      'Ticket',
-      'Vacation',
-      'Transportation'
-    ];
-    return Scaffold(
-        appBar: AppBar(
-          backgroundColor: Color(0xff078C84),
-        ),
-        resizeToAvoidBottomInset: false,
-        body: ListView(
-          children: [
-            Card(
-              child: Column(
-                children: [
-                  Row(
-                    children: [
-                      Text(
-                        'Top Menu',
-                        textAlign: TextAlign.left,
-                        style: TextStyle(
-                            fontWeight: FontWeight.w500,
-                            color: Color(0xff292D32)),
-                      ),
-                      Expanded(child: Container()),
-                      ElevatedButton(
-                          style: ElevatedButton.styleFrom(
-                              backgroundColor:
-                                  Color(0xff078C84).withOpacity(0.1)),
-                          onPressed: () {
-                            print('Done');
-                          },
-                          child: Text(
-                            'Done',
-                            style: TextStyle(
-                                color: Color(0xff078C84),
-                                fontWeight: FontWeight.w300),
-                          ))
-                    ],
-                  ),
-                  Padding(
-                    padding: const EdgeInsets.all(8.0),
-                    child: Row(
-                      children: [
-                        Container(
-                          decoration: BoxDecoration(
-                              border: Border.all(color: Color(0xffCCA600)),
-                              borderRadius:
-                                  BorderRadius.all(Radius.circular(20)),
-                              color: Color(0xffCCA600).withOpacity(0.4)),
-                          padding: const EdgeInsets.all(10.0),
-                          child: Image.asset(
-                            'assets/images/food.png',
-                            width: 36,
-                            height: 36,
-                            fit: BoxFit.cover,
-                          ),
-                        ),
-                        Padding(
-                          padding: const EdgeInsets.all(8.0),
-                          child: Column(
-                            crossAxisAlignment: CrossAxisAlignment.start,
-                            children: [
-                              Text(
-                                'Foods & Drinks',
-                                style: TextStyle(fontSize: 14),
-                              ),
-                              Text(
-                                'Description of foods & drink',
-                                style: TextStyle(fontSize: 12),
-                              ),
-                            ],
-                          ),
-                        ),
-                        Expanded(child: Container()),
-                        IconDelete()
-                      ],
-                    ),
-                  ),
-                  Padding(
-                    padding: const EdgeInsets.all(8.0),
-                    child: Row(
-                      children: [
-                        Container(
-                          decoration: BoxDecoration(
-                              border: Border.all(color: Color(0xff90D8F9)),
-                              borderRadius:
-                                  BorderRadius.all(Radius.circular(20)),
-                              color: Color(0xff90D8F9).withOpacity(0.22)),
-                          padding: const EdgeInsets.all(10.0),
-                          child: Image.asset(
-                            'assets/images/service.png',
-                            width: 36,
-                            height: 36,
-                            fit: BoxFit.cover,
-                          ),
-                        ),
-                        Padding(
-                          padding: const EdgeInsets.all(8.0),
-                          child: Column(
-                            crossAxisAlignment: CrossAxisAlignment.start,
-                            children: [
-                              Text(
-                                'Services',
-                                style: TextStyle(fontSize: 14),
-                              ),
-                              Text(
-                                'Description of services',
-                                style: TextStyle(fontSize: 12),
-                              ),
-                            ],
-                          ),
-                        ),
-                        Expanded(child: Container()),
-                        IconDelete()
-                      ],
-                    ),
-                  ),
-                  Padding(
-                    padding: const EdgeInsets.all(8.0),
-                    child: Row(
-                      children: [
-                        Container(
-                          decoration: BoxDecoration(
-                              border: Border.all(color: Color(0xffAACEE0)),
-                              borderRadius:
-                                  BorderRadius.all(Radius.circular(20)),
-                              color: Color(0xffAACEE0).withOpacity(0.31)),
-                          padding: const EdgeInsets.all(10.0),
-                          child: Image.asset(
-                            'assets/images/additional.png',
-                            width: 36,
-                            height: 36,
-                            fit: BoxFit.cover,
-                          ),
-                        ),
-                        Padding(
-                          padding: const EdgeInsets.all(8.0),
-                          child: Column(
-                            crossAxisAlignment: CrossAxisAlignment.start,
-                            children: [
-                              Text(
-                                'Additional',
-                                style: TextStyle(fontSize: 14),
-                              ),
-                              Text(
-                                'Description of additional',
-                                style: TextStyle(fontSize: 12),
-                              ),
-                            ],
-                          ),
-                        ),
-                        Expanded(child: Container()),
-                        IconDelete()
-                      ],
-                    ),
-                  ),
-                  Padding(
-                    padding: const EdgeInsets.all(8.0),
-                    child: Row(
-                      children: [
-                        Container(
-                          decoration: BoxDecoration(
-                              border: Border.all(color: Color(0xffFF1111)),
-                              borderRadius:
-                                  BorderRadius.all(Radius.circular(20)),
-                              color: Color(0xffFF1111).withOpacity(0.15)),
-                          padding: const EdgeInsets.all(10.0),
-                          child: Image.asset(
-                            'assets/images/firstaid.png',
-                            width: 36,
-                            height: 36,
-                            fit: BoxFit.cover,
-                          ),
-                        ),
-                        Padding(
-                          padding: const EdgeInsets.all(8.0),
-                          child: Column(
-                            crossAxisAlignment: CrossAxisAlignment.start,
-                            children: [
-                              Text(
-                                'First Aid',
-                                style: TextStyle(fontSize: 14),
-                              ),
-                              Text(
-                                'Description of first aid',
-                                style: TextStyle(fontSize: 12),
-                              ),
-                            ],
-                          ),
-                        ),
-                        Expanded(child: Container()),
-                        IconDelete()
-                      ],
-                    ),
-                  ),
-                  Padding(
-                    padding: const EdgeInsets.all(8.0),
-                    child: Row(
-                      children: [
-                        Container(
-                          decoration: BoxDecoration(
-                              border: Border.all(color: Color(0xff5ED8F6)),
-                              borderRadius:
-                                  BorderRadius.all(Radius.circular(20)),
-                              color: Color(0xff5ED8F6).withOpacity(0.26)),
-                          padding: const EdgeInsets.all(10.0),
-                          child: Image.asset(
-                            'assets/images/ticket.png',
-                            width: 36,
-                            height: 36,
-                            fit: BoxFit.cover,
-                          ),
-                        ),
-                        Padding(
-                          padding: const EdgeInsets.all(8.0),
-                          child: Column(
-                            crossAxisAlignment: CrossAxisAlignment.start,
-                            children: [
-                              Text(
-                                'Ticket',
-                                style: TextStyle(fontSize: 14),
-                              ),
-                              Text(
-                                'Description of ticket',
-                                style: TextStyle(fontSize: 12),
-                              ),
-                            ],
-                          ),
-                        ),
-                        Expanded(child: Container()),
-                        IconDelete()
-                      ],
-                    ),
-                  ),
-                  Padding(
-                    padding: const EdgeInsets.all(8.0),
-                    child: Row(
-                      children: [
-                        Container(
-                          decoration: BoxDecoration(
-                              border: Border.all(color: Color(0xffCCA600)),
-                              borderRadius:
-                                  BorderRadius.all(Radius.circular(20)),
-                              color: Color(0xffCCA600).withOpacity(0.2)),
-                          padding: const EdgeInsets.all(10.0),
-                          child: Image.asset(
-                            'assets/images/vacation.png',
-                            width: 36,
-                            height: 36,
-                            fit: BoxFit.cover,
-                          ),
-                        ),
-                        Padding(
-                          padding: const EdgeInsets.all(8.0),
-                          child: Column(
-                            crossAxisAlignment: CrossAxisAlignment.start,
-                            children: [
-                              Text(
-                                'Vacation',
-                                style: TextStyle(fontSize: 14),
-                              ),
-                              Text(
-                                'Description of vacation',
-                                style: TextStyle(fontSize: 12),
-                              ),
-                            ],
-                          ),
-                        ),
-                        Expanded(child: Container()),
-                        IconDelete()
-                      ],
-                    ),
-                  ),
-                  Padding(
-                    padding: const EdgeInsets.all(8.0),
-                    child: Row(
-                      children: [
-                        Container(
-                          decoration: BoxDecoration(
-                              border: Border.all(color: Color(0xff6C8BA5)),
-                              borderRadius:
-                                  BorderRadius.all(Radius.circular(20)),
-                              color: Color(0xff6C8BA5).withOpacity(0.24)),
-                          padding: const EdgeInsets.all(10.0),
-                          child: Image.asset(
-                            'assets/images/transportation.png',
-                            width: 36,
-                            height: 36,
-                            fit: BoxFit.cover,
-                          ),
-                        ),
-                        Padding(
-                          padding: const EdgeInsets.all(8.0),
-                          child: Column(
-                            crossAxisAlignment: CrossAxisAlignment.start,
-                            children: [
-                              Text(
-                                'Transportation',
-                                style: TextStyle(fontSize: 14),
-                              ),
-                              Text(
-                                'Description of transportation',
-                                style: TextStyle(fontSize: 12),
-                              ),
-                            ],
-                          ),
-                        ),
-                        Expanded(child: Container()),
-                        IconDelete()
-                      ],
-                    ),
-                  ),
-                ],
-              ),
-            ),
-            Card(
-              child: Column(
-                children: [
-                  Row(
-                    children: [
-                      Text(
-                        'Available Menu',
-                        textAlign: TextAlign.left,
-                      ),
-                    ],
-                  ),
-                  Padding(
-                    padding: const EdgeInsets.all(8.0),
-                    child: Row(
-                      children: [
-                        Container(
-                          decoration: BoxDecoration(
-                              border: Border.all(color: Color(0xffCCA600)),
-                              borderRadius:
-                                  BorderRadius.all(Radius.circular(20)),
-                              color: Color(0xffCCA600).withOpacity(0.2)),
-                          padding: const EdgeInsets.all(10.0),
-                          child: Image.asset(
-                            'assets/images/food.png',
-                            width: 36,
-                            height: 36,
-                            fit: BoxFit.cover,
-                          ),
-                        ),
-                        Padding(
-                          padding: const EdgeInsets.all(8.0),
-                          child: Column(
-                            crossAxisAlignment: CrossAxisAlignment.start,
-                            children: [
-                              Text(
-                                'Foods & Drinks',
-                                style: TextStyle(fontSize: 14),
-                              ),
-                              Text(
-                                'Description of foods & drink',
-                                style: TextStyle(fontSize: 12),
-                              ),
-                            ],
-                          ),
-                        ),
-                        Expanded(child: Container()),
-                        IconAdd(),
-                      ],
-                    ),
-                  ),
-                  Padding(
-                    padding: const EdgeInsets.all(8.0),
-                    child: Row(
-                      children: [
-                        Container(
-                          decoration: BoxDecoration(
-                              border: Border.all(color: Color(0xff90D8F9)),
-                              borderRadius:
-                                  BorderRadius.all(Radius.circular(20)),
-                              color: Color(0xff90D8F9).withOpacity(0.22)),
-                          padding: const EdgeInsets.all(10.0),
-                          child: Image.asset(
-                            'assets/images/service.png',
-                            width: 36,
-                            height: 36,
-                            fit: BoxFit.cover,
-                          ),
-                        ),
-                        Padding(
-                          padding: const EdgeInsets.all(8.0),
-                          child: Column(
-                            crossAxisAlignment: CrossAxisAlignment.start,
-                            children: [
-                              Text(
-                                'Services',
-                                style: TextStyle(fontSize: 14),
-                              ),
-                              Text(
-                                'Description of services',
-                                style: TextStyle(fontSize: 12),
-                              ),
-                            ],
-                          ),
-                        ),
-                        Expanded(child: Container()),
-                        IconAdd(),
-                      ],
-                    ),
-                  ),
-                  Padding(
-                    padding: const EdgeInsets.all(8.0),
-                    child: Row(
-                      children: [
-                        Container(
-                          decoration: BoxDecoration(
-                              border: Border.all(color: Color(0xffAACEE0)),
-                              borderRadius:
-                                  BorderRadius.all(Radius.circular(20)),
-                              color: Color(0xffAACEE0).withOpacity(0.31)),
-                          padding: const EdgeInsets.all(10.0),
-                          child: Image.asset(
-                            'assets/images/additional.png',
-                            width: 36,
-                            height: 36,
-                            fit: BoxFit.cover,
-                          ),
-                        ),
-                        Padding(
-                          padding: const EdgeInsets.all(8.0),
-                          child: Column(
-                            crossAxisAlignment: CrossAxisAlignment.start,
-                            children: [
-                              Text(
-                                'Additional',
-                                style: TextStyle(fontSize: 14),
-                              ),
-                              Text(
-                                'Description of additional',
-                                style: TextStyle(fontSize: 12),
-                              ),
-                            ],
-                          ),
-                        ),
-                        Expanded(child: Container()),
-                        IconAdd(),
-                      ],
-                    ),
-                  ),
-                ],
-              ),
-            ),
-          ],
-        ));
-  }
-}
-
-class IconAdd extends StatelessWidget {
-  const IconAdd({
-    Key? key,
-  }) : super(key: key);
-
-  @override
-  Widget build(BuildContext context) {
-    return Icon(
-      Icons.add_circle,
-      color: Colors.red,
-    );
-  }
-}
-
-class IconDelete extends StatelessWidget {
-  const IconDelete({
-    Key? key,
-  }) : super(key: key);
-
-  @override
-  Widget build(BuildContext context) {
-    return Row(
-      children: [
-        Icon(
-          Icons.do_not_disturb_on,
-          color: Colors.red,
-        ),
-        Icon(Icons.dehaze),
-      ],
-    );
-  }
-}

+ 77 - 37
lib/list.dart

@@ -40,44 +40,82 @@ class ListPage extends StatelessWidget {
           backgroundColor: Color(0xff078C84),
           automaticallyImplyLeading: false,
           toolbarHeight: 44,
-        ),
-        body: SingleChildScrollView(
-          child: Column(
-            children: [
-              TopMenu(),
-              Column(
-                children: List.generate(
-                    items.length,
-                    (i) => SizedBox(
-                          child: ListTile(
-                            leading: gambar(items[i]),
-                            title: Text(items[i].type),
-                            subtitle: Text(
-                                'Description of ${items[i].type.toLowerCase()}'),
-                            trailing: IconDelete(),
-                          ),
-                        )),
+          title: Text(
+            '${date.hour}:${date.minute}',
+            style: TextStyle(color: Colors.white, fontSize: 15),
+          ),
+          actions: [
+            Icon(
+              Icons.signal_cellular_alt,
+              color: Colors.white,
+            ),
+            Icon(
+              Icons.wifi,
+              color: Colors.white,
+            ),
+            // Icon(
+            //   Icons.battery_std,
+            //   color: Colors.white,
+            // ),
+            RotatedBox(
+              quarterTurns: -3,
+              child: Icon(
+                Icons.battery_std,
+                color: Colors.white,
               ),
-              Divider(
-                thickness: 8,
+            )
+          ],
+        ),
+        body: Stack(children: [
+          Container(
+            decoration: BoxDecoration(color: Color(0xff078C84)),
+          ),
+          SingleChildScrollView(
+            child: Container(
+              decoration: BoxDecoration(
+                  color: Colors.white,
+                  borderRadius: BorderRadius.only(
+                      topLeft: Radius.circular(16),
+                      topRight: Radius.circular(16)),
+                  border: Border.all(color: Color(0xff078C84))),
+              child: Column(
+                children: [
+                  TopMenu(),
+                  Column(
+                    children: List.generate(
+                        items.length,
+                        (i) => SizedBox(
+                              child: ListTile(
+                                leading: gambar(items[i]),
+                                title: Text(items[i].type),
+                                subtitle: Text(
+                                    'Description of ${items[i].type.toLowerCase()}'),
+                                trailing: IconDelete(),
+                              ),
+                            )),
+                  ),
+                  Divider(
+                    thickness: 8,
+                  ),
+                  AvailableMenu(),
+                  Column(
+                    children: List.generate(
+                        items.length,
+                        (i) => SizedBox(
+                              child: ListTile(
+                                leading: gambar(items[i]),
+                                title: Text(items[i].type),
+                                subtitle: Text(
+                                    'Description of ${items[i].type.toLowerCase()}'),
+                                trailing: IconAdd(),
+                              ),
+                            )),
+                  )
+                ],
               ),
-              AvailableMenu(),
-              Column(
-                children: List.generate(
-                    items.length,
-                    (i) => SizedBox(
-                          child: ListTile(
-                            leading: gambar(items[i]),
-                            title: Text(items[i].type),
-                            subtitle: Text(
-                                'Description of ${items[i].type.toLowerCase()}'),
-                            trailing: IconAdd(),
-                          ),
-                        )),
-              )
-            ],
+            ),
           ),
-        ));
+        ]));
   }
 
   Container gambar(Data items) {
@@ -105,6 +143,8 @@ class Data {
   Data({required this.type, required this.color, required this.image});
 }
 
+var date = DateTime.now();
+
 class AvailableMenu extends StatelessWidget {
   const AvailableMenu({
     Key? key,
@@ -188,11 +228,11 @@ class IconDelete extends StatelessWidget {
       mainAxisSize: MainAxisSize.min,
       children: [
         Icon(
-          Icons.do_not_disturb_on,
+          Icons.remove_circle,
           color: Colors.red,
         ),
         SizedBox(width: 10),
-        Icon(Icons.dehaze),
+        Icon(Icons.menu),
       ],
     );
   }

+ 12 - 6
lib/login.dart

@@ -73,13 +73,16 @@ class LoginPage extends StatelessWidget {
                     child: TextField(
                       decoration: InputDecoration(
                           border: OutlineInputBorder(),
+                          focusedBorder: OutlineInputBorder(
+                              borderSide: BorderSide(color: Colors.white)),
                           enabledBorder: OutlineInputBorder(
-                              borderSide: BorderSide(color: Color(0xffFFFFFF))),
+                              borderSide: BorderSide(color: Colors.white)),
                           labelText: 'Nama Pengguna',
-                          labelStyle: TextStyle(color: Color(0xffFFFFFF)),
+                          labelStyle: TextStyle(color: Colors.white),
                           filled: true,
                           fillColor: Colors.white.withOpacity(0.25)),
-                      style: TextStyle(color: Color(0xffFFFFFF)),
+                      cursorColor: Colors.white,
+                      style: TextStyle(color: Colors.white),
                     ),
                   ),
                 ),
@@ -90,13 +93,16 @@ class LoginPage extends StatelessWidget {
                     obscureText: true,
                     decoration: InputDecoration(
                         border: OutlineInputBorder(),
+                        focusedBorder: OutlineInputBorder(
+                            borderSide: BorderSide(color: Colors.white)),
                         enabledBorder: OutlineInputBorder(
-                            borderSide: BorderSide(color: Color(0xffFFFFFF))),
+                            borderSide: BorderSide(color: Colors.white)),
                         labelText: 'Kata Sandi',
-                        labelStyle: TextStyle(color: Color(0xffFFFFFF)),
+                        labelStyle: TextStyle(color: Colors.white),
                         filled: true,
                         fillColor: Colors.white.withOpacity(0.25)),
-                    style: TextStyle(color: Color(0xffFFFFFF)),
+                    cursorColor: Colors.white,
+                    style: TextStyle(color: Colors.white),
                   ),
                 ),
                 Padding(