Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
add imports in samples
  • Loading branch information
Denis Andrašec authored and Denis Andrašec committed Jan 17, 2022
commit a749a79806df3053a154403def200c5e44c5fa8a
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ Supported in Sentry's Dart SDK version `6.3.0-beta.1` and above.
Automatic routing instrumentation can be enabled by adding an instance of `SentryNavigationObserver` to your application's `navigatorObservers`. Transactions are started automatically when routing to new pages in your application.

```dart
import 'package:flutter/material.dart';
import 'package:sentry_flutter/sentry_flutter.dart';

return MaterialApp(
title: 'Home',
home: HomeScreen(),
Expand All @@ -47,6 +50,8 @@ return MaterialApp(
The main route of your application will have the name `root "/"`. In order for transactions to be created automatically when navigation changes, you need to provide route names through your routes setttings parameter.

```dart
import 'package:flutter/material.dart';

MaterialPageRoute(
builder: (BuildContext context) => Settings(),
settings: RouteSettings(name: 'Settings'),
Expand Down