-
Notifications
You must be signed in to change notification settings - Fork 0
/
Analyze_Today_v2.dart
49 lines (41 loc) · 1.02 KB
/
Analyze_Today_v2.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import 'dart:typed_data';
import 'ML_service.dart';
import 'Main_Screens.dart';
import 'package:date_format/date_format.dart';
import 'package:flutter/material.dart';
class AnalysisToday extends StatefulWidget {
const AnalysisToday({Key? key}) : super(key: key);
@override
State<AnalysisToday> createState() => _AnalysisTodayState();
}
class _AnalysisTodayState extends State<AnalysisToday> {
MLService _mlService = MLService();
@override
Widget build(BuildContext context) {
return Container();
}
}
void selectImage() async {
setState(() {
defaultImage = '';
cartoonImage = '';
});
String imageData = 'a';
if (imageData != '') {
setState(() {
defaultImage = imageData;
});
var cartoonImageData = await _mlService.analyzeSentiment(imageData);
setState(() {
if (cartoonImageData == '') {
cartoonImage = '';
} else {
cartoonImage = cartoonImageData;
}
});
} else {
setState(() {
defaultImage = '';
cartoonImage = '';
});
}