Encrypted messaging app
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

85 lines
3.5 KiB

  1. import 'package:flutter/material.dart';
  2. import 'package:font_awesome_flutter/font_awesome_flutter.dart';
  3. import './login.dart';
  4. import './signup.dart';
  5. class UnauthenticatedLandingWidget extends StatefulWidget {
  6. const UnauthenticatedLandingWidget({Key? key}) : super(key: key);
  7. @override
  8. State<UnauthenticatedLandingWidget> createState() => _UnauthenticatedLandingWidgetState();
  9. }
  10. class _UnauthenticatedLandingWidgetState extends State<UnauthenticatedLandingWidget> {
  11. @override
  12. Widget build(BuildContext context) {
  13. final ButtonStyle buttonStyle = ElevatedButton.styleFrom(
  14. primary: Colors.white,
  15. onPrimary: Colors.cyan,
  16. minimumSize: const Size.fromHeight(50),
  17. padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 10),
  18. textStyle: const TextStyle(
  19. fontSize: 20,
  20. fontWeight: FontWeight.bold,
  21. color: Colors.red,
  22. ),
  23. );
  24. return WillPopScope(
  25. onWillPop: () async => false,
  26. child: Scaffold(
  27. backgroundColor: Colors.cyan,
  28. body: SafeArea(
  29. child: Center(
  30. child: Column(
  31. mainAxisAlignment: MainAxisAlignment.center,
  32. crossAxisAlignment: CrossAxisAlignment.center,
  33. children: <Widget>[
  34. Center(
  35. child: Row(
  36. mainAxisAlignment: MainAxisAlignment.center,
  37. crossAxisAlignment: CrossAxisAlignment.center,
  38. children: const [
  39. FaIcon(FontAwesomeIcons.envelope, color: Colors.white, size: 40),
  40. SizedBox(width: 15),
  41. Text('Envelope', style: TextStyle(fontSize: 40, color: Colors.white),)
  42. ]
  43. ),
  44. ),
  45. const SizedBox(height: 10),
  46. Padding(
  47. padding: const EdgeInsets.all(15),
  48. child: Column (
  49. children: [
  50. ElevatedButton(
  51. child: const Text('Login'),
  52. onPressed: () => {
  53. Navigator.of(context).push(
  54. MaterialPageRoute(builder: (context) => const Login()),
  55. ),
  56. },
  57. style: buttonStyle,
  58. ),
  59. const SizedBox(height: 20),
  60. ElevatedButton(
  61. child: const Text('Sign Up'),
  62. onPressed: () => {
  63. Navigator.of(context).push(
  64. MaterialPageRoute(builder: (context) => const Signup()),
  65. ),
  66. },
  67. style: buttonStyle,
  68. ),
  69. ]
  70. ),
  71. ),
  72. ],
  73. ),
  74. ),
  75. ),
  76. ),
  77. );
  78. }
  79. }