79 lines
2.8 KiB
Dart
79 lines
2.8 KiB
Dart
import 'package:drifter/models/models.dart';
|
|
import 'package:drifter/theme/app_colors.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
class WelcomeScreen extends StatelessWidget {
|
|
const WelcomeScreen({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
backgroundColor: AppColors.mainBackground,
|
|
body: Center(
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.end,
|
|
children: [
|
|
Image(image: AssetImage('assets/images/logo/welcome.png')),
|
|
SizedBox(
|
|
height: 270,
|
|
),
|
|
Padding(
|
|
padding: const EdgeInsets.only(left: 16, right: 16),
|
|
child: SizedBox(
|
|
height: 56,
|
|
width: double.infinity,
|
|
child: ElevatedButton(
|
|
onPressed: () {
|
|
UserData.isLogin = true;
|
|
Navigator.pushNamed(context, '/terms');
|
|
},
|
|
child: Text(
|
|
'Login',
|
|
style: TextStyle(fontSize: 16),
|
|
),
|
|
style: ButtonStyle(
|
|
shape: MaterialStatePropertyAll(RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(100))),
|
|
backgroundColor: const MaterialStatePropertyAll(
|
|
AppColors.buttonPrimaryDefaultBg),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
Padding(
|
|
padding: const EdgeInsets.all(16.0),
|
|
child: SizedBox(
|
|
height: 56,
|
|
width: double.infinity,
|
|
child: OutlinedButton(
|
|
onPressed: () {
|
|
UserData.isLogin = false;
|
|
Navigator.pushNamed(context, '/terms');
|
|
},
|
|
child: Text(
|
|
'Create an account',
|
|
style: TextStyle(fontSize: 16),
|
|
),
|
|
style: ButtonStyle(
|
|
side: const MaterialStatePropertyAll(BorderSide(
|
|
width: 2,
|
|
color: AppColors.buttonOutlinedDefaultBorder)),
|
|
shape: MaterialStatePropertyAll(RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(100))),
|
|
backgroundColor: const MaterialStatePropertyAll(
|
|
AppColors.mainBackground,
|
|
),
|
|
foregroundColor: const MaterialStatePropertyAll(
|
|
AppColors.buttonOutlinedDefaultText),
|
|
overlayColor: const MaterialStatePropertyAll(
|
|
AppColors.buttonOutlinedPressedBg)),
|
|
),
|
|
),
|
|
)
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|