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.

88 lines
3.6 KiB

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