login.dart 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  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({Key? key}) : super(key: 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. enabledBorder: OutlineInputBorder(
  75. borderSide: BorderSide(color: Color(0xffFFFFFF))),
  76. labelText: 'Nama Pengguna',
  77. labelStyle: TextStyle(color: Color(0xffFFFFFF)),
  78. filled: true,
  79. fillColor: Colors.white.withOpacity(0.25)),
  80. style: TextStyle(color: Color(0xffFFFFFF)),
  81. ),
  82. ),
  83. ),
  84. SizedBox(
  85. width: 396,
  86. height: 51,
  87. child: TextField(
  88. obscureText: true,
  89. decoration: InputDecoration(
  90. border: OutlineInputBorder(),
  91. enabledBorder: OutlineInputBorder(
  92. borderSide: BorderSide(color: Color(0xffFFFFFF))),
  93. labelText: 'Kata Sandi',
  94. labelStyle: TextStyle(color: Color(0xffFFFFFF)),
  95. filled: true,
  96. fillColor: Colors.white.withOpacity(0.25)),
  97. style: TextStyle(color: Color(0xffFFFFFF)),
  98. ),
  99. ),
  100. Padding(
  101. padding: const EdgeInsets.all(20.0),
  102. child: SizedBox(
  103. width: 396,
  104. height: 61,
  105. child: ElevatedButton(
  106. onPressed: () => context.go('/list'),
  107. style: ElevatedButton.styleFrom(
  108. backgroundColor: Color(0xff078C84).withOpacity(0.76),
  109. side: BorderSide(color: Colors.white),
  110. shape: RoundedRectangleBorder(
  111. borderRadius: BorderRadius.circular(12.0),
  112. ),
  113. ),
  114. child: Text(
  115. 'Masuk',
  116. style: TextStyle(color: Colors.white),
  117. ),
  118. ),
  119. ),
  120. ),
  121. Text(
  122. 'Frisian Flag Indonesia, Tbk.',
  123. style: TextStyle(color: Colors.white),
  124. ),
  125. ],
  126. )),
  127. Padding(
  128. padding: const EdgeInsets.all(8.0),
  129. child: Column(
  130. children: [
  131. Text('Kebijakan Privasi',
  132. style: TextStyle(
  133. fontSize: 16,
  134. decoration: TextDecoration.underline,
  135. fontWeight: FontWeight.w400,
  136. color: Colors.white,
  137. decorationColor: Colors.white)),
  138. Text('Versi 4.0.0.0',
  139. style: TextStyle(
  140. fontSize: 16,
  141. fontWeight: FontWeight.w400,
  142. color: Colors.white,
  143. ))
  144. ],
  145. ),
  146. ),
  147. ],
  148. ),
  149. ),
  150. );
  151. }
  152. }