import 'dart:io';

import 'package:file_picker/file_picker.dart';
import 'package:flutter/material.dart';

class FinalCompletionOfDocumentsViewModel extends ChangeNotifier {
  final FilePicker _filePicker = FilePicker.platform;
  File? _selectedFile;
  File? get selectedFile => _selectedFile;

  Future<void> pickFile() async {
    final result = await _filePicker.pickFiles();
    _selectedFile = File(result?.files.single.path ?? '');
    notifyListeners();
  }
}
