File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import 'dart:convert';
5
5
6
6
import 'package:flutter/material.dart' ;
7
7
import 'package:instabug_flutter/instabug_flutter.dart' ;
8
+ import 'package:instabug_flutter/src/utils/instabug_widget.dart' ;
8
9
import 'package:instabug_flutter_example/src/components/apm_switch.dart' ;
9
10
import 'package:instabug_http_client/instabug_http_client.dart' ;
10
11
import 'package:instabug_flutter_example/src/app_routes.dart' ;
@@ -43,24 +44,19 @@ part 'src/components/traces_content.dart';
43
44
part 'src/components/flows_content.dart' ;
44
45
45
46
void main () {
46
- runZonedGuarded (
47
- () {
48
- WidgetsFlutterBinding .ensureInitialized ();
47
+ WidgetsFlutterBinding .ensureInitialized ();
49
48
50
49
Instabug .init (
51
50
token: 'ed6f659591566da19b67857e1b9d40ab' ,
52
51
invocationEvents: [InvocationEvent .floatingButton],
53
52
debugLogsLevel: LogLevel .verbose,
54
53
);
55
54
56
- FlutterError .onError = (FlutterErrorDetails details) {
57
- Zone .current.handleUncaughtError (details.exception, details.stack! );
58
- };
59
-
60
- runApp (const MyApp ());
61
- },
62
- CrashReporting .reportCrash,
55
+ final app = InstabugWidget (
56
+ child: const MyApp (),
63
57
);
58
+
59
+ runApp (app);
64
60
}
65
61
66
62
class MyApp extends StatelessWidget {
You can’t perform that action at this time.
0 commit comments