mirror of
https://git.meshkee.com/applications/cssd.git
synced 2026-10-13 06:08:56 +03:30
1.7.1
This commit is contained in:
@@ -2,11 +2,13 @@ import 'dart:async';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:camera/camera.dart';
|
||||
import 'package:cssd/providers/test_results.dart';
|
||||
import 'package:file_picker/file_picker.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import '../../../providers/test_results.dart';
|
||||
|
||||
class CaptureImage extends StatefulWidget {
|
||||
@override
|
||||
_CaptureImageState createState() {
|
||||
@@ -201,7 +203,7 @@ class _CaptureImageState extends State<CaptureImage>
|
||||
// }
|
||||
// }
|
||||
|
||||
// return Row(children: toggles);
|
||||
// return Row(children: toggles);
|
||||
// }
|
||||
|
||||
String timestamp() => DateTime.now().millisecondsSinceEpoch.toString();
|
||||
@@ -247,8 +249,13 @@ class _CaptureImageState extends State<CaptureImage>
|
||||
imagePath = filePath;
|
||||
var profileProviderObject =
|
||||
Provider.of<TestResultsProvider>(context, listen: false);
|
||||
List<File> files = profileProviderObject.catchImages;
|
||||
files.add(File(imagePath));
|
||||
List<PlatformFile> files = profileProviderObject.catchImages;
|
||||
print(imagePath);
|
||||
files.add(PlatformFile(
|
||||
name: 'test',
|
||||
size: 0,
|
||||
path: imagePath,
|
||||
bytes: File(imagePath).readAsBytesSync()));
|
||||
profileProviderObject.setCatchImages(files);
|
||||
profileProviderObject.setImages();
|
||||
print(imagePath);
|
||||
|
||||
Reference in New Issue
Block a user