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

import 'package:flutter/material.dart';
import './login.dart';
import './signup.dart';
class UnauthenticatedLandingWidget extends StatefulWidget {
const UnauthenticatedLandingWidget({Key? key}) : super(key: key);
@override
State<UnauthenticatedLandingWidget> createState() => _UnauthenticatedLandingWidgetState();
}
class _UnauthenticatedLandingWidgetState extends State<UnauthenticatedLandingWidget> {
@override
Widget build(BuildContext context) {
final ButtonStyle buttonStyle = ElevatedButton.styleFrom(
backgroundColor: Theme.of(context).colorScheme.surface,
foregroundColor: Theme.of(context).colorScheme.onSurface,
minimumSize: const Size.fromHeight(50),
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 10),
textStyle: const TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
),
);
return WillPopScope(
onWillPop: () async => false,
child: Scaffold(
body: SafeArea(
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Center(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: const [
Image(
image: AssetImage('assets/logo_orange.png'),
height: 150,
)
]
),
),
const SizedBox(height: 10),
Padding(
padding: const EdgeInsets.only(
top: 15,
bottom: 15,
left: 20,
right: 20,
),
child: Column (
children: [
ElevatedButton(
child: const Text('Login'),
onPressed: () => {
Navigator.of(context).push(
MaterialPageRoute(builder: (context) => const Login()),
),
},
style: buttonStyle,
),
const SizedBox(height: 20),
ElevatedButton(
child: const Text('Sign Up'),
onPressed: () => {
Navigator.of(context).push(
MaterialPageRoute(builder: (context) => const Signup()),
),
},
style: buttonStyle,
),
]
),
),
],
),
),
),
),
);
}
}