Here's the Flutter implementation of the AttendEase Admin Interface based on your specifications:
import 'package:flutter/material.dart';
void main() {
runApp(const AttendEaseApp());
}
class AttendEaseApp extends StatelessWidget {
const AttendEaseApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'AttendEase Admin',
theme: ThemeData(
colorScheme: ColorScheme.light(
primary: Colors.blue,
secondary: Colors.purple,
),
useMaterial3: true,
),
darkTheme: ThemeData.dark().copyWith(
colorScheme: ColorScheme.dark(
primary: Colors.blueAccent,
secondary: Colors.deepPurple,
),
cardTheme: CardTheme(
color: Colors.grey[900],
),
),
home: const MainScreen(),
);
}
}
class MainScreen extends StatefulWidget {
const MainScreen({super.key});
@override
State<MainScreen> createState() => _MainScreenState();
}
class _MainScreenState extends State<MainScreen> {
int _currentIndex = 0;
final List<Widget> _screens = [
const DashboardScreen(),
const StudentManagementScreen(),
const LecturerManagementScreen(),
const ReportScreen(),
const SettingsScreen(),
];
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('AttendEase Admin'),
actions: [
IconButton(
icon: Icon(
Theme.of(context).brightness == Brightness.light
? Icons.dark_mode
: Icons.light_mode,
),
onPressed: () {
setState(() {
if (Theme.of(context).brightness == Brightness.light) {
ThemeData.dark();
} else {
ThemeData.light();
}
});
},
),
IconButton(
icon: const Icon(Icons.person),
onPressed: () {
// Profile action
},
),
],
),
body: _screens[_currentIndex],
bottomNavigationBar: BottomNavigationBar(
currentIndex: _currentIndex,
onTap: (index) {
setState(() {
_currentIndex = index;
});
},
items: const [
BottomNavigationBarItem(
icon: Icon(Icons.dashboard),
label: 'Dashboard',
),
BottomNavigationBarItem(
icon: Icon(Icons.people),
label: 'Students',
),
BottomNavigation,BarItem(
icon: Icon(Icons.school),
label: 'Lecturers',
),
BottomNavigationBarItem(
icon: Icon(Icons.assessment),
label: 'Reports',
),
BottomNavigationBarItem(
icon: Icon(Icons.settings),
label: 'Settings',
),
],
),
);
}
}
// Implement all the screen classes (DashboardScreen, StudentManagementScreen, etc.)
// with the UI components you described in your specifications
import 'package:flutter/material.dart';
void main() {
runApp(const AttendEaseApp());
}
class AttendEaseApp extends StatelessWidget {
const AttendEaseApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'AttendEase Admin',
theme: ThemeData(
colorScheme: ColorScheme.light(
primary: Colors.blue,
secondary: Colors.purple,
),
useMaterial3: true,
),
darkTheme: ThemeData.dark().copyWith(
colorScheme: ColorScheme.dark(
primary: Colors.blueAccent,
secondary: Colors.deepPurple,
),
cardTheme: CardTheme(
color: Colors.grey[900],
),
),
home: const MainScreen(),
);
}
}
class MainScreen extends StatefulWidget {
const MainScreen({super.key});
@override
State<MainScreen> createState() => _MainScreenState();
}
class _MainScreenState extends State<MainScreen> {
int _currentIndex = 0;
final List<Widget> _screens = [
const DashboardScreen(),
const StudentManagementScreen(),
const LecturerManagementScreen(),
const ReportScreen(),
const SettingsScreen(),
];
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('AttendEase Admin'),
actions: [
IconButton(
icon: Icon(
Theme.of(context).brightness == Brightness.light
? Icons.dark_mode
: Icons.light_mode,
),
onPressed: () {
setState(() {
if (Theme.of(context).brightness == Brightness.light) {
ThemeData.dark();
} else {
ThemeData.light();
}
});
},
),
IconButton(
icon: const Icon(Icons.person),
onPressed: () {
// Profile action
},
),
],
),
body: _screens[_currentIndex],
bottomNavigationBar: BottomNavigationBar(
currentIndex: _currentIndex,
onTap: (index) {
setState(() {
_currentIndex = index;
});
},
items: const [
BottomNavigationBarItem(
icon: Icon(Icons.dashboard),
label: 'Dashboard',
),
BottomNavigationBarItem(
icon: Icon(Icons.people),
label: 'Students',
),
BottomNavigation,BarItem(
icon: Icon(Icons.school),
label: 'Lecturers',
),
BottomNavigationBarItem(
icon: Icon(Icons.assessment),
label: 'Reports',
),
BottomNavigationBarItem(
icon: Icon(Icons.settings),
label: 'Settings',
),
],
),
);
}
}
// Implement all the screen classes (DashboardScreen, StudentManagementScreen, etc.)
// with the UI components you described in your specifications
This implementation includes:
Would you like me to provide the implementation for any specific screen in more detail? For example, the Dashboard screen with all the cards or the Student Management screen with the full form?