login.dart 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. import 'package:flutter/material.dart';
  2. import 'package:go_router/go_router.dart';
  3. import 'package:namer_app/footer.dart';
  4. import 'package:namer_app/head.dart';
  5. import 'package:namer_app/header.dart';
  6. class LoginPage extends StatelessWidget {
  7. const LoginPage({super.key});
  8. @override
  9. Widget build(BuildContext context) {
  10. return Scaffold(
  11. // appBar: Header(
  12. // title: Text('title'),
  13. // appBar: AppBar(),
  14. // widgets: <Widget>[Icon(Icons.more_vert)],
  15. // ),
  16. appBar: CustomAppbar(),
  17. backgroundColor: Colors.white,
  18. body: Column(
  19. mainAxisAlignment: MainAxisAlignment.spaceEvenly,
  20. children: [
  21. Expanded(
  22. child: Center(
  23. child: Row(
  24. mainAxisAlignment: MainAxisAlignment.center,
  25. children: [
  26. Text(
  27. 'LOGIN',
  28. style: TextStyle(color: Colors.black, fontSize: 48),
  29. ),
  30. ],
  31. )),
  32. ),
  33. Expanded(
  34. child: Column(
  35. children: [
  36. Padding(
  37. padding: const EdgeInsets.all(8.0),
  38. child: SizedBox(
  39. width: 396,
  40. height: 51,
  41. child: TextField(
  42. decoration: InputDecoration(
  43. border: OutlineInputBorder(),
  44. focusedBorder: OutlineInputBorder(
  45. borderRadius: BorderRadius.all(Radius.circular(12)),
  46. borderSide: BorderSide(color: Colors.black)),
  47. enabledBorder: OutlineInputBorder(
  48. borderRadius: BorderRadius.all(Radius.circular(12)),
  49. borderSide: BorderSide(color: Colors.black)),
  50. labelText: 'Enter Username',
  51. labelStyle: TextStyle(color: Colors.black),
  52. filled: true,
  53. fillColor: Colors.white.withOpacity(0.25)),
  54. cursorColor: Colors.black,
  55. style: TextStyle(color: Colors.black),
  56. ),
  57. ),
  58. ),
  59. SizedBox(
  60. width: 396,
  61. height: 51,
  62. child: TextField(
  63. obscureText: true,
  64. decoration: InputDecoration(
  65. border: OutlineInputBorder(),
  66. focusedBorder: OutlineInputBorder(
  67. borderRadius: BorderRadius.all(Radius.circular(12)),
  68. borderSide: BorderSide(color: Colors.black)),
  69. enabledBorder: OutlineInputBorder(
  70. borderRadius: BorderRadius.all(Radius.circular(12)),
  71. borderSide: BorderSide(color: Colors.black)),
  72. labelText: 'Enter Password',
  73. labelStyle: TextStyle(color: Colors.black),
  74. filled: true,
  75. fillColor: Colors.white.withOpacity(0.25)),
  76. cursorColor: Colors.black,
  77. style: TextStyle(color: Colors.black),
  78. ),
  79. ),
  80. Padding(
  81. padding: const EdgeInsets.all(20.0),
  82. child: SizedBox(
  83. width: 396,
  84. height: 61,
  85. child: ElevatedButton(
  86. onPressed: () => context.go('/login/bug'),
  87. style: ElevatedButton.styleFrom(
  88. backgroundColor: Colors.black, //todo putih lage
  89. side: BorderSide(color: Colors.white),
  90. shape: RoundedRectangleBorder(
  91. borderRadius: BorderRadius.circular(12.0),
  92. ),
  93. ),
  94. child: Text(
  95. 'Login',
  96. style: TextStyle(color: Colors.white),
  97. ),
  98. ),
  99. ),
  100. ),
  101. ],
  102. )),
  103. ],
  104. ),
  105. bottomNavigationBar: Footer(),
  106. );
  107. }
  108. }