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.

98 lines
4.1 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: Theme.of(context).colorScheme.surface,
  15. onPrimary: Theme.of(context).colorScheme.onSurface,
  16. minimumSize: const Size.fromHeight(50),
  17. padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 10),
  18. textStyle: const TextStyle(
  19. fontSize: 22,
  20. fontWeight: FontWeight.bold,
  21. ),
  22. );
  23. return WillPopScope(
  24. onWillPop: () async => false,
  25. child: Scaffold(
  26. body: SafeArea(
  27. child: Center(
  28. child: Column(
  29. mainAxisAlignment: MainAxisAlignment.center,
  30. crossAxisAlignment: CrossAxisAlignment.center,
  31. children: <Widget>[
  32. Center(
  33. child: Row(
  34. mainAxisAlignment: MainAxisAlignment.center,
  35. crossAxisAlignment: CrossAxisAlignment.center,
  36. children: [
  37. FaIcon(
  38. FontAwesomeIcons.envelope,
  39. color: Theme.of(context).colorScheme.onBackground,
  40. size: 40
  41. ),
  42. const SizedBox(width: 15),
  43. Text(
  44. 'Envelope',
  45. style: TextStyle(
  46. fontSize: 40,
  47. color: Theme.of(context).colorScheme.onBackground,
  48. ),
  49. )
  50. ]
  51. ),
  52. ),
  53. const SizedBox(height: 10),
  54. Padding(
  55. padding: const EdgeInsets.only(
  56. top: 15,
  57. bottom: 15,
  58. left: 20,
  59. right: 20,
  60. ),
  61. child: Column (
  62. children: [
  63. ElevatedButton(
  64. child: const Text('Login'),
  65. onPressed: () => {
  66. Navigator.of(context).push(
  67. MaterialPageRoute(builder: (context) => const Login()),
  68. ),
  69. },
  70. style: buttonStyle,
  71. ),
  72. const SizedBox(height: 20),
  73. ElevatedButton(
  74. child: const Text('Sign Up'),
  75. onPressed: () => {
  76. Navigator.of(context).push(
  77. MaterialPageRoute(builder: (context) => const Signup()),
  78. ),
  79. },
  80. style: buttonStyle,
  81. ),
  82. ]
  83. ),
  84. ),
  85. ],
  86. ),
  87. ),
  88. ),
  89. ),
  90. );
  91. }
  92. }