Added first draft of login and tour select page
This commit is contained in:
14
lib/bloc/tour_select/bloc.dart
Normal file
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
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
3
lib/bloc/tour_select/state.dart
Normal file
@ -0,0 +1,3 @@
|
||||
abstract class TourSelectState {}
|
||||
|
||||
class TourSelectInitial extends TourSelectState {}
|
||||
113
lib/main.dart
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';
|
||||
|
||||
void main() {
|
||||
@ -12,111 +14,10 @@ class MyApp extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
title: 'Flutter Demo',
|
||||
theme: ThemeData(
|
||||
// This is the theme of your application.
|
||||
//
|
||||
// TRY THIS: Try running your application with "flutter run". You'll see
|
||||
// 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'),
|
||||
theme: AppTheme.light(),
|
||||
darkTheme: AppTheme.dark(),
|
||||
themeMode: ThemeMode.light, // oder ThemeMode.dark / light
|
||||
home: const LoginPage(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
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
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
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
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
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
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
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
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
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
0
lib/repository/tour_detail_repository.dart
Normal file
1
lib/repository/tour_select_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/erp_service.dart
Normal file
0
lib/service/login_service.dart
Normal file
0
lib/service/login_service.dart
Normal file
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(),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
27
lib/ui/theme/font.dart
Normal file
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
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
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"));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user