You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1.3 KiB
Dart
49 lines
1.3 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:google_fonts/google_fonts.dart';
|
|
|
|
class StartScreen extends StatelessWidget {
|
|
const StartScreen(this.startQuiz, {super.key});
|
|
|
|
final void Function() startQuiz;
|
|
|
|
@override
|
|
Widget build(context) {
|
|
return Center(
|
|
child: Column(
|
|
mainAxisSize: MainAxisSize.min,
|
|
children: [
|
|
Image.asset(
|
|
'assets/images/quiz-logo.png',
|
|
width: 300,
|
|
color: const Color.fromARGB(150, 255, 255, 255),
|
|
),
|
|
// Opacity(
|
|
// opacity: 0.6,
|
|
// child: Image.asset(
|
|
// 'assets/images/quiz-logo.png',
|
|
// width: 300,
|
|
// ),
|
|
// ),
|
|
const SizedBox(height: 80),
|
|
Text(
|
|
'Learn Flutter the fun way!',
|
|
style: GoogleFonts.lato(
|
|
color: const Color.fromARGB(255, 237, 223, 252),
|
|
fontSize: 24,
|
|
),
|
|
),
|
|
const SizedBox(height: 30),
|
|
OutlinedButton.icon(
|
|
onPressed: startQuiz,
|
|
style: OutlinedButton.styleFrom(
|
|
foregroundColor: Colors.white,
|
|
),
|
|
icon: const Icon(Icons.arrow_right_alt),
|
|
label: const Text('Start Quiz'),
|
|
)
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|