Added first draft of login and tour select page
This commit is contained in:
0
lib/ui/page/delivery.dart
Normal file
0
lib/ui/page/delivery.dart
Normal file
55
lib/ui/page/login.dart
Normal file
55
lib/ui/page/login.dart
Normal file
@ -0,0 +1,55 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'tour_select.dart';
|
||||
|
||||
class LoginPage extends StatefulWidget {
|
||||
const LoginPage({super.key});
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() => _LoginPageState();
|
||||
}
|
||||
|
||||
class _LoginPageState extends State<LoginPage> {
|
||||
void _onLogin() {
|
||||
Navigator.pushReplacement(context, MaterialPageRoute(builder: (context) => const TourSelectPage()));
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
body: Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(
|
||||
top: MediaQuery.of(context).size.height * 0.1,
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
Image.asset(
|
||||
"assets/graphics/bg-supplier-clouds.png",
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
Text(
|
||||
"Willkommen bei\nGaslieferung!",
|
||||
style: Theme.of(context).textTheme.headlineMedium,
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
|
||||
Text(
|
||||
"\nMelden Sie sich an, um Ihre Tour zu starten.",
|
||||
style: Theme.of(context).textTheme.bodySmall,
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(50),
|
||||
child: FilledButton(
|
||||
onPressed: _onLogin,
|
||||
child: Text("Einloggen"),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
18
lib/ui/page/tour.dart
Normal file
18
lib/ui/page/tour.dart
Normal file
@ -0,0 +1,18 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class TourPage extends StatefulWidget {
|
||||
const TourPage({super.key});
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() => _TourPageState();
|
||||
}
|
||||
|
||||
class _TourPageState extends State<TourPage> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(title: Text("Lieferungen")),
|
||||
body: Center(child: const Text("HI")),
|
||||
);
|
||||
}
|
||||
}
|
||||
103
lib/ui/page/tour_select.dart
Normal file
103
lib/ui/page/tour_select.dart
Normal file
@ -0,0 +1,103 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class TourSelectPage extends StatefulWidget {
|
||||
const TourSelectPage({super.key});
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() => _TourSelectPageState();
|
||||
}
|
||||
|
||||
class _TourSelectPageState extends State<TourSelectPage> {
|
||||
Widget _listTour() {
|
||||
return ListView.separated(
|
||||
shrinkWrap: true,
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
itemBuilder: (context, index) {
|
||||
return ListTile(
|
||||
leading: Icon(Icons.local_shipping_outlined),
|
||||
title: const Text("Dennis Nemec"),
|
||||
subtitle: const Text("15 Lieferungen"),
|
||||
tileColor: Theme.of(context).colorScheme.surface,
|
||||
trailing: Icon(Icons.arrow_forward_ios),
|
||||
);
|
||||
},
|
||||
separatorBuilder: (BuildContext context, int index) =>
|
||||
SizedBox(height: 10),
|
||||
itemCount: 6,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
body: Center(
|
||||
child: ListView(
|
||||
children: [
|
||||
Image.asset(
|
||||
"assets/graphics/bg-carrier-cylinder-duo.png",
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
|
||||
Padding(padding: const EdgeInsets.only(top: 25), child: Text(
|
||||
"Wählen Sie Ihre Tour aus:",
|
||||
style: Theme.of(context).textTheme.titleLarge,
|
||||
textAlign: TextAlign.center,
|
||||
),),
|
||||
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(15),
|
||||
child: SizedBox(
|
||||
width: double.infinity,
|
||||
child: Card(
|
||||
color: Theme.of(context).colorScheme.surfaceContainerHighest,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(20),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 10),
|
||||
child: Icon(Icons.tour),
|
||||
),
|
||||
Text(
|
||||
"Touren",
|
||||
style: Theme.of(context).textTheme.titleMedium,
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 10),
|
||||
child: Icon(Icons.calendar_month),
|
||||
),
|
||||
Text(
|
||||
"01.02.2026",
|
||||
style: Theme.of(context).textTheme.labelLarge,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 15),
|
||||
child: _listTour(),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user