Skip to content

Commit bb04c3d

Browse files
uemanmarandanetobruno-garcia
authored
Improve Flutter example readme (#425)
* Improve readme * Update flutter/example/README.md Co-authored-by: Manoel Aranda Neto <[email protected]> * Update flutter/example/README.md Co-authored-by: Bruno Garcia <[email protected]> Co-authored-by: Manoel Aranda Neto <[email protected]> Co-authored-by: Bruno Garcia <[email protected]>
1 parent a6fb132 commit bb04c3d

File tree

3 files changed

+34
-10
lines changed

3 files changed

+34
-10
lines changed

flutter/example/README.md

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,40 @@
1-
# sentry_flutter_example
1+
<p align="center">
2+
<a href="https://sentry.io" target="_blank" align="center">
3+
<img src="https://sentry-brand.storage.googleapis.com/sentry-logo-black.png" width="280">
4+
</a>
5+
<br/>
6+
</p>
27

3-
Demonstrates how to use the sentry_flutter plugin.
8+
Sentry Example for Flutter
9+
===========
410

5-
## Getting Started
11+
This is a Flutter app that crashes intentionally in various ways. It demonstrates
12+
how to capture errors and report them to [sentry.io](https://sentry.io/).
613

7-
This project is a starting point for a Flutter application.
14+
# Running this sample
815

9-
A few resources to get you started if this is your first Flutter project:
16+
> First modify the `main.dart` and add your own DSN. You can get one at
17+
> [sentry.io](https://sentry.io/). This will make sure you can see the result of
18+
> running this app by looking at what this creates in Sentry.
1019
11-
- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
12-
- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
20+
You need to install [Flutter](https://flutter.dev/docs/get-started/install) in
21+
order to run this sample. Once you have Flutter installed you can run it via
22+
`flutter run`.
1323

14-
For help getting started with Flutter, view our
15-
[online documentation](https://flutter.dev/docs), which offers tutorials,
16-
samples, guidance on mobile development, and a full API reference.
24+
You should see something like this:
25+
26+
<img src="img/ios_simulator.png" />
27+
28+
If you click in order on `Open another scaffold`, `Dart: web request` and
29+
`Dart: try catch`, you should see the following image on
30+
[sentry.io](https://sentry.io/).
31+
32+
Note the event shows only the application frames by default. You can click
33+
on the `Full` button to see the complete stack trace. There's also a list of breadcrumbs for
34+
that exception. In order to get HTTP and navigational breadcrumbs you need to
35+
use
36+
[`SentryHttpClient`](https://docs.sentry.io/platforms/dart/usage/advanced-usage/#automatic-breadcrumbs)
37+
and the
38+
[`SentryNavigatorObserver`](https://docs.sentry.io/platforms/flutter/enriching-events/breadcrumbs/#automatic-breadcrumbs).
39+
40+
<img src="img/sentry_dashboard.png" />

flutter/example/img/ios_simulator.png

221 KB
Loading
671 KB
Loading

0 commit comments

Comments
 (0)