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: [
|
|
Image(
|
|
image: AssetImage(
|
|
MediaQuery.of(context).platformBrightness == Brightness.dark ?
|
|
'assets/logo_orange.png' :
|
|
'assets/logo_blue.png'
|
|
),
|
|
height: 150,
|
|
)
|
|
]
|
|
),
|
|
),
|
|
const SizedBox(height: 30),
|
|
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,
|
|
),
|
|
const SizedBox(height: 50),
|
|
]
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|