Skip to content
Merged
Show file tree
Hide file tree
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
Next Next commit
Format
  • Loading branch information
buenaflor committed Nov 30, 2023
commit ba5ec4744ee2e3f302be3479b9e62325f43c1ea3
3 changes: 2 additions & 1 deletion flutter/example/lib/auto_close_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ class _AutoCloseScreenState extends State<AutoCloseScreen> {

Future<void> _doComplexOperationThenClose() async {
final activeSpan = Sentry.getSpan();
final childSpan = activeSpan?.startChild('complex operation', description: 'running a $delayInSeconds seconds operation');
final childSpan = activeSpan?.startChild('complex operation',
description: 'running a $delayInSeconds seconds operation');
await Future.delayed(const Duration(seconds: delayInSeconds));
childSpan?.finish();
Navigator.of(context).pop();
Expand Down
31 changes: 20 additions & 11 deletions flutter/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,12 @@ class MainScaffold extends StatelessWidget {
children: [
if (_isIntegrationTest) const IntegrationTestWidget(),
const Center(child: Text('Trigger an action.\n')),
const Center(
child: Text(
'Hover over a button to see more information. (long press on mobile) \n')),
const Padding(
padding: EdgeInsets.all(15), //apply padding to all four sides
child: Center(
child: Text(
'Long press a button to see more information. (hover on web)')),
),
TooltipButton(
onPressed: () => navigateToAutoCloseScreen(context),
text:
Expand Down Expand Up @@ -338,14 +341,14 @@ class MainScaffold extends StatelessWidget {
onPressed: () async => await makeWebRequestWithDio(context),
key: const Key('dio_web_request'),
text:
'Attaches web request related spans to the transaction and send it to Sentry.',
'Attaches web request related spans to the transaction and send it to Sentry.',
buttonTitle: 'Dio: Web request',
),

TooltipButton(
onPressed: () => showDialogWithTextAndImage(context),
text:
'Attaches asset bundle related spans to the transaction and send it to Sentry.',
'Attaches asset bundle related spans to the transaction and send it to Sentry.',
buttonTitle: 'Flutter: Load assets',
),
TooltipButton(
Expand All @@ -354,7 +357,8 @@ class MainScaffold extends StatelessWidget {
print('A print breadcrumb');
Sentry.captureMessage('A message with a print() Breadcrumb');
},
text: 'Sends a captureMessage to Sentry with a breadcrumb created by a print() statement.',
text:
'Sends a captureMessage to Sentry with a breadcrumb created by a print() statement.',
buttonTitle: 'Record print() as breadcrumb',
),
TooltipButton(
Expand All @@ -366,7 +370,8 @@ class MainScaffold extends StatelessWidget {
},
);
},
text: 'Sends the capture message event with additional Tag to Sentry.',
text:
'Sends the capture message event with additional Tag to Sentry.',
buttonTitle: 'Capture message with scope with additional tag',
),
TooltipButton(
Expand Down Expand Up @@ -414,7 +419,8 @@ class MainScaffold extends StatelessWidget {
// findPrimeNumber(1000000); // Uncomment to see it with profiling
await transaction.finish(status: const SpanStatus.ok());
},
text: 'Creates a custom transaction, adds child spans and send them to Sentry.',
text:
'Creates a custom transaction, adds child spans and send them to Sentry.',
buttonTitle: 'Capture transaction',
),
TooltipButton(
Expand Down Expand Up @@ -460,7 +466,8 @@ class MainScaffold extends StatelessWidget {
);
});
},
text: 'Sends the capture message with an image attachment to Sentry.',
text:
'Sends the capture message with an image attachment to Sentry.',
buttonTitle: 'Capture message with image attachment',
),
TooltipButton(
Expand All @@ -479,7 +486,8 @@ class MainScaffold extends StatelessWidget {
},
);
},
text: 'Shows a custom user feedback dialog without an ongoing event that captures and sends user feedback data to Sentry.',
text:
'Shows a custom user feedback dialog without an ongoing event that captures and sends user feedback data to Sentry.',
buttonTitle: 'Capture User Feedback',
),
TooltipButton(
Expand All @@ -499,7 +507,8 @@ class MainScaffold extends StatelessWidget {
final log = Logger('Logging');
log.info('My Logging test');
},
text: 'Demonstrates the logging integration. log.info() will create an info event send it to Sentry.',
text:
'Demonstrates the logging integration. log.info() will create an info event send it to Sentry.',
buttonTitle: 'Logging',
),
if (UniversalPlatform.isIOS || UniversalPlatform.isMacOS)
Expand Down