diff --git a/lib/widgets/scanner.dart b/lib/widgets/scanner.dart index b1aff7d..a97e14d 100644 --- a/lib/widgets/scanner.dart +++ b/lib/widgets/scanner.dart @@ -1,8 +1,11 @@ import 'package:flutter/material.dart'; import 'package:mobile_scanner/mobile_scanner.dart'; +import 'package:provider/provider.dart'; import 'package:smoke_cess_app/models/settings.dart'; import 'package:smoke_cess_app/services/json_service.dart'; import 'package:smoke_cess_app/services/settings_service.dart'; +import '../providers/settings_provider.dart'; +import '../services/notification_service.dart'; import '../widgets/missing_config_popup.dart'; class MyScanner extends StatefulWidget { @@ -35,6 +38,9 @@ class MyScannerState extends State { Map json = stringToJSON(qrText); Settings settings = Settings.fromJson(json); saveSettings(settings); + var settingsModel = context.read(); + settingsModel.initSettings(); + NotificationService().setAllNotifications(); setState(() { scanning = false; showDialog(