glanzlicht / Meinweimar_Saving_App

MW Rettertuete & Deals - clean

Verified secure showcase
112 Files 341 KB Public size 7 Redacted Dart · XCCONFIG · H · XML · GITIGNORE · PLIST

Project overview

Meinweimar_Saving_App is a verified code showcase with 112 visible project entries across 9 top-level modules. The primary detected language is Dart; protected files remain visible in the structure while their contents stay private.

README

meinweimar_box__nativ

A new Flutter project.

Getting Started

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter development, view the online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

lib/custom_bottom_nav.dartDart
import 'package:flutter/material.dart';
import 'constants.dart';
import 'profile_page.dart';
import 'reservations_page.dart';
import 'login_page.dart';
import 'favorites_page.dart'; // NEU: Import für die Favoriten-Seite
import 'package:shared_preferences/shared_preferences.dart';
import 'core/prefs/pref_keys.dart';
class CustomBottomNav extends StatelessWidget {
final int currentIndex;
final Function(int) onTap;
const CustomBottomNav({
super.key,
required this.currentIndex,
required this.onTap,
});
// Die Logout-Logik bleibt identisch
Future<void> _logout(BuildContext context) async {
final prefs = await SharedPreferences.getInstance();
await prefs.clear();
if (context.mounted) {
Navigator.pushAndRemoveUntil(
context,
MaterialPageRoute(builder: (context) => const LoginPage()),
(route) => false,
);
}
}
// Das Profil-Menü bleibt identisch
void _showProfileMenu(BuildContext context) {
showModalBottomSheet(
context: context,
backgroundColor: Colors.transparent,
builder: (context) => Container(
decoration: const BoxDecoration(
color: AppConstants.baseWhite,
borderRadius: BorderRadius.vertical(top: Radius.circular(20)),
),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
const SizedBox(height: 10),
Container(width: 35, height: 4, decoration: BoxDecoration(color: Colors.grey.shade300, borderRadius: BorderRadius.circular(2))),
const SizedBox(height: 20),
_menuItem(
icon: Icons.person_outline,
title: "Mein Profil",
onTap: () {
Navigator.pop(context);
Navigator.push(context, MaterialPageRoute(builder: (context) => const NativeProfilePage()));
},
),
_menuItem(
icon: Icons.receipt_long_outlined,
title: "Meine Reservierungen",
onTap: () {
Navigator.pop(context);
Navigator.push(context, MaterialPageRoute(builder: (context) => const ReservationsPage()));
},
),
const Divider(),
_menuItem(
icon: Icons.logout,
title: "Abmelden",
color: AppConstants.mainColor,
onTap: () {
Navigator.pop(context);
_logout(context);
},
),
const SizedBox(height: 30),
],
),
),
);
}
Widget _menuItem({required IconData icon, required String title, required VoidCallback onTap, Color color = AppConstants.fontGrey}) {
return ListTile(
leading: Icon(icon, color: color),
title: Text(title, style: TextStyle(color: color, fontWeight: FontWeight.w600, fontSize: 16)),
trailing: const Icon(Icons.arrow_forward_ios, size: 14, color: Colors.grey),
onTap: onTap,
);
}
@override
Widget build(BuildContext context) {
return BottomNavigationBar(
currentIndex: currentIndex,
selectedItemColor: AppConstants.mainColor,
unselectedItemColor: Colors.grey.shade400,
backgroundColor: AppConstants.baseWhite,
elevation: 10,
type: BottomNavigationBarType.fixed,
onTap: (index) async {
if (index == 3) {
// NEU: Navigation zur Favoriten-Seite
Navigator.push(
context,
MaterialPageRoute(builder: (context) => const FavoritesPage()),
);
} else if (index == 4) {
final prefs = await SharedPreferences.getInstance();
final token = prefs.getString(PrefKeys.jwtToken);
if (context.mounted) {
if (token != null && token.isNotEmpty) {
_showProfileMenu(context);
} else {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => const LoginPage())
);
}
}
} else {
onTap(index);
}
},
items: const [
BottomNavigationBarItem(
icon: Icon(Icons.shopping_bag_outlined),
activeIcon: Icon(Icons.shopping_bag),
label: 'Shop',
),
BottomNavigationBarItem(
icon: Icon(Icons.search_outlined),
activeIcon: Icon(Icons.search),
label: 'Karte',
),
BottomNavigationBarItem(
icon: Icon(Icons.local_offer_outlined),
activeIcon: Icon(Icons.local_offer),
label: 'Gutscheine',
),
BottomNavigationBarItem(
icon: Icon(Icons.favorite_outlined),
activeIcon: Icon(Icons.favorite),
label: 'Favoriten',
),
BottomNavigationBarItem(
icon: Icon(Icons.person_outline),
activeIcon: Icon(Icons.person),
label: 'Profil',
),
],
);
}
}

Architecture

High-level modules detected from the verified public snapshot. Protected implementation details are intentionally omitted.

macosmodule
iosmodule
libmodule
windowsmodule
androidmodule
linuxmodule
webmodule
testmodule

Technology stack

DartPBXPROJLOCKXIBTXTCPPFlutter / Dart
Dart39.9%
PBXPROJ16.4%
LOCK7.1%
XIB6.8%
TXT5.2%
CPP3.9%
JSON2.9%
XCSCHEME2.2%