forked from jhomlala/catcher
-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: updated android SDK versions, updated dependencies * feat: added very_good_analysis, fixed lints * fix: fixed screenshots not being created * fix: updated changelog, pubspec and readme * feat: updated screenshot manager * fix: fixed missing lints * refactor: general refactor * fix: updated CI config for Github Actions * fix: format
- Loading branch information
Showing
61 changed files
with
1,619 additions
and
1,314 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,16 @@ | ||
#include: package:lint/analysis_options_package.yaml | ||
|
||
analyzer: | ||
strong-mode: | ||
implicit-dynamic: false | ||
include: package:very_good_analysis/analysis_options.yaml | ||
|
||
linter: | ||
rules: | ||
close_sinks: true | ||
public_member_api_docs: false | ||
flutter_style_todos: false | ||
avoid_final_parameters: false | ||
sort_constructors_first: false | ||
avoid_classes_with_only_static_members: false | ||
avoid_void_async: false | ||
avoid_positional_boolean_parameters: false | ||
avoid_function_literals_in_foreach_calls: false | ||
prefer_constructors_over_static_methods: false | ||
sort_unnamed_constructors_first: false | ||
sized_box_for_whitespace: false | ||
invalid_dependency: false | ||
sort_pub_dependencies: false | ||
import_of_legacy_library_into_null_safe: false | ||
avoid_positional_boolean_parameters: false | ||
use_if_null_to_convert_nulls_to_bools: false | ||
use_build_context_synchronously: false | ||
use_setters_to_change_properties: false | ||
prefer_constructors_over_static_methods: false | ||
use_setters_to_change_properties: false | ||
avoid_print: false | ||
sort_pub_dependencies: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,28 +4,33 @@ import 'package:flutter/material.dart'; | |
late Catcher catcher; | ||
|
||
void main() { | ||
Map<String, dynamic> customParameters = new Map<String, dynamic>(); | ||
customParameters["First"] = "First parameter"; | ||
CatcherOptions debugOptions = CatcherOptions( | ||
PageReportMode(), | ||
[ | ||
ConsoleHandler(enableCustomParameters: true), | ||
], | ||
customParameters: customParameters); | ||
CatcherOptions releaseOptions = CatcherOptions(PageReportMode(), [ | ||
EmailManualHandler(["[email protected]"]) | ||
final customParameters = <String, dynamic>{}; | ||
customParameters['First'] = 'First parameter'; | ||
final debugOptions = CatcherOptions( | ||
PageReportMode(), | ||
[ | ||
ConsoleHandler(enableCustomParameters: true), | ||
], | ||
customParameters: customParameters, | ||
); | ||
final releaseOptions = CatcherOptions(PageReportMode(), [ | ||
EmailManualHandler(['[email protected]']), | ||
]); | ||
|
||
catcher = Catcher( | ||
rootWidget: MyApp(), | ||
rootWidget: const MyApp(), | ||
debugConfig: debugOptions, | ||
releaseConfig: releaseOptions, | ||
); | ||
} | ||
|
||
class MyApp extends StatefulWidget { | ||
const MyApp({Key? key}) : super(key: key); | ||
|
||
@override | ||
_MyAppState createState() => _MyAppState(); | ||
State<StatefulWidget> createState() { | ||
return _MyAppState(); | ||
} | ||
} | ||
|
||
class _MyAppState extends State<MyApp> { | ||
|
@@ -39,33 +44,40 @@ class _MyAppState extends State<MyApp> { | |
return MaterialApp( | ||
navigatorKey: Catcher.navigatorKey, | ||
home: Scaffold( | ||
appBar: AppBar( | ||
title: const Text('Plugin example app'), | ||
), | ||
body: ChildWidget()), | ||
appBar: AppBar( | ||
title: const Text('Plugin example app'), | ||
), | ||
body: const ChildWidget(), | ||
), | ||
); | ||
} | ||
} | ||
|
||
class ChildWidget extends StatelessWidget { | ||
const ChildWidget({Key? key}) : super(key: key); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Container( | ||
child: Column(children: [ | ||
ElevatedButton( | ||
child: Text("Change custom parameters"), | ||
onPressed: _changeCustomParameters), | ||
ElevatedButton( | ||
child: Text("Generate error"), onPressed: () => generateError()) | ||
])); | ||
return Column( | ||
children: [ | ||
ElevatedButton( | ||
onPressed: _changeCustomParameters, | ||
child: const Text('Change custom parameters'), | ||
), | ||
ElevatedButton( | ||
onPressed: generateError, | ||
child: const Text('Generate error'), | ||
), | ||
], | ||
); | ||
} | ||
|
||
void generateError() async { | ||
Future<void> generateError() async { | ||
Catcher.sendTestException(); | ||
} | ||
|
||
void _changeCustomParameters() { | ||
CatcherOptions options = catcher.getCurrentConfig()!; | ||
options.customParameters["Second"] = "Second parameter"; | ||
final options = catcher.getCurrentConfig()!; | ||
options.customParameters['Second'] = 'Second parameter'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.