Added first draft of login and tour select page
6
.idea/App-Gaslieferung.iml
generated
@ -2,7 +2,11 @@
|
|||||||
<module type="JAVA_MODULE" version="4">
|
<module type="JAVA_MODULE" version="4">
|
||||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
<exclude-output />
|
<exclude-output />
|
||||||
<content url="file://$MODULE_DIR$" />
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/.dart_tool" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/.pub" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/build" />
|
||||||
|
</content>
|
||||||
<orderEntry type="inheritedJdk" />
|
<orderEntry type="inheritedJdk" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
<orderEntry type="library" name="Dart SDK" level="project" />
|
<orderEntry type="library" name="Dart SDK" level="project" />
|
||||||
|
|||||||
8
.idea/libraries/Dart_Packages.xml
generated
@ -9,6 +9,13 @@
|
|||||||
</list>
|
</list>
|
||||||
</value>
|
</value>
|
||||||
</entry>
|
</entry>
|
||||||
|
<entry key="bloc">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/bloc-9.2.0/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
<entry key="boolean_selector">
|
<entry key="boolean_selector">
|
||||||
<value>
|
<value>
|
||||||
<list>
|
<list>
|
||||||
@ -195,6 +202,7 @@
|
|||||||
</properties>
|
</properties>
|
||||||
<CLASSES>
|
<CLASSES>
|
||||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/async-2.13.0/lib" />
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/async-2.13.0/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/bloc-9.2.0/lib" />
|
||||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/boolean_selector-2.1.2/lib" />
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/boolean_selector-2.1.2/lib" />
|
||||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/characters-1.4.0/lib" />
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/characters-1.4.0/lib" />
|
||||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/clock-1.1.2/lib" />
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/clock-1.1.2/lib" />
|
||||||
|
|||||||
10
.idea/material_theme_project_new.xml
generated
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="MaterialThemeProjectNewConfig">
|
||||||
|
<option name="metadata">
|
||||||
|
<MTProjectMetadataState>
|
||||||
|
<option name="userId" value="61c21d43:19c18f07a9d:-7fff" />
|
||||||
|
</MTProjectMetadataState>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
BIN
assets/fonts/Inter-Italic-VariableFont_opsz,wght.ttf
Normal file
BIN
assets/fonts/Inter-VariableFont_opsz,wght.ttf
Normal file
BIN
assets/graphics/bg-carrier-cylinder-duo.png
Normal file
|
After Width: | Height: | Size: 1.1 MiB |
BIN
assets/graphics/bg-supplier-clouds-white-bg.png
Normal file
|
After Width: | Height: | Size: 304 KiB |
BIN
assets/graphics/bg-supplier-clouds.png
Normal file
|
After Width: | Height: | Size: 460 KiB |
BIN
assets/graphics/gas-carrier.png
Normal file
|
After Width: | Height: | Size: 159 KiB |
BIN
assets/graphics/gas-tank-group.png
Normal file
|
After Width: | Height: | Size: 276 KiB |
BIN
assets/graphics/gas-tank.png
Normal file
|
After Width: | Height: | Size: 90 KiB |
BIN
assets/graphics/location-pin-cloud.png
Normal file
|
After Width: | Height: | Size: 2.0 MiB |
BIN
assets/graphics/supplier.png
Normal file
|
After Width: | Height: | Size: 289 KiB |
14
lib/bloc/tour_select/bloc.dart
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
import 'package:app_gaslieferung/repository/tour_select_repository.dart';
|
||||||
|
import 'package:bloc/bloc.dart';
|
||||||
|
import 'event.dart';
|
||||||
|
import 'state.dart';
|
||||||
|
|
||||||
|
class TourSelectBloc extends Bloc<TourSelectEvent, TourSelectState> {
|
||||||
|
TourSelectRepository repository;
|
||||||
|
|
||||||
|
TourSelectBloc({required this.repository}) : super(TourSelectInitial()) {
|
||||||
|
on<TourSelectEvent>((event, emit) {
|
||||||
|
// TODO: handle event
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
5
lib/bloc/tour_select/event.dart
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
abstract class TourSelectEvent {}
|
||||||
|
|
||||||
|
class TourSelectLoadingEvent extends TourSelectEvent {}
|
||||||
|
class TourSelectLoadedEvent extends TourSelectEvent {}
|
||||||
|
class TourSelectErrorEvent extends TourSelectEvent {}
|
||||||
3
lib/bloc/tour_select/state.dart
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
abstract class TourSelectState {}
|
||||||
|
|
||||||
|
class TourSelectInitial extends TourSelectState {}
|
||||||
113
lib/main.dart
@ -1,3 +1,5 @@
|
|||||||
|
import 'package:app_gaslieferung/ui/page/login.dart';
|
||||||
|
import 'package:app_gaslieferung/ui/theme/theme.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
@ -12,111 +14,10 @@ class MyApp extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MaterialApp(
|
return MaterialApp(
|
||||||
title: 'Flutter Demo',
|
title: 'Flutter Demo',
|
||||||
theme: ThemeData(
|
theme: AppTheme.light(),
|
||||||
// This is the theme of your application.
|
darkTheme: AppTheme.dark(),
|
||||||
//
|
themeMode: ThemeMode.light, // oder ThemeMode.dark / light
|
||||||
// TRY THIS: Try running your application with "flutter run". You'll see
|
home: const LoginPage(),
|
||||||
// the application has a purple toolbar. Then, without quitting the app,
|
|
||||||
// try changing the seedColor in the colorScheme below to Colors.green
|
|
||||||
// and then invoke "hot reload" (save your changes or press the "hot
|
|
||||||
// reload" button in a Flutter-supported IDE, or press "r" if you used
|
|
||||||
// the command line to start the app).
|
|
||||||
//
|
|
||||||
// Notice that the counter didn't reset back to zero; the application
|
|
||||||
// state is not lost during the reload. To reset the state, use hot
|
|
||||||
// restart instead.
|
|
||||||
//
|
|
||||||
// This works for code too, not just values: Most code changes can be
|
|
||||||
// tested with just a hot reload.
|
|
||||||
colorScheme: .fromSeed(seedColor: Colors.deepPurple),
|
|
||||||
),
|
|
||||||
home: const MyHomePage(title: 'Flutter Demo Home Page'),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class MyHomePage extends StatefulWidget {
|
|
||||||
const MyHomePage({super.key, required this.title});
|
|
||||||
|
|
||||||
// This widget is the home page of your application. It is stateful, meaning
|
|
||||||
// that it has a State object (defined below) that contains fields that affect
|
|
||||||
// how it looks.
|
|
||||||
|
|
||||||
// This class is the configuration for the state. It holds the values (in this
|
|
||||||
// case the title) provided by the parent (in this case the App widget) and
|
|
||||||
// used by the build method of the State. Fields in a Widget subclass are
|
|
||||||
// always marked "final".
|
|
||||||
|
|
||||||
final String title;
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<MyHomePage> createState() => _MyHomePageState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _MyHomePageState extends State<MyHomePage> {
|
|
||||||
int _counter = 0;
|
|
||||||
|
|
||||||
void _incrementCounter() {
|
|
||||||
setState(() {
|
|
||||||
// This call to setState tells the Flutter framework that something has
|
|
||||||
// changed in this State, which causes it to rerun the build method below
|
|
||||||
// so that the display can reflect the updated values. If we changed
|
|
||||||
// _counter without calling setState(), then the build method would not be
|
|
||||||
// called again, and so nothing would appear to happen.
|
|
||||||
_counter++;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
// This method is rerun every time setState is called, for instance as done
|
|
||||||
// by the _incrementCounter method above.
|
|
||||||
//
|
|
||||||
// The Flutter framework has been optimized to make rerunning build methods
|
|
||||||
// fast, so that you can just rebuild anything that needs updating rather
|
|
||||||
// than having to individually change instances of widgets.
|
|
||||||
return Scaffold(
|
|
||||||
appBar: AppBar(
|
|
||||||
// TRY THIS: Try changing the color here to a specific color (to
|
|
||||||
// Colors.amber, perhaps?) and trigger a hot reload to see the AppBar
|
|
||||||
// change color while the other colors stay the same.
|
|
||||||
backgroundColor: Theme.of(context).colorScheme.inversePrimary,
|
|
||||||
// Here we take the value from the MyHomePage object that was created by
|
|
||||||
// the App.build method, and use it to set our appbar title.
|
|
||||||
title: Text(widget.title),
|
|
||||||
),
|
|
||||||
body: Center(
|
|
||||||
// Center is a layout widget. It takes a single child and positions it
|
|
||||||
// in the middle of the parent.
|
|
||||||
child: Column(
|
|
||||||
// Column is also a layout widget. It takes a list of children and
|
|
||||||
// arranges them vertically. By default, it sizes itself to fit its
|
|
||||||
// children horizontally, and tries to be as tall as its parent.
|
|
||||||
//
|
|
||||||
// Column has various properties to control how it sizes itself and
|
|
||||||
// how it positions its children. Here we use mainAxisAlignment to
|
|
||||||
// center the children vertically; the main axis here is the vertical
|
|
||||||
// axis because Columns are vertical (the cross axis would be
|
|
||||||
// horizontal).
|
|
||||||
//
|
|
||||||
// TRY THIS: Invoke "debug painting" (choose the "Toggle Debug Paint"
|
|
||||||
// action in the IDE, or press "p" in the console), to see the
|
|
||||||
// wireframe for each widget.
|
|
||||||
mainAxisAlignment: .center,
|
|
||||||
children: [
|
|
||||||
const Text('You have pushed the button this many times:'),
|
|
||||||
Text(
|
|
||||||
'$_counter',
|
|
||||||
style: Theme.of(context).textTheme.headlineMedium,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
floatingActionButton: FloatingActionButton(
|
|
||||||
onPressed: _incrementCounter,
|
|
||||||
tooltip: 'Increment',
|
|
||||||
child: const Icon(Icons.add),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
15
lib/model/address.dart
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
class Address {
|
||||||
|
String street;
|
||||||
|
String housingNumber;
|
||||||
|
String postalCode;
|
||||||
|
String city;
|
||||||
|
String country;
|
||||||
|
|
||||||
|
Address({
|
||||||
|
required this.street,
|
||||||
|
required this.housingNumber,
|
||||||
|
required this.postalCode,
|
||||||
|
required this.city,
|
||||||
|
required this.country,
|
||||||
|
});
|
||||||
|
}
|
||||||
31
lib/model/article.dart
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
class Article {
|
||||||
|
String articleId;
|
||||||
|
|
||||||
|
/// The quantity of delivered gas cylinders.
|
||||||
|
double quantity;
|
||||||
|
|
||||||
|
/// The price per cylinder in euros.
|
||||||
|
double pricePerQuantity;
|
||||||
|
|
||||||
|
/// The price of the deposit in euros per cylinder.
|
||||||
|
double depositPricePerQuantity;
|
||||||
|
|
||||||
|
/// The amount of cylinders delivered.
|
||||||
|
double quantityDelivered;
|
||||||
|
|
||||||
|
/// The amount of cylinders returned by the customer.
|
||||||
|
double quantityReturned;
|
||||||
|
|
||||||
|
/// The amount of cylinders left to be deposited.
|
||||||
|
double quantityToDeposit;
|
||||||
|
|
||||||
|
Article({
|
||||||
|
required this.articleId,
|
||||||
|
required this.quantity,
|
||||||
|
required this.pricePerQuantity,
|
||||||
|
required this.depositPricePerQuantity,
|
||||||
|
required this.quantityDelivered,
|
||||||
|
required this.quantityReturned,
|
||||||
|
required this.quantityToDeposit,
|
||||||
|
});
|
||||||
|
}
|
||||||
7
lib/model/car.dart
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
class Car {
|
||||||
|
String id;
|
||||||
|
String carName;
|
||||||
|
String? driverName;
|
||||||
|
|
||||||
|
Car({required this.id, required this.carName, this.driverName});
|
||||||
|
}
|
||||||
9
lib/model/customer.dart
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import 'address.dart';
|
||||||
|
|
||||||
|
class Customer {
|
||||||
|
String name;
|
||||||
|
String id;
|
||||||
|
Address address;
|
||||||
|
|
||||||
|
Customer({required this.name, required this.address, required this.id});
|
||||||
|
}
|
||||||
19
lib/model/delivery.dart
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
import 'package:app_gaslieferung/model/receipt.dart';
|
||||||
|
|
||||||
|
enum PaymentMethod { creditCard, cash }
|
||||||
|
|
||||||
|
class Delivery {
|
||||||
|
Receipt receipt;
|
||||||
|
|
||||||
|
DateTime? deliveredAt;
|
||||||
|
DateTime? desiredDeliveryTime;
|
||||||
|
String? driverInformation;
|
||||||
|
|
||||||
|
Delivery({
|
||||||
|
required this.receipt,
|
||||||
|
|
||||||
|
this.desiredDeliveryTime,
|
||||||
|
this.driverInformation,
|
||||||
|
this.deliveredAt
|
||||||
|
});
|
||||||
|
}
|
||||||
18
lib/model/receipt.dart
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
import 'package:app_gaslieferung/model/customer.dart';
|
||||||
|
|
||||||
|
import 'article.dart';
|
||||||
|
|
||||||
|
class Receipt {
|
||||||
|
Customer customer;
|
||||||
|
List<Article> articles;
|
||||||
|
|
||||||
|
double totalGrossPrice;
|
||||||
|
double totalNetPrice;
|
||||||
|
|
||||||
|
Receipt({
|
||||||
|
required this.articles,
|
||||||
|
required this.customer,
|
||||||
|
required this.totalGrossPrice,
|
||||||
|
required this.totalNetPrice,
|
||||||
|
});
|
||||||
|
}
|
||||||
18
lib/model/supplier.dart
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
import 'package:app_gaslieferung/model/address.dart';
|
||||||
|
|
||||||
|
import 'car.dart';
|
||||||
|
|
||||||
|
class Supplier {
|
||||||
|
String id;
|
||||||
|
String name;
|
||||||
|
Address address;
|
||||||
|
String? phoneNumber;
|
||||||
|
List<Car> cars;
|
||||||
|
|
||||||
|
Supplier({
|
||||||
|
required this.id,
|
||||||
|
required this.name,
|
||||||
|
required this.cars,
|
||||||
|
required this.address,
|
||||||
|
});
|
||||||
|
}
|
||||||
10
lib/model/tour.dart
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import 'supplier.dart';
|
||||||
|
import 'delivery.dart';
|
||||||
|
|
||||||
|
class Tour {
|
||||||
|
DateTime date;
|
||||||
|
Supplier supplier;
|
||||||
|
List<Delivery> deliveries;
|
||||||
|
|
||||||
|
Tour({required this.date, required this.deliveries, required this.supplier});
|
||||||
|
}
|
||||||
0
lib/repository/tour_detail_repository.dart
Normal file
1
lib/repository/tour_select_repository.dart
Normal file
@ -0,0 +1 @@
|
|||||||
|
class TourSelectRepository {}
|
||||||
0
lib/service/erp_service.dart
Normal file
0
lib/service/login_service.dart
Normal file
0
lib/ui/page/delivery.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
@ -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
@ -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(),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
27
lib/ui/theme/font.dart
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class AppTypography {
|
||||||
|
static TextTheme interTextTheme() {
|
||||||
|
return const TextTheme(
|
||||||
|
displayLarge: TextStyle(fontFamily: 'Inter', fontSize: 57, fontWeight: FontWeight.w600, height: 64 / 57, letterSpacing: -0.25),
|
||||||
|
displayMedium: TextStyle(fontFamily: 'Inter', fontSize: 45, fontWeight: FontWeight.w600, height: 52 / 45),
|
||||||
|
displaySmall: TextStyle(fontFamily: 'Inter', fontSize: 36, fontWeight: FontWeight.w600, height: 44 / 36),
|
||||||
|
|
||||||
|
headlineLarge: TextStyle(fontFamily: 'Inter', fontSize: 32, fontWeight: FontWeight.w600, height: 40 / 32),
|
||||||
|
headlineMedium: TextStyle(fontFamily: 'Inter', fontSize: 28, fontWeight: FontWeight.w600, height: 36 / 28),
|
||||||
|
headlineSmall: TextStyle(fontFamily: 'Inter', fontSize: 24, fontWeight: FontWeight.w600, height: 32 / 24),
|
||||||
|
|
||||||
|
titleLarge: TextStyle(fontFamily: 'Inter', fontSize: 22, fontWeight: FontWeight.w600, height: 28 / 22),
|
||||||
|
titleMedium: TextStyle(fontFamily: 'Inter', fontSize: 16, fontWeight: FontWeight.w600, height: 24 / 16, letterSpacing: 0.15),
|
||||||
|
titleSmall: TextStyle(fontFamily: 'Inter', fontSize: 14, fontWeight: FontWeight.w600, height: 20 / 14, letterSpacing: 0.10),
|
||||||
|
|
||||||
|
bodyLarge: TextStyle(fontFamily: 'Inter', fontSize: 16, fontWeight: FontWeight.w400, height: 24 / 16, letterSpacing: 0.50),
|
||||||
|
bodyMedium: TextStyle(fontFamily: 'Inter', fontSize: 14, fontWeight: FontWeight.w400, height: 20 / 14, letterSpacing: 0.25),
|
||||||
|
bodySmall: TextStyle(fontFamily: 'Inter', fontSize: 12, fontWeight: FontWeight.w400, height: 16 / 12, letterSpacing: 0.40),
|
||||||
|
|
||||||
|
labelLarge: TextStyle(fontFamily: 'Inter', fontSize: 14, fontWeight: FontWeight.w600, height: 20 / 14, letterSpacing: 0.10),
|
||||||
|
labelMedium: TextStyle(fontFamily: 'Inter', fontSize: 12, fontWeight: FontWeight.w600, height: 16 / 12, letterSpacing: 0.50),
|
||||||
|
labelSmall: TextStyle(fontFamily: 'Inter', fontSize: 11, fontWeight: FontWeight.w600, height: 16 / 11, letterSpacing: 0.50),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
179
lib/ui/theme/theme.dart
Normal file
@ -0,0 +1,179 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
import 'font.dart';
|
||||||
|
|
||||||
|
/// Gaslieferung – Material 3 Theme (Light + Dark)
|
||||||
|
class AppTheme {
|
||||||
|
// ---- LIGHT COLORSCHEME (aus deiner Palette) ----
|
||||||
|
static const ColorScheme lightScheme = ColorScheme(
|
||||||
|
brightness: Brightness.light,
|
||||||
|
|
||||||
|
primary: Color(0xFFF7931E),
|
||||||
|
onPrimary: Color(0xFFFFFFFF),
|
||||||
|
primaryContainer: Color(0xFFFFD8A8),
|
||||||
|
onPrimaryContainer: Color(0xFF4A2A00),
|
||||||
|
|
||||||
|
secondary: Color(0xFF2F5DA8),
|
||||||
|
onSecondary: Color(0xFFFFFFFF),
|
||||||
|
secondaryContainer: Color(0xFFD6E3FF),
|
||||||
|
onSecondaryContainer: Color(0xFF0B1D36),
|
||||||
|
|
||||||
|
tertiary: Color(0xFF3FAE6A),
|
||||||
|
onTertiary: Color(0xFFFFFFFF),
|
||||||
|
tertiaryContainer: Color(0xFFCFF5DF),
|
||||||
|
onTertiaryContainer: Color(0xFF0F3D24),
|
||||||
|
|
||||||
|
error: Color(0xFFB3261E),
|
||||||
|
onError: Color(0xFFFFFFFF),
|
||||||
|
errorContainer: Color(0xFFF9DEDC),
|
||||||
|
onErrorContainer: Color(0xFF410E0B),
|
||||||
|
|
||||||
|
surface: Color(0xFFFFF8F2),
|
||||||
|
onSurface: Color(0xFF1F1F1F),
|
||||||
|
|
||||||
|
surfaceContainerHighest: Color(0xFFF2E6DA),
|
||||||
|
onSurfaceVariant: Color(0xFF4A4A4A),
|
||||||
|
|
||||||
|
outline: Color(0xFFC8BEB4),
|
||||||
|
outlineVariant: Color(0xFFE1D6CC),
|
||||||
|
|
||||||
|
shadow: Color(0xFF000000),
|
||||||
|
scrim: Color(0xFF000000),
|
||||||
|
|
||||||
|
inverseSurface: Color(0xFF34302D),
|
||||||
|
onInverseSurface: Color(0xFFF7F1EC),
|
||||||
|
inversePrimary: Color(0xFFFFB95C),
|
||||||
|
);
|
||||||
|
|
||||||
|
// ---- DARK COLORSCHEME (abgeleitet) ----
|
||||||
|
static const ColorScheme darkScheme = ColorScheme(
|
||||||
|
brightness: Brightness.dark,
|
||||||
|
|
||||||
|
primary: Color(0xFFFFB95C),
|
||||||
|
onPrimary: Color(0xFF3A1F00),
|
||||||
|
primaryContainer: Color(0xFF5C3A00),
|
||||||
|
onPrimaryContainer: Color(0xFFFFDDB3),
|
||||||
|
|
||||||
|
secondary: Color(0xFF9FC1FF),
|
||||||
|
onSecondary: Color(0xFF0B1D36),
|
||||||
|
secondaryContainer: Color(0xFF1E3F73),
|
||||||
|
onSecondaryContainer: Color(0xFFD6E3FF),
|
||||||
|
|
||||||
|
tertiary: Color(0xFF7ED6A3),
|
||||||
|
onTertiary: Color(0xFF00391F),
|
||||||
|
tertiaryContainer: Color(0xFF1F4D33),
|
||||||
|
onTertiaryContainer: Color(0xFFCFF5DF),
|
||||||
|
|
||||||
|
error: Color(0xFFF2B8B5),
|
||||||
|
onError: Color(0xFF601410),
|
||||||
|
errorContainer: Color(0xFF8C1D18),
|
||||||
|
onErrorContainer: Color(0xFFF9DEDC),
|
||||||
|
|
||||||
|
background: Color(0xFF121212),
|
||||||
|
onBackground: Color(0xFFE6E1DC),
|
||||||
|
|
||||||
|
surface: Color(0xFF1C1B1A),
|
||||||
|
onSurface: Color(0xFFE6E1DC),
|
||||||
|
|
||||||
|
surfaceVariant: Color(0xFF3A2F25),
|
||||||
|
onSurfaceVariant: Color(0xFFD6CFC7),
|
||||||
|
|
||||||
|
outline: Color(0xFF8F857A),
|
||||||
|
outlineVariant: Color(0xFF51463C),
|
||||||
|
|
||||||
|
shadow: Color(0xFF000000),
|
||||||
|
scrim: Color(0xFF000000),
|
||||||
|
|
||||||
|
inverseSurface: Color(0xFFE6E1DC),
|
||||||
|
onInverseSurface: Color(0xFF1C1B1A),
|
||||||
|
inversePrimary: Color(0xFFF7931E),
|
||||||
|
);
|
||||||
|
|
||||||
|
static ThemeData light() => _theme(lightScheme);
|
||||||
|
|
||||||
|
static ThemeData dark() => _theme(darkScheme);
|
||||||
|
|
||||||
|
static ThemeData _theme(ColorScheme scheme) {
|
||||||
|
return ThemeData(
|
||||||
|
useMaterial3: true,
|
||||||
|
colorScheme: scheme,
|
||||||
|
fontFamily: "Inter",
|
||||||
|
|
||||||
|
textTheme: AppTypography.interTextTheme(),
|
||||||
|
|
||||||
|
// Optional: Schrift/Shapes minimal „MD3-like“
|
||||||
|
scaffoldBackgroundColor: scheme.surface,
|
||||||
|
appBarTheme: AppBarTheme(
|
||||||
|
backgroundColor: scheme.primary,
|
||||||
|
foregroundColor: scheme.onPrimary,
|
||||||
|
elevation: 0,
|
||||||
|
),
|
||||||
|
|
||||||
|
listTileTheme: ListTileThemeData(shape:RoundedRectangleBorder(borderRadius: BorderRadius.circular(14)), iconColor: scheme.primary),
|
||||||
|
//iconTheme: IconThemeData(color: scheme.primary),
|
||||||
|
|
||||||
|
dropdownMenuTheme: DropdownMenuThemeData(
|
||||||
|
inputDecorationTheme: InputDecorationTheme(
|
||||||
|
// Falls du das Eingabefeld selbst auch abrunden willst:
|
||||||
|
border: OutlineInputBorder(borderRadius: BorderRadius.circular(14)),
|
||||||
|
),
|
||||||
|
menuStyle: MenuStyle(
|
||||||
|
shape: WidgetStateProperty.all<OutlinedBorder>(
|
||||||
|
RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(
|
||||||
|
20,
|
||||||
|
), // Hier den gewünschten Radius für das Overlay
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
// Buttons (M3)
|
||||||
|
filledButtonTheme: FilledButtonThemeData(
|
||||||
|
style: FilledButton.styleFrom(
|
||||||
|
backgroundColor: scheme.primary,
|
||||||
|
foregroundColor: scheme.onPrimary,
|
||||||
|
minimumSize: const Size.fromHeight(52),
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(14),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
elevatedButtonTheme: ElevatedButtonThemeData(
|
||||||
|
style: ElevatedButton.styleFrom(
|
||||||
|
minimumSize: const Size.fromHeight(52),
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(14),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
outlinedButtonTheme: OutlinedButtonThemeData(
|
||||||
|
style: OutlinedButton.styleFrom(
|
||||||
|
minimumSize: const Size.fromHeight(52),
|
||||||
|
foregroundColor: scheme.primary,
|
||||||
|
side: BorderSide(color: scheme.outline),
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(14),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
// Inputs
|
||||||
|
inputDecorationTheme: InputDecorationTheme(
|
||||||
|
filled: true,
|
||||||
|
fillColor: scheme.surfaceVariant,
|
||||||
|
border: OutlineInputBorder(
|
||||||
|
borderRadius: BorderRadius.circular(14),
|
||||||
|
borderSide: BorderSide.none,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
// Cards
|
||||||
|
cardTheme: CardThemeData(
|
||||||
|
color: scheme.surface,
|
||||||
|
elevation: 1,
|
||||||
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
10
lib/ui/widgets/tour/progress_card.dart
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class TourProgressCard extends StatelessWidget {
|
||||||
|
const TourProgressCard({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Card(child: const Text("TEST"));
|
||||||
|
}
|
||||||
|
}
|
||||||
16
pubspec.yaml
@ -34,6 +34,7 @@ dependencies:
|
|||||||
# The following adds the Cupertino Icons font to your application.
|
# The following adds the Cupertino Icons font to your application.
|
||||||
# Use with the CupertinoIcons class for iOS style icons.
|
# Use with the CupertinoIcons class for iOS style icons.
|
||||||
cupertino_icons: ^1.0.8
|
cupertino_icons: ^1.0.8
|
||||||
|
bloc: ^9.2.0
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
@ -58,9 +59,12 @@ flutter:
|
|||||||
uses-material-design: true
|
uses-material-design: true
|
||||||
|
|
||||||
# To add assets to your application, add an assets section, like this:
|
# To add assets to your application, add an assets section, like this:
|
||||||
# assets:
|
assets:
|
||||||
# - images/a_dot_burr.jpeg
|
- assets/graphics/bg-supplier-clouds.png
|
||||||
# - images/a_dot_ham.jpeg
|
- assets/graphics/gas-tank.png
|
||||||
|
- assets/graphics/supplier.png
|
||||||
|
- assets/graphics/location-pin-cloud.png
|
||||||
|
- assets/graphics/bg-carrier-cylinder-duo.png
|
||||||
|
|
||||||
# An image asset can refer to one or more resolution-specific "variants", see
|
# An image asset can refer to one or more resolution-specific "variants", see
|
||||||
# https://flutter.dev/to/resolution-aware-images
|
# https://flutter.dev/to/resolution-aware-images
|
||||||
@ -73,6 +77,12 @@ flutter:
|
|||||||
# "family" key with the font family name, and a "fonts" key with a
|
# "family" key with the font family name, and a "fonts" key with a
|
||||||
# list giving the asset and other descriptors for the font. For
|
# list giving the asset and other descriptors for the font. For
|
||||||
# example:
|
# example:
|
||||||
|
|
||||||
|
fonts:
|
||||||
|
- family: Inter,
|
||||||
|
fonts:
|
||||||
|
- asset: assets/fonts/Inter-VariableFont_opsz,wght.ttf
|
||||||
|
|
||||||
# fonts:
|
# fonts:
|
||||||
# - family: Schyler
|
# - family: Schyler
|
||||||
# fonts:
|
# fonts:
|
||||||
|
|||||||