login.dart 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  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. image: DecorationImage(
  13. image: AssetImage("assets/images/building.jpg"),
  14. fit: BoxFit.cover,
  15. )),
  16. child: Column(
  17. mainAxisAlignment: MainAxisAlignment.spaceEvenly,
  18. children: [
  19. Row(
  20. children: [
  21. BackButton(color: Colors.white),
  22. Text(
  23. 'Kembali Pindai QR',
  24. softWrap: true,
  25. textAlign: TextAlign.left,
  26. style: TextStyle(color: Colors.white),
  27. ),
  28. Expanded(child: Container()),
  29. Lang(),
  30. ],
  31. ),
  32. Expanded(
  33. child: Center(
  34. child: Text(
  35. 'telnow',
  36. style: TextStyle(color: Color(0xffFF6600), fontSize: 48),
  37. )),
  38. ),
  39. Expanded(
  40. child: Column(
  41. children: [
  42. Padding(
  43. padding: const EdgeInsets.all(8.0),
  44. child: TextField(
  45. decoration: InputDecoration(
  46. border: OutlineInputBorder(),
  47. labelText: 'Nama Pengguna',
  48. ),
  49. ),
  50. ),
  51. Padding(
  52. padding: const EdgeInsets.all(8.0),
  53. child: TextField(
  54. obscureText: true,
  55. decoration: InputDecoration(
  56. border: OutlineInputBorder(),
  57. labelText: 'Kata Sandi',
  58. ),
  59. ),
  60. ),
  61. Padding(
  62. padding: const EdgeInsets.all(8.0),
  63. child: ElevatedButton(
  64. onPressed: () => context.go('/list'),
  65. style: ButtonStyle(
  66. padding: MaterialStateProperty.all<EdgeInsets>(
  67. EdgeInsets.only(
  68. left: 260, right: 260, bottom: 25, top: 25)),
  69. backgroundColor: MaterialStateProperty.all(
  70. Color.fromARGB(0, 7, 140, 132)),
  71. foregroundColor:
  72. MaterialStateProperty.all<Color>(Colors.black),
  73. shape:
  74. MaterialStateProperty.all<RoundedRectangleBorder>(
  75. RoundedRectangleBorder(
  76. borderRadius: BorderRadius.circular(10),
  77. ))),
  78. child: Text(
  79. 'Masuk',
  80. style: TextStyle(color: Colors.white),
  81. ),
  82. ),
  83. ),
  84. Text(
  85. 'Frisian Flag Indonesia, Tbk.',
  86. style: TextStyle(color: Colors.white),
  87. ),
  88. ],
  89. )),
  90. Column(
  91. children: [
  92. Text('Kebijakan Privasi',
  93. style: TextStyle(
  94. fontSize: 16,
  95. decoration: TextDecoration.underline,
  96. fontWeight: FontWeight.w800,
  97. color: Colors.white)),
  98. Text('Versi 4.0.0.0',
  99. style: TextStyle(
  100. fontSize: 16,
  101. fontWeight: FontWeight.w800,
  102. color: Colors.white,
  103. ))
  104. ],
  105. ),
  106. Container(
  107. color: Theme.of(context).colorScheme.primaryContainer,
  108. )
  109. ],
  110. ),
  111. ),
  112. );
  113. }
  114. }