52 lines
1.0 KiB
Dart
52 lines
1.0 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
void main() {
|
|
runApp(const PongGame());
|
|
}
|
|
|
|
class PongGame extends StatelessWidget {
|
|
const PongGame({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return const MaterialApp(
|
|
title: 'Pong Game',
|
|
home: StartScreen(),
|
|
);
|
|
}
|
|
}
|
|
|
|
class StartScreen extends StatelessWidget {
|
|
const StartScreen({super.key});
|
|
|
|
@override
|
|
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!'),
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|
|
class GameScreen extends StatefulWidget {
|
|
const GameScreen({super.key});
|
|
|
|
@override
|
|
State<GameScreen> createState() => _GameScreenState();
|
|
}
|
|
|
|
class _GameScreenState extends State<GameScreen> {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return const Placeholder();
|
|
}
|
|
}
|