import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import 'package:smoke_cess_app/services/export_service.dart'; import 'package:smoke_cess_app/widgets/buttons/text_icon_button.dart'; import 'package:smoke_cess_app/widgets/scanner.dart'; import '../providers/settings_provider.dart'; class ScannerPage extends StatelessWidget { const ScannerPage({super.key}); void export() async { ExportService exportService = ExportService(); exportService.exportData(); } @override Widget build(BuildContext context) { SettingsProvider settingsProvider = context.watch(); return Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ const MyScanner(), const SizedBox(height: 30), if (!settingsProvider.scanning) TextIconButton( text: 'Export', onPressed: ExportService().exportData, iconData: Icons.upload), ], )); } }