CPD/Pong/lib/main.dart

52 lines
1.0 KiB
Dart
Raw Normal View History

2023-11-21 15:53:43 +01:00
import 'package:flutter/material.dart';
2023-11-21 15:58:06 +01:00
void main() {
2023-11-21 17:28:39 +01:00
runApp(const PongGame());
2023-11-21 15:53:43 +01:00
}
2023-11-21 17:28:39 +01:00
class PongGame extends StatelessWidget {
const PongGame({super.key});
2023-11-21 15:53:43 +01:00
@override
Widget build(BuildContext context) {
2023-11-21 17:28:39 +01:00
return const MaterialApp(
title: 'Pong Game',
home: StartScreen(),
2023-11-21 15:53:43 +01:00
);
}
}
2023-11-21 17:28:39 +01:00
class StartScreen extends StatelessWidget {
const StartScreen({super.key});
2023-11-21 15:53:43 +01:00
@override
2023-11-21 17:28:39 +01:00
Widget build(BuildContext context) {
return Scaffold(
body: GestureDetector(
onTap: () {
/* Navigator.of(context).push(MaterialPageRoute(
builder: (context) {
return const GameScreen();
},
)); */
},
child: const Text('Berühren um zu beginnen!'),
),
);
}
2023-11-21 15:53:43 +01:00
}
2023-11-21 17:28:39 +01:00
class GameScreen extends StatefulWidget {
const GameScreen({super.key});
2023-11-21 15:53:43 +01:00
2023-11-21 17:28:39 +01:00
@override
State<GameScreen> createState() => _GameScreenState();
}
2023-11-21 15:53:43 +01:00
2023-11-21 17:28:39 +01:00
class _GameScreenState extends State<GameScreen> {
2023-11-21 15:53:43 +01:00
@override
Widget build(BuildContext context) {
2023-11-21 17:28:39 +01:00
return const Placeholder();
2023-11-21 15:53:43 +01:00
}
}