@@ -3,58 +3,53 @@ import 'dart:io';
3
3
import 'package:flutter/material.dart' ;
4
4
5
5
import 'package:instabug_flutter/instabug_flutter.dart' ;
6
+ import '../models/attachment_type.dart' ;
6
7
7
8
class BugReportingState with ChangeNotifier {
8
- var _extraAttachments = {
9
- 'Screenshot' : true ,
10
- 'Extra Screenshot' : true ,
11
- 'Gallery Image' : true ,
12
- 'Screen Recording' : true
9
+ var _extraAttachments = < AttachmentType > {
10
+ AttachmentType .screenshot ,
11
+ AttachmentType .extraScreenshot ,
12
+ AttachmentType .galleryImage ,
13
+ AttachmentType .screenRecording,
13
14
};
14
- Map < String , bool > get extraAttachments => _extraAttachments;
15
- set extraAttachments (Map < String , bool > attachments) {
15
+ Set < AttachmentType > get extraAttachments => _extraAttachments;
16
+ set extraAttachments (Set < AttachmentType > attachments) {
16
17
_extraAttachments = attachments;
17
18
notifyListeners ();
18
19
}
19
20
20
- var _selectedInvocationOptions = < InvocationOption > {};
21
- Set <InvocationOption > get selectedInvocationOptions =>
22
- _selectedInvocationOptions;
23
- set selectedInvocationOptions (Set <InvocationOption > options) {
24
- _selectedInvocationOptions = options;
21
+ var _invocationOptions = < InvocationOption > {};
22
+ Set <InvocationOption > get invocationOptions => _invocationOptions;
23
+ set invocationOptions (Set <InvocationOption > options) {
24
+ _invocationOptions = options;
25
25
notifyListeners ();
26
26
}
27
27
28
- var _selectedInvocationEvents = < InvocationEvent > {
29
- InvocationEvent .floatingButton
30
- };
31
- Set <InvocationEvent > get selectedInvocationEvents =>
32
- _selectedInvocationEvents;
33
- set selectedInvocationEvents (Set <InvocationEvent > events) {
34
- _selectedInvocationEvents = events;
28
+ var _invocationEvents = < InvocationEvent > {InvocationEvent .floatingButton};
29
+ Set <InvocationEvent > get invocationEvents => _invocationEvents;
30
+ set invocationEvents (Set <InvocationEvent > events) {
31
+ _invocationEvents = events;
35
32
notifyListeners ();
36
33
}
37
34
38
- var _selectedExtendedMode = ExtendedBugReportMode .disabled;
39
- ExtendedBugReportMode get selectedExtendedMode => _selectedExtendedMode ;
40
- set selectedExtendedMode (ExtendedBugReportMode mode) {
41
- _selectedExtendedMode = mode;
35
+ var _extendedMode = ExtendedBugReportMode .disabled;
36
+ ExtendedBugReportMode get extendedMode => _extendedMode ;
37
+ set extendedMode (ExtendedBugReportMode mode) {
38
+ _extendedMode = mode;
42
39
notifyListeners ();
43
40
}
44
41
45
- var _selectedVideoRecordingPosition = Position .bottomRight;
46
- Position get selectedVideoRecordingPosition =>
47
- _selectedVideoRecordingPosition;
48
- set selectedVideoRecordingPosition (Position position) {
49
- _selectedVideoRecordingPosition = position;
42
+ var _videoRecordingPosition = Position .bottomRight;
43
+ Position get videoRecordingPosition => _videoRecordingPosition;
44
+ set videoRecordingPosition (Position position) {
45
+ _videoRecordingPosition = position;
50
46
notifyListeners ();
51
47
}
52
48
53
- var _selectedFloatingButtonEdge = FloatingButtonEdge .right;
54
- FloatingButtonEdge get selectedFloatingButtonEdge =>
55
- _selectedFloatingButtonEdge;
56
- set selectedFloatingButtonEdge (FloatingButtonEdge edge) {
57
- _selectedFloatingButtonEdge = edge;
49
+ var _floatingButtonEdge = FloatingButtonEdge .right;
50
+ FloatingButtonEdge get floatingButtonEdge => _floatingButtonEdge;
51
+ set floatingButtonEdge (FloatingButtonEdge edge) {
52
+ _floatingButtonEdge = edge;
58
53
notifyListeners ();
59
54
}
60
55
0 commit comments