Initial Flutter project added

This commit is contained in:
Abhishek Mali
2025-11-28 10:14:30 +05:30
commit 1df218c097
141 changed files with 5679 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import '../providers/auth_provider.dart';
import 'welcome_screen.dart';
class DashboardScreen extends StatelessWidget {
const DashboardScreen({super.key});
@override
Widget build(BuildContext context) {
final auth = Provider.of<AuthProvider>(context);
final name = auth.user?['customer_name'] ?? 'User';
return Scaffold(
appBar: AppBar(
title: const Text("Dashboard"),
actions: [
IconButton(
icon: const Icon(Icons.logout),
onPressed: () async {
await auth.logout();
Navigator.of(context).pushAndRemoveUntil(MaterialPageRoute(builder: (_) => const WelcomeScreen()), (r) => false);
},
)
],
),
body: Padding(
padding: const EdgeInsets.all(18),
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
Text("Welcome, ${name}", style: const TextStyle(fontSize: 18, fontWeight: FontWeight.w600)),
const SizedBox(height: 12),
const Text("Your dashboard will appear here. Build shipment list, tracking, create shipment screens next."),
]),
),
);
}
}