@@ -3,58 +3,53 @@ import 'dart:io';
33import 'package:flutter/material.dart' ;
44
55import 'package:instabug_flutter/instabug_flutter.dart' ;
6+ import '../models/attachment_type.dart' ;
67
78class 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,
1314 };
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) {
1617 _extraAttachments = attachments;
1718 notifyListeners ();
1819 }
1920
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;
2525 notifyListeners ();
2626 }
2727
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;
3532 notifyListeners ();
3633 }
3734
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;
4239 notifyListeners ();
4340 }
4441
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;
5046 notifyListeners ();
5147 }
5248
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;
5853 notifyListeners ();
5954 }
6055
0 commit comments