feat: Enable users to upload attire photos via camera or gallery.
This commit is contained in:
@@ -12,6 +12,7 @@ import 'package:staff_authentication/staff_authentication.dart'
|
||||
import 'package:staff_main/staff_main.dart' as staff_main;
|
||||
import 'package:krow_core/core.dart';
|
||||
|
||||
import 'package:image_picker/image_picker.dart';
|
||||
import 'src/widgets/session_listener.dart';
|
||||
|
||||
void main() async {
|
||||
@@ -26,7 +27,10 @@ void main() async {
|
||||
|
||||
// Initialize session listener for Firebase Auth state changes
|
||||
DataConnectService.instance.initializeAuthListener(
|
||||
allowedRoles: <String>['STAFF', 'BOTH'], // Only allow users with STAFF or BOTH roles
|
||||
allowedRoles: <String>[
|
||||
'STAFF',
|
||||
'BOTH',
|
||||
], // Only allow users with STAFF or BOTH roles
|
||||
);
|
||||
|
||||
runApp(
|
||||
@@ -40,11 +44,22 @@ void main() async {
|
||||
/// The main application module.
|
||||
class AppModule extends Module {
|
||||
@override
|
||||
List<Module> get imports =>
|
||||
<Module>[
|
||||
core_localization.LocalizationModule(),
|
||||
staff_authentication.StaffAuthenticationModule(),
|
||||
];
|
||||
void binds(Injector i) {
|
||||
i.addLazySingleton<ImagePicker>(ImagePicker.new);
|
||||
i.addLazySingleton<CameraService>(
|
||||
() => CameraService(i.get<ImagePicker>()),
|
||||
);
|
||||
i.addLazySingleton<GalleryService>(
|
||||
() => GalleryService(i.get<ImagePicker>()),
|
||||
);
|
||||
i.addLazySingleton<FilePickerService>(FilePickerService.new);
|
||||
}
|
||||
|
||||
@override
|
||||
List<Module> get imports => <Module>[
|
||||
core_localization.LocalizationModule(),
|
||||
staff_authentication.StaffAuthenticationModule(),
|
||||
];
|
||||
|
||||
@override
|
||||
void routes(RouteManager r) {
|
||||
|
||||
Reference in New Issue
Block a user