athrainsky 1 tahun lalu
induk
melakukan
cad8d9a928
4 mengubah file dengan 170 tambahan dan 6 penghapusan
  1. 161 0
      lib/account.dart
  2. 1 0
      lib/list.dart
  3. 3 3
      lib/listblock.dart
  4. 5 3
      lib/main.dart

+ 161 - 0
lib/account.dart

@@ -0,0 +1,161 @@
+import 'package:flutter/material.dart';
+import 'package:date_format/date_format.dart';
+
+var date = formatDate(DateTime.now(), [HH, ':', nn]);
+
+class AccountPage extends StatelessWidget {
+  const AccountPage({super.key});
+
+  @override
+  Widget build(BuildContext context) {
+    return Scaffold(
+      appBar: AppBar(
+        backgroundColor: Colors.white,
+        automaticallyImplyLeading: false,
+        elevation: 0,
+        toolbarHeight: 44,
+        title: Text(
+          date,
+          style: TextStyle(color: Color(0xff303336), fontSize: 15),
+        ),
+        actions: [
+          Icon(
+            Icons.signal_cellular_alt,
+            color: Color(0xff303336),
+          ),
+          Icon(
+            Icons.wifi,
+            color: Color(0xff303336),
+          ),
+          RotatedBox(
+            quarterTurns: -3,
+            child: Icon(
+              Icons.battery_std,
+              color: Color(0xff303336),
+            ),
+          )
+        ],
+      ),
+      body: Column(
+        children: [
+          Container(
+            height: 44,
+            alignment: Alignment.centerLeft,
+            padding: EdgeInsets.symmetric(horizontal: 10),
+            child: Text(
+              'Account',
+              style: TextStyle(fontWeight: FontWeight.bold),
+            ),
+          ),
+          Divider(),
+          Container(
+            padding: EdgeInsets.all(10),
+            child: Row(
+              children: [
+                CircleAvatar(
+                  backgroundColor: Color(0xff078C84),
+                  child: Text('J'),
+                ),
+                Padding(
+                  padding: const EdgeInsets.symmetric(horizontal: 10),
+                  child: Text(
+                    'James Triyono',
+                    style: TextStyle(fontWeight: FontWeight.bold),
+                  ),
+                )
+              ],
+            ),
+          ),
+          Divider(
+            thickness: 8,
+          ),
+          Container(
+            alignment: Alignment.centerLeft,
+            padding: EdgeInsets.all(10),
+            child: Text(
+              'Info',
+              style: TextStyle(fontWeight: FontWeight.bold),
+            ),
+          ),
+          Container(
+            height: 5,
+          ),
+          Container(
+            padding: EdgeInsets.symmetric(horizontal: 10),
+            child: Row(
+              children: [
+                Text(
+                  'User ID',
+                  style: TextStyle(color: Color(0xff2D32BF).withOpacity(0.75)),
+                ),
+                Spacer(),
+                Text(
+                  'jamet',
+                  style: TextStyle(color: Color(0xff292D32)),
+                )
+              ],
+            ),
+          ),
+          Container(
+            height: 5,
+          ),
+          Container(
+            padding: EdgeInsets.symmetric(horizontal: 10),
+            child: Row(
+              children: [
+                Text(
+                  'Location',
+                  style: TextStyle(color: Color(0xff2D32BF).withOpacity(0.75)),
+                ),
+                Spacer(),
+                Text(
+                  'Room 331',
+                  style: TextStyle(color: Color(0xff292D32)),
+                )
+              ],
+            ),
+          ),
+          Container(
+            height: 5,
+          ),
+          Container(
+            padding: EdgeInsets.symmetric(horizontal: 10),
+            child: Row(
+              children: [
+                Text(
+                  'Request Group',
+                  style: TextStyle(color: Color(0xff2D32BF).withOpacity(0.75)),
+                ),
+                Spacer(),
+                Text(
+                  'All',
+                  style: TextStyle(color: Color(0xff292D32)),
+                )
+              ],
+            ),
+          ),
+          Container(
+            height: 10,
+          ),
+          Divider(
+            thickness: 8,
+          ),
+          Container(
+            alignment: Alignment.centerLeft,
+            padding: EdgeInsets.all(10),
+            child: Text(
+              'Setting',
+              style: TextStyle(fontWeight: FontWeight.bold),
+            ),
+          ),
+          Container(
+            padding: EdgeInsets.symmetric(horizontal: 10),
+            child: Row(
+              children: [Icon(Icons.language)],
+            ),
+          ),
+        ],
+      ),
+    );
+  }
+}

+ 1 - 0
lib/list.dart

@@ -12,6 +12,7 @@ class ListPage extends StatelessWidget {
         appBar: AppBar(
           backgroundColor: Color(0xff078C84),
           automaticallyImplyLeading: false,
+          elevation: 0,
           toolbarHeight: 44,
           title: Text(
             date,

+ 3 - 3
lib/listblock.dart

@@ -1,4 +1,5 @@
 import 'package:flutter/material.dart';
+import 'package:go_router/go_router.dart';
 import 'package:namer_app/data.dart';
 import 'package:date_format/date_format.dart';
 
@@ -11,6 +12,7 @@ class ListBlockPage extends StatelessWidget {
         appBar: AppBar(
           backgroundColor: Color(0xff078C84),
           automaticallyImplyLeading: false,
+          elevation: 0,
           toolbarHeight: 44,
           title: Text(
             date,
@@ -158,9 +160,7 @@ class TopMenu extends StatelessWidget {
           ElevatedButton(
               style: ElevatedButton.styleFrom(
                   backgroundColor: Color(0xff078C84).withOpacity(0.1)),
-              onPressed: () {
-                print('Customize');
-              },
+              onPressed: () => context.go('/account'),
               child: Text(
                 'Customize',
                 style: TextStyle(

+ 5 - 3
lib/main.dart

@@ -1,5 +1,6 @@
 import 'package:flutter/material.dart';
 import 'package:go_router/go_router.dart';
+import 'package:namer_app/account.dart';
 import 'package:namer_app/list.dart';
 import 'package:namer_app/login.dart';
 import 'package:namer_app/lang.dart';
@@ -27,6 +28,10 @@ final _router = GoRouter(
           )
         ],
       ),
+      GoRoute(
+        path: 'account',
+        builder: (context, state) => AccountPage(),
+      )
     ]),
   ],
 );
@@ -39,9 +44,6 @@ class MyApp extends StatelessWidget {
     return MaterialApp.router(
       debugShowCheckedModeBanner: false,
       title: 'TelNow Lat',
-      theme: ThemeData(
-        useMaterial3: true,
-      ),
       routerConfig: _router,
     );
   }