102 lines
3.6 KiB
Dart
102 lines
3.6 KiB
Dart
// ignore_for_file: prefer_const_constructors, prefer_const_literals_to_create_immutables, file_names, use_build_context_synchronously, library_private_types_in_public_api
|
|
|
|
import 'package:date_count_down/date_count_down.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:smilet/Leaderboard/LBwithoutMeny.dart';
|
|
import 'package:smilet/LoginPage.dart';
|
|
import 'SignUpPage/CreateMLSchool.dart';
|
|
|
|
class StartPage extends StatefulWidget {
|
|
const StartPage({super.key});
|
|
|
|
@override
|
|
_StartPageState createState() => _StartPageState();
|
|
}
|
|
|
|
class _StartPageState extends State<StartPage> {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
appBar: AppBar(
|
|
automaticallyImplyLeading: false,
|
|
backgroundColor: Color.fromARGB(0, 8, 77, 188),
|
|
elevation: 0,
|
|
),
|
|
body: Center(
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: <Widget>[
|
|
Padding(
|
|
padding: const EdgeInsets.all(30.0),
|
|
child: SizedBox(
|
|
width: 250,
|
|
height: 250,
|
|
child: Image.asset(
|
|
'assets/images/smilet.png',
|
|
fit: BoxFit.fill,
|
|
),
|
|
),
|
|
),
|
|
CountDownText(
|
|
due: DateTime.parse("2024-08-17"),
|
|
finishedText: "Ingen tid",
|
|
showLabel: true,
|
|
longDateName: false,
|
|
style: TextStyle(
|
|
color: Color.fromARGB(255, 255, 243, 115),
|
|
fontSize: 20,
|
|
fontWeight: FontWeight.bold),
|
|
),
|
|
Text('kvar till Midnattsloppet!',
|
|
style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold)),
|
|
Padding(
|
|
padding: const EdgeInsets.only(top: 60.0),
|
|
child: ElevatedButton(
|
|
style: TextButton.styleFrom(
|
|
backgroundColor: Color.fromARGB(255, 249, 138, 11),
|
|
fixedSize: Size(200, 40),
|
|
),
|
|
onPressed: () {
|
|
Navigator.push(context,
|
|
MaterialPageRoute(builder: (context) => SignUpPage()));
|
|
},
|
|
child: Text('Skapa konto',
|
|
style: TextStyle(fontSize: 20, color: Colors.white))),
|
|
),
|
|
Padding(
|
|
padding: const EdgeInsets.only(top: 10.0),
|
|
child: ElevatedButton(
|
|
style: TextButton.styleFrom(
|
|
backgroundColor: Color.fromARGB(255, 249, 138, 11),
|
|
fixedSize: Size(200, 40),
|
|
),
|
|
onPressed: () {
|
|
Navigator.push(context,
|
|
MaterialPageRoute(builder: (context) => LoginPage()));
|
|
},
|
|
child: Text('Logga in',
|
|
style: TextStyle(fontSize: 20, color: Colors.white))),
|
|
),
|
|
Padding(
|
|
padding: const EdgeInsets.only(top: 10.0),
|
|
child: ElevatedButton(
|
|
style: TextButton.styleFrom(
|
|
backgroundColor: Color.fromARGB(255, 249, 138, 11),
|
|
fixedSize: Size(200, 40),
|
|
),
|
|
onPressed: () {
|
|
Navigator.push(
|
|
context,
|
|
MaterialPageRoute(
|
|
builder: (context) => LBwithoutMeny()));
|
|
},
|
|
child: Text('Leaderboard',
|
|
style: TextStyle(fontSize: 17, color: Colors.white))),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|