|
@@ -1,14 +1,17 @@
|
|
|
import 'package:flutter/material.dart';
|
|
|
import 'package:go_router/go_router.dart';
|
|
|
-import 'package:namer_app/account.dart';
|
|
|
-import 'package:namer_app/data.dart';
|
|
|
-import 'package:namer_app/list.dart';
|
|
|
+import 'package:namer_app/edituser.dart';
|
|
|
+import 'package:namer_app/footer.dart';
|
|
|
+import 'package:namer_app/header.dart';
|
|
|
+import 'package:namer_app/listbug.dart';
|
|
|
+import 'package:namer_app/listcomment.dart';
|
|
|
+import 'package:namer_app/listmember.dart';
|
|
|
+import 'package:namer_app/listplatform.dart';
|
|
|
+import 'package:namer_app/listtable.dart';
|
|
|
+import 'package:namer_app/listuser.dart';
|
|
|
import 'package:namer_app/login.dart';
|
|
|
-import 'package:namer_app/lang.dart';
|
|
|
-import 'package:namer_app/listblock.dart';
|
|
|
import 'package:flutter/rendering.dart';
|
|
|
-import 'package:namer_app/detail.dart';
|
|
|
-import 'package:namer_app/search.dart';
|
|
|
+import 'package:namer_app/signup.dart';
|
|
|
|
|
|
void main() {
|
|
|
runApp(MyApp());
|
|
@@ -17,40 +20,44 @@ void main() {
|
|
|
final _router = GoRouter(
|
|
|
routes: [
|
|
|
GoRoute(path: '/', builder: (context, state) => MyHomePage(), routes: [
|
|
|
- GoRoute(
|
|
|
- path: 'login',
|
|
|
- builder: (context, state) => LoginPage(),
|
|
|
- ),
|
|
|
- GoRoute(
|
|
|
- path: 'list',
|
|
|
- builder: (context, state) => ListPage(),
|
|
|
- routes: [
|
|
|
- GoRoute(
|
|
|
- path: 'listblock',
|
|
|
- builder: (context, state) => ListBlockPage(),
|
|
|
+ GoRoute(path: 'login', builder: (context, state) => LoginPage(), routes: [
|
|
|
+ GoRoute(
|
|
|
+ path: 'bug',
|
|
|
+ builder: (context, state) => ListBugPage(),
|
|
|
routes: [
|
|
|
GoRoute(
|
|
|
- path: 'search/:type',
|
|
|
- builder: (context, state) {
|
|
|
- var item = items.firstWhere((element) =>
|
|
|
- element['type'] == state.pathParameters['type']);
|
|
|
- return SearchPage(items: item);
|
|
|
- })
|
|
|
- ],
|
|
|
- ),
|
|
|
- GoRoute(
|
|
|
- path: 'detail/:type',
|
|
|
- builder: (context, state) {
|
|
|
- var item = items.firstWhere((element) =>
|
|
|
- element['type'] == state.pathParameters['type']);
|
|
|
- return DetailPage(items: item);
|
|
|
- })
|
|
|
- ],
|
|
|
- ),
|
|
|
+ path: 'comment',
|
|
|
+ builder: (context, state) => ListCommentPage(),
|
|
|
+ )
|
|
|
+ ])
|
|
|
+ ]),
|
|
|
GoRoute(
|
|
|
- path: 'account',
|
|
|
- builder: (context, state) => AccountPage(),
|
|
|
+ path: 'signup',
|
|
|
+ builder: (context, state) => SignupPage(),
|
|
|
+ routes: [
|
|
|
+ GoRoute(
|
|
|
+ path: 'listuser',
|
|
|
+ builder: (context, state) => ListUserPage(),
|
|
|
+ routes: [
|
|
|
+ GoRoute(
|
|
|
+ path: 'edit',
|
|
|
+ builder: (context, state) => EditUserPage(),
|
|
|
+ )
|
|
|
+ ])
|
|
|
+ ]),
|
|
|
+ GoRoute(
|
|
|
+ path: 'maintenance',
|
|
|
+ builder: (context, state) => ListTablePage(),
|
|
|
),
|
|
|
+ GoRoute(
|
|
|
+ path: 'listplatform',
|
|
|
+ builder: (context, state) => ListPlatformPage(),
|
|
|
+ routes: [
|
|
|
+ GoRoute(
|
|
|
+ path: 'listmember',
|
|
|
+ builder: (context, state) => ListMemberPage(),
|
|
|
+ )
|
|
|
+ ])
|
|
|
]),
|
|
|
],
|
|
|
);
|
|
@@ -62,7 +69,7 @@ class MyApp extends StatelessWidget {
|
|
|
Widget build(BuildContext context) {
|
|
|
return MaterialApp.router(
|
|
|
debugShowCheckedModeBanner: false,
|
|
|
- title: 'TelNow Lat',
|
|
|
+ title: 'Bug Listing',
|
|
|
routerConfig: _router,
|
|
|
);
|
|
|
}
|
|
@@ -73,122 +80,73 @@ class MyHomePage extends StatelessWidget {
|
|
|
Widget build(BuildContext context) {
|
|
|
debugPaintSizeEnabled = false;
|
|
|
return Scaffold(
|
|
|
- body: Container(
|
|
|
- decoration: BoxDecoration(
|
|
|
- gradient: LinearGradient(
|
|
|
- begin: Alignment.topCenter,
|
|
|
- end: Alignment.bottomCenter,
|
|
|
- colors: [
|
|
|
- Color(0xffD9D9D9),
|
|
|
- Color(0xff0F968E),
|
|
|
- Color(0xff000000)
|
|
|
- ]),
|
|
|
- image: DecorationImage(
|
|
|
- image: AssetImage("assets/images/building.jpg"),
|
|
|
- fit: BoxFit.cover,
|
|
|
- )),
|
|
|
- child: Column(
|
|
|
- mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
|
|
- children: [
|
|
|
- Row(
|
|
|
- mainAxisAlignment: MainAxisAlignment.end,
|
|
|
- children: [
|
|
|
- Lang(),
|
|
|
- ],
|
|
|
- ),
|
|
|
- Expanded(
|
|
|
- child: Center(
|
|
|
- child: Row(
|
|
|
+ appBar: Header(
|
|
|
+ title: Text('title'),
|
|
|
+ appBar: AppBar(),
|
|
|
+ widgets: <Widget>[Icon(Icons.more_vert)],
|
|
|
+ ),
|
|
|
+ body: Container(
|
|
|
+ decoration: BoxDecoration(color: Colors.black.withOpacity(0.6)),
|
|
|
+ child: Column(
|
|
|
+ mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
|
|
+ children: [
|
|
|
+ Expanded(
|
|
|
+ child: Center(
|
|
|
+ child: Row(
|
|
|
+ mainAxisAlignment: MainAxisAlignment.center,
|
|
|
+ children: [
|
|
|
+ Text(
|
|
|
+ 'Welcome to Bug Tracker',
|
|
|
+ style: TextStyle(
|
|
|
+ color: Colors.white,
|
|
|
+ fontSize: 40,
|
|
|
+ fontWeight: FontWeight.bold),
|
|
|
+ ),
|
|
|
+ ],
|
|
|
+ )),
|
|
|
+ ),
|
|
|
+ Padding(
|
|
|
+ padding: const EdgeInsets.all(8.0),
|
|
|
+ child: Text(
|
|
|
+ 'Track, manage, and resolve bugs efficiently',
|
|
|
+ style: TextStyle(color: Colors.white, fontSize: 16),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ Row(
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
children: [
|
|
|
- Text(
|
|
|
- 'tel',
|
|
|
- style: TextStyle(color: Color(0xffFF6600), fontSize: 48),
|
|
|
+ Padding(
|
|
|
+ padding: const EdgeInsets.only(right: 10),
|
|
|
+ child: ElevatedButton(
|
|
|
+ onPressed: () => context.go('/signup'),
|
|
|
+ style: ElevatedButton.styleFrom(
|
|
|
+ side: BorderSide(color: Colors.white),
|
|
|
+ backgroundColor: Colors.transparent),
|
|
|
+ child: Text(
|
|
|
+ 'Sign Up',
|
|
|
+ style: TextStyle(color: Colors.white),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
),
|
|
|
- Text(
|
|
|
- 'now',
|
|
|
- style: TextStyle(color: Color(0xffFFFFFF), fontSize: 48),
|
|
|
+ Padding(
|
|
|
+ padding: const EdgeInsets.only(left: 10),
|
|
|
+ child: ElevatedButton(
|
|
|
+ onPressed: () => context.go('/login'),
|
|
|
+ style: ElevatedButton.styleFrom(
|
|
|
+ backgroundColor: Colors.black,
|
|
|
+ ),
|
|
|
+ child: Text(
|
|
|
+ 'Login',
|
|
|
+ style: TextStyle(color: Colors.white),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
),
|
|
|
],
|
|
|
- )),
|
|
|
- ),
|
|
|
- Padding(
|
|
|
- padding: const EdgeInsets.only(left: 180, right: 180),
|
|
|
- child: Text(
|
|
|
- 'Silakan pindai QR terlebih dulu untuk mulai menggunakan aplikasi.',
|
|
|
- softWrap: true,
|
|
|
- textAlign: TextAlign.center,
|
|
|
- style: TextStyle(fontSize: 16, color: Colors.white),
|
|
|
- ),
|
|
|
- ),
|
|
|
- Expanded(
|
|
|
- child: Center(child: Pindai()),
|
|
|
- ),
|
|
|
- Padding(
|
|
|
- padding: const EdgeInsets.all(8.0),
|
|
|
- child: Column(
|
|
|
- children: [
|
|
|
- Text('Kebijakan Privasi',
|
|
|
- style: TextStyle(
|
|
|
- fontSize: 16,
|
|
|
- decoration: TextDecoration.underline,
|
|
|
- fontWeight: FontWeight.w400,
|
|
|
- decorationColor: Colors.white,
|
|
|
- color: Colors.white)),
|
|
|
- Text('Versi 4.0.0.0',
|
|
|
- style: TextStyle(
|
|
|
- fontSize: 16,
|
|
|
- fontWeight: FontWeight.w400,
|
|
|
- color: Colors.white,
|
|
|
- ))
|
|
|
- ],
|
|
|
),
|
|
|
- ),
|
|
|
- ],
|
|
|
- ),
|
|
|
- ),
|
|
|
- );
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-class Pindai extends StatelessWidget {
|
|
|
- const Pindai({
|
|
|
- super.key,
|
|
|
- });
|
|
|
-
|
|
|
- @override
|
|
|
- Widget build(BuildContext context) {
|
|
|
- return SizedBox(
|
|
|
- width: 257,
|
|
|
- height: 96,
|
|
|
- child: ElevatedButton(
|
|
|
- onPressed: () => context.go('/login'),
|
|
|
- style: ElevatedButton.styleFrom(
|
|
|
- backgroundColor: Color(0xff078C84).withOpacity(0.76),
|
|
|
- side: BorderSide(color: Colors.white),
|
|
|
- shape: RoundedRectangleBorder(
|
|
|
- borderRadius: BorderRadius.circular(12.0),
|
|
|
- ),
|
|
|
- ),
|
|
|
- child: Row(
|
|
|
- mainAxisAlignment: MainAxisAlignment.center,
|
|
|
- children: [
|
|
|
- Text(
|
|
|
- 'Pindai QR',
|
|
|
- style: TextStyle(color: Colors.white, fontSize: 20),
|
|
|
- ),
|
|
|
- Container(
|
|
|
- width: 5,
|
|
|
- ),
|
|
|
- Image.asset(
|
|
|
- 'assets/images/scan_icon_183865.png',
|
|
|
- width: 32,
|
|
|
- height: 32,
|
|
|
- fit: BoxFit.cover,
|
|
|
- color: Color(0xffFFFFFF),
|
|
|
- )
|
|
|
+ Expanded(child: Container())
|
|
|
],
|
|
|
),
|
|
|
- ));
|
|
|
+ ),
|
|
|
+ bottomNavigationBar: Footer());
|
|
|
}
|
|
|
}
|