Compare commits
No commits in common. "1b50e5fa741df695559e7ab8f3b49bd116756be4" and "7486be476ade99ad8d929cb3079046391dca0934" have entirely different histories.
1b50e5fa74
...
7486be476a
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 544 B |
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 442 B |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 721 B |
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 254 KiB |
Before Width: | Height: | Size: 462 KiB |
@ -1,5 +1,4 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:lottis_birthday_escaperoom_app/barcode_scanner_window.dart';
|
||||
import 'package:lottis_birthday_escaperoom_app/controller/gamecontroller.dart';
|
||||
@ -8,7 +7,6 @@ import 'package:lottis_birthday_escaperoom_app/mobile_scanner_overlay.dart';
|
||||
import 'package:lottis_birthday_escaperoom_app/screens/marker.dart';
|
||||
|
||||
void main() {
|
||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
||||
runApp(const MyApp());
|
||||
}
|
||||
|
||||
|
@ -7,68 +7,20 @@ import 'package:lottis_birthday_escaperoom_app/screens/admin.dart';
|
||||
import 'package:lottis_birthday_escaperoom_app/util.dart';
|
||||
import 'package:mobile_scanner/mobile_scanner.dart';
|
||||
|
||||
class PatternScreen extends StatefulWidget {
|
||||
class PatternScreen extends StatelessWidget {
|
||||
const PatternScreen({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_PatternScreenState createState() => _PatternScreenState();
|
||||
}
|
||||
|
||||
class _PatternScreenState extends State<PatternScreen> {
|
||||
bool _showBackPattern = false;
|
||||
|
||||
void _togglePattern(int index) {
|
||||
setState(() {
|
||||
_showBackPattern = index == 1;
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
GameController c = Get.find();
|
||||
return PopScope(
|
||||
canPop: false,
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('Lotti\'s Escape Room - Rätsel 1'),
|
||||
actions: [
|
||||
IconButton(
|
||||
icon: const Icon(Icons.smart_toy_outlined),
|
||||
onPressed: () {
|
||||
showAdminLoginPopup();
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
body: Column(
|
||||
children: [
|
||||
Expanded(
|
||||
child: RotatedBox(
|
||||
quarterTurns: 1,
|
||||
child: Image.asset(
|
||||
!_showBackPattern
|
||||
? 'assets/images/pattern_vorne.png'
|
||||
: 'assets/images/pattern_hinten.png',
|
||||
fit: BoxFit.contain,
|
||||
width: double.infinity,
|
||||
height: double.infinity,
|
||||
),
|
||||
),
|
||||
),
|
||||
BottomNavigationBar(
|
||||
currentIndex: _showBackPattern ? 1 : 0,
|
||||
onTap: _togglePattern,
|
||||
items: const [
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(Icons.front_hand),
|
||||
label: 'Vorne',
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(Icons.back_hand),
|
||||
label: 'Hinten',
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
body: Image.asset(
|
||||
'assets/images/pattern.jpg', // Replace with your image path
|
||||
fit: BoxFit.contain,
|
||||
width: double.infinity,
|
||||
height: double.infinity,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
@ -68,8 +68,6 @@ flutter:
|
||||
# - images/a_dot_burr.jpeg
|
||||
# - images/a_dot_ham.jpeg
|
||||
- assets/sounds/beep.mp3
|
||||
- assets/images/pattern_hinten.png
|
||||
- assets/images/pattern_vorne.png
|
||||
|
||||
# An image asset can refer to one or more resolution-specific "variants", see
|
||||
# https://flutter.dev/to/resolution-aware-images
|
||||
|