login.dart 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. import 'package:flutter/material.dart';
  2. import 'package:go_router/go_router.dart';
  3. import 'package:namer_app/lang.dart';
  4. class LoginPage extends StatelessWidget {
  5. const LoginPage({super.key});
  6. @override
  7. Widget build(BuildContext context) {
  8. return Scaffold(
  9. backgroundColor: Theme.of(context).colorScheme.primaryContainer,
  10. body: Container(
  11. decoration: BoxDecoration(
  12. gradient: LinearGradient(
  13. begin: Alignment.topCenter,
  14. end: Alignment.bottomCenter,
  15. colors: [
  16. Color(0xffD9D9D9),
  17. Color(0xff0F968E),
  18. Color(0xff000000)
  19. ]),
  20. image: DecorationImage(
  21. image: AssetImage("assets/images/building.jpg"),
  22. fit: BoxFit.cover,
  23. )),
  24. child: Column(
  25. mainAxisAlignment: MainAxisAlignment.spaceEvenly,
  26. children: [
  27. Row(
  28. children: [
  29. BackButton(color: Colors.white),
  30. Column(
  31. crossAxisAlignment: CrossAxisAlignment.start,
  32. children: [
  33. Text(
  34. 'Kembali',
  35. style: TextStyle(color: Colors.white),
  36. ),
  37. Text(
  38. 'pindai QR',
  39. style: TextStyle(color: Colors.white),
  40. ),
  41. ],
  42. ),
  43. Expanded(child: Container()),
  44. Lang(),
  45. ],
  46. ),
  47. Expanded(
  48. child: Center(
  49. child: Row(
  50. mainAxisAlignment: MainAxisAlignment.center,
  51. children: [
  52. Text(
  53. 'tel',
  54. style: TextStyle(color: Color(0xffFF6600), fontSize: 48),
  55. ),
  56. Text(
  57. 'now',
  58. style: TextStyle(color: Color(0xffFFFFFF), fontSize: 48),
  59. ),
  60. ],
  61. )),
  62. ),
  63. Expanded(
  64. child: Column(
  65. children: [
  66. Padding(
  67. padding: const EdgeInsets.all(8.0),
  68. child: SizedBox(
  69. width: 396,
  70. height: 51,
  71. child: TextField(
  72. decoration: InputDecoration(
  73. border: OutlineInputBorder(),
  74. focusedBorder: OutlineInputBorder(
  75. borderRadius:
  76. BorderRadius.all(Radius.circular(12)),
  77. borderSide: BorderSide(color: Colors.white)),
  78. enabledBorder: OutlineInputBorder(
  79. borderRadius:
  80. BorderRadius.all(Radius.circular(12)),
  81. borderSide: BorderSide(color: Colors.white)),
  82. labelText: 'Nama Pengguna',
  83. labelStyle: TextStyle(color: Colors.white),
  84. filled: true,
  85. fillColor: Colors.white.withOpacity(0.25)),
  86. cursorColor: Colors.white,
  87. style: TextStyle(color: Colors.white),
  88. ),
  89. ),
  90. ),
  91. SizedBox(
  92. width: 396,
  93. height: 51,
  94. child: TextField(
  95. obscureText: true,
  96. decoration: InputDecoration(
  97. border: OutlineInputBorder(),
  98. focusedBorder: OutlineInputBorder(
  99. borderRadius: BorderRadius.all(Radius.circular(12)),
  100. borderSide: BorderSide(color: Colors.white)),
  101. enabledBorder: OutlineInputBorder(
  102. borderRadius: BorderRadius.all(Radius.circular(12)),
  103. borderSide: BorderSide(color: Colors.white)),
  104. labelText: 'Kata Sandi',
  105. labelStyle: TextStyle(color: Colors.white),
  106. filled: true,
  107. fillColor: Colors.white.withOpacity(0.25)),
  108. cursorColor: Colors.white,
  109. style: TextStyle(color: Colors.white),
  110. ),
  111. ),
  112. Padding(
  113. padding: const EdgeInsets.all(20.0),
  114. child: SizedBox(
  115. width: 396,
  116. height: 61,
  117. child: ElevatedButton(
  118. onPressed: () => context.go('/list'),
  119. style: ElevatedButton.styleFrom(
  120. backgroundColor: Color(0xff078C84).withOpacity(0.76),
  121. side: BorderSide(color: Colors.white),
  122. shape: RoundedRectangleBorder(
  123. borderRadius: BorderRadius.circular(12.0),
  124. ),
  125. ),
  126. child: Text(
  127. 'Masuk',
  128. style: TextStyle(color: Colors.white),
  129. ),
  130. ),
  131. ),
  132. ),
  133. Text(
  134. 'Frisian Flag Indonesia, Tbk.',
  135. style: TextStyle(color: Colors.white),
  136. ),
  137. ],
  138. )),
  139. Padding(
  140. padding: const EdgeInsets.all(8.0),
  141. child: Column(
  142. children: [
  143. Text('Kebijakan Privasi',
  144. style: TextStyle(
  145. fontSize: 16,
  146. decoration: TextDecoration.underline,
  147. fontWeight: FontWeight.w400,
  148. color: Colors.white,
  149. decorationColor: Colors.white)),
  150. Text('Versi 4.0.0.0',
  151. style: TextStyle(
  152. fontSize: 16,
  153. fontWeight: FontWeight.w400,
  154. color: Colors.white,
  155. ))
  156. ],
  157. ),
  158. ),
  159. ],
  160. ),
  161. ),
  162. );
  163. }
  164. }