- Removed TypeScript configuration file (tsconfig.json). - Added Flutter plugin dependencies for secure storage. - Implemented main application structure with routing for login, profile, and schedule screens. - Developed LoginScreen with authentication logic and user feedback. - Created ProfileScreen to display user profile information and logout functionality. - Built ScheduleScreen to show weekly work schedule with navigation controls. - Integrated AuthService for handling authentication, token storage, and API interactions. - Updated pubspec.yaml with necessary dependencies for the Flutter project.
34 lines
862 B
Dart
34 lines
862 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:provider/provider.dart';
|
|
|
|
import 'screens/login_screen.dart';
|
|
import 'screens/profile_screen.dart';
|
|
import 'screens/schedule_screen.dart';
|
|
import 'services/auth_service.dart';
|
|
|
|
void main() {
|
|
runApp(MyApp());
|
|
}
|
|
|
|
class MyApp extends StatelessWidget {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return ChangeNotifierProvider(
|
|
create: (_) => AuthService(),
|
|
child: MaterialApp(
|
|
title: 'ISO Flutter',
|
|
theme: ThemeData.dark().copyWith(
|
|
primaryColor: Color(0xFFA24BFA),
|
|
scaffoldBackgroundColor: Color(0xFF0c0a0a),
|
|
),
|
|
initialRoute: '/',
|
|
routes: {
|
|
'/': (context) => LoginScreen(),
|
|
'/profile': (context) => ProfileScreen(),
|
|
'/schedule': (context) => ScheduleScreen(),
|
|
},
|
|
),
|
|
);
|
|
}
|
|
}
|