sentry_flutter 9.9.1
sentry_flutter: ^9.9.1 copied to clipboard
Sentry SDK for Flutter. This package aims to support different Flutter targets by relying on the many platforms supported by Sentry with native SDKs.
// ignore_for_file: library_private_types_in_public_api
import 'dart:async';
import 'dart:convert';
import 'package:dio/dio.dart';
import 'package:drift/drift.dart' show ApplyInterceptor;
import 'package:feedback/feedback.dart' as feedback;
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:logging/logging.dart';
import 'package:path_provider/path_provider.dart';
import 'package:provider/provider.dart';
import 'package:sentry_dio/sentry_dio.dart';
import 'package:sentry_drift/sentry_drift.dart';
import 'package:sentry_flutter/sentry_flutter.dart';
import 'package:sentry_hive/sentry_hive.dart';
import 'package:sentry_isar/sentry_isar.dart';
import 'package:sentry_logging/sentry_logging.dart';
import 'package:sentry_sqflite/sentry_sqflite.dart';
import 'package:sqflite/sqflite.dart';
// import 'package:sqflite_common_ffi/sqflite_ffi.dart';
// import 'package:sqflite_common_ffi_web/sqflite_ffi_web.dart';
import 'package:universal_platform/universal_platform.dart';
import 'auto_close_screen.dart';
import 'drift/connection/connection.dart';
import 'drift/database.dart';
import 'isar/user.dart';
// ATTENTION: Change the DSN below with your own to see the events in Sentry. Get one at sentry.io
const String exampleDsn =
'https://[email protected]/5428562';
/// This is an exampleUrl that will be used to demonstrate how http requests are captured.
const String exampleUrl = 'https://jsonplaceholder.typicode.com/todos/';
const _channel = MethodChannel('example.flutter.sentry.io');
var _isIntegrationTest = false;
final GlobalKey<NavigatorState> navigatorKey = GlobalKey<NavigatorState>();
Future<void> main() async {
await setupSentry(
() => runApp(
SentryWidget(
child: DefaultAssetBundle(
bundle: SentryAssetBundle(),
child: const MyApp(),
),
),
),
exampleDsn,
);
}
Future<void> setupSentryWithCustomInit(
AppRunner appRunner, OptionsConfiguration optionsConfiguration) async {
return SentryFlutter.init(optionsConfiguration, appRunner: appRunner);
}
Future<void> setupSentry(
AppRunner appRunner,
String dsn, {
bool isIntegrationTest = false,
BeforeSendCallback? beforeSendCallback,
}) async {
await SentryFlutter.init(
(options) {
options.dsn = exampleDsn;
options.tracesSampleRate = 1.0;
options.profilesSampleRate = 1.0;
options.reportPackages = false;
options.addInAppInclude('sentry_flutter_example');
options.considerInAppFramesByDefault = false;
options.attachThreads = true;
options.enableWindowMetricBreadcrumbs = true;
options.addIntegration(LoggingIntegration(minEventLevel: Level.INFO));
options.sendDefaultPii = true;
options.reportSilentFlutterErrors = true;
options.attachScreenshot = true;
options.attachViewHierarchy = true;
// We can enable Sentry debug logging during development. This is likely
// going to log too much for your app, but can be useful when figuring out
// configuration issues, e.g. finding out why your events are not uploaded.
options.diagnosticLevel = SentryLevel.debug;
options.debug = kDebugMode;
options.spotlight = Spotlight(enabled: true);
options.enableTimeToFullDisplayTracing = true;
options.maxRequestBodySize = MaxRequestBodySize.always;
options.navigatorKey = navigatorKey;
options.replay.sessionSampleRate = 1.0;
options.replay.onErrorSampleRate = 1.0;
options.enableLogs = true;
_isIntegrationTest = isIntegrationTest;
if (_isIntegrationTest) {
options.dist = '1';
options.environment = 'integration';
options.beforeSend = beforeSendCallback;
}
},
// Init your App.
appRunner: appRunner,
);
}
class MyApp extends StatefulWidget {
const MyApp({super.key});
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
void initState() {
super.initState();
final rootDisplay = SentryFlutter.currentDisplay();
Future.delayed(const Duration(seconds: 3), () {
// Do some long running work...
rootDisplay?.reportFullyDisplayed();
});
}
@override
Widget build(BuildContext context) {
return feedback.BetterFeedback(
child: ChangeNotifierProvider<ThemeProvider>(
create: (_) => ThemeProvider(),
child: Builder(
builder: (context) => MaterialApp(
navigatorKey: navigatorKey,
navigatorObservers: [
SentryNavigatorObserver(),
],
theme: Provider.of<ThemeProvider>(context).theme,
home: const MainScaffold(),
),
),
),
);
}
}
class TooltipButton extends StatelessWidget {
final String text;
final String buttonTitle;
final void Function()? onPressed;
const TooltipButton({
required this.onPressed,
required this.buttonTitle,
required this.text,
super.key,
});
@override
Widget build(BuildContext context) {
return Tooltip(
message: text,
child: ElevatedButton(
onPressed: onPressed,
key: key,
child: Text(buttonTitle),
),
);
}
}
class MainScaffold extends StatelessWidget {
const MainScaffold({
super.key,
});
@override
Widget build(BuildContext context) {
final themeProvider = Provider.of<ThemeProvider>(context);
var icon = Icons.light_mode;
var theme = ThemeData.light();
if (themeProvider.theme.brightness == Brightness.light) {
icon = Icons.dark_mode;
theme = ThemeData.dark();
}
return Scaffold(
appBar: AppBar(
title: const Text('Sentry Flutter Example'),
actions: [
IconButton(
onPressed: () {
themeProvider.theme = theme;
},
icon: Icon(icon),
),
IconButton(
onPressed: () {
themeProvider.updatePrimaryColor(Colors.orange);
},
icon: const Icon(Icons.circle, color: Colors.orange),
),
IconButton(
onPressed: () {
themeProvider.updatePrimaryColor(Colors.green);
},
icon: const Icon(Icons.circle, color: Colors.lime),
),
],
),
body: SingleChildScrollView(
child: Column(
children: [
RichText(
text: const TextSpan(
text: '(I am) Rich Text',
style: TextStyle(
color: Colors.black,
fontSize: 16,
),
),
),
if (_isIntegrationTest) const IntegrationTestWidget(),
const Center(child: Text('Trigger an action.\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:
'Pushes a screen and creates a transaction named \'AutoCloseScreen\' with a child span that finishes after 3 seconds. \nAfter the screen has popped the transaction can then be seen on the performance page.',
buttonTitle: 'Route Navigation Observer',
),
if (!UniversalPlatform.isWeb)
TooltipButton(
onPressed: driftTest,
text:
'Executes CRUD operations on an in-memory with Drift and sends the created transaction to Sentry.',
buttonTitle: 'drift',
),
if (!UniversalPlatform.isWeb)
TooltipButton(
onPressed: hiveTest,
text:
'Executes CRUD operations on an in-memory with Hive and sends the created transaction to Sentry.',
buttonTitle: 'hive',
),
if (!UniversalPlatform.isWeb)
TooltipButton(
onPressed: isarTest,
text:
'Executes CRUD operations on an in-memory with Isar and sends the created transaction to Sentry.',
buttonTitle: 'isar',
),
TooltipButton(
onPressed: sqfliteTest,
text:
'Executes CRUD operations on an in-memory with Hive and sends the created transaction to Sentry.',
buttonTitle: 'sqflite',
),
TooltipButton(
onPressed: () => SecondaryScaffold.openSecondaryScaffold(context),
text:
'Demonstrates how the router integration adds a navigation event to the breadcrumbs that can be seen when throwing an exception for example.',
buttonTitle: 'Open another Scaffold',
),
const TooltipButton(
onPressed: tryCatch,
key: Key('dart_try_catch'),
text: 'Creates a caught exception and sends it to Sentry.',
buttonTitle: 'Dart: try catch',
),
TooltipButton(
onPressed: () => Scaffold.of(context)
.showBottomSheet((context) => const Text('Scaffold error')),
text:
'Creates an uncaught exception and sends it to Sentry. This demonstrates how our flutter error integration catches unhandled exceptions.',
buttonTitle: 'Flutter error : Scaffold.of()',
),
TooltipButton(
// Warning : not captured if a debugger is attached
// https://github.com/flutter/flutter/issues/48972
onPressed: () => throw Exception('Throws onPressed'),
text:
'Creates an uncaught exception and sends it to Sentry. This demonstrates how our flutter error integration catches unhandled exceptions.',
buttonTitle: 'Dart: throw onPressed',
),
TooltipButton(
// Warning : not captured if a debugger is attached
// https://github.com/flutter/flutter/issues/48972
onPressed: () {
assert(false, 'assert failure');
},
text:
'Creates an uncaught exception and sends it to Sentry. This demonstrates how our flutter error integration catches unhandled exceptions.',
buttonTitle: 'Dart: assert',
),
// Calling the SDK with an appRunner will handle errors from Futures
// in SDKs runZonedGuarded onError handler
TooltipButton(
onPressed: () async => asyncThrows(),
text:
'Creates an async uncaught exception and sends it to Sentry. This demonstrates how our flutter error integration catches unhandled exceptions.',
buttonTitle: 'Dart: async throws',
),
TooltipButton(
onPressed: () async => {
await Future.microtask(
() => throw StateError('Failure in a microtask'),
)
},
text:
'Creates an uncaught exception in a microtask and sends it to Sentry. This demonstrates how our flutter error integration catches unhandled exceptions.',
buttonTitle: 'Dart: Fail in microtask',
),
TooltipButton(
onPressed: () async => {
await compute(loop, 10),
},
text:
'Creates an uncaught exception in a compute isolate and sends it to Sentry. This demonstrates how our flutter error integration catches unhandled exceptions.',
buttonTitle: 'Dart: Fail in compute',
),
TooltipButton(
onPressed: () async => {
await Future.delayed(
const Duration(milliseconds: 100),
() => throw StateError('Failure in a Future.delayed'),
),
},
text:
'Creates an uncaught exception in a Future.delayed and sends it to Sentry. This demonstrates how our flutter error integration catches unhandled exceptions.',
buttonTitle: 'Throws in Future.delayed',
),
TooltipButton(
onPressed: () {
// modeled after a real exception
FlutterError.onError?.call(
FlutterErrorDetails(
exception: Exception('A really bad exception'),
silent: false,
context:
DiagnosticsNode.message('while handling a gesture'),
library: 'gesture',
informationCollector: () => [
DiagnosticsNode.message(
'Handler: "onTap" Recognizer: TapGestureRecognizer'),
DiagnosticsNode.message(
'Handler: "onTap" Recognizer: TapGestureRecognizer'),
DiagnosticsNode.message(
'Handler: "onTap" Recognizer: TapGestureRecognizer'),
],
),
);
},
text:
'Creates a FlutterError and passes it to FlutterError.onError callback. This demonstrates how our flutter error integration catches unhandled exceptions.',
buttonTitle: 'Capture from FlutterError.onError',
),
TooltipButton(
onPressed: () {
WidgetsBinding.instance.platformDispatcher.onError?.call(
Exception('PlatformDispatcher.onError'),
StackTrace.current,
);
},
text:
'This requires additional setup: options.addIntegration(OnErrorIntegration());',
buttonTitle: 'Capture from PlatformDispatcher.onError',
),
TooltipButton(
onPressed: () => makeWebRequest(context),
text:
'Attaches web request related spans to the transaction and send it to Sentry.',
buttonTitle: 'Dart: Web request',
),
TooltipButton(
onPressed: () => makeWebRequestWithDio(context),
key: const Key('dio_web_request'),
text:
'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.',
buttonTitle: 'Flutter: Load assets',
),
TooltipButton(
onPressed: () {
// ignore: avoid_print
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.',
buttonTitle: 'Record print() as breadcrumb',
),
TooltipButton(
onPressed: () {
Sentry.captureMessage(
'This event has an extra tag',
withScope: (scope) {
scope.setTag('foo', 'bar');
},
);
},
text:
'Sends the capture message event with additional Tag to Sentry.',
buttonTitle: 'Capture message with scope with additional tag',
),
TooltipButton(
onPressed: () async {
final transaction="/?originalUrl=https%3A%2F%2Fpub.dev%2FSentry.getSpan()%2520%3F%3F%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520Sentry.startTransaction(%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%26%2339%3BmyNewTrWithError3%26%2339%3B%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%26%2339%3BmyNewOp%26%2339%3B%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520description%3A%2520%26%2339%3BmyTr%2520myOp%26%2339%3B%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520)%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520transaction.setTag(%26%2339%3BmyTag%26%2339%3B%2C%2520%26%2339%3BmyValue%26%2339%3B)%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520transaction.setData(%26%2339%3BmyExtra%26%2339%3B%2C%2520%26%2339%3BmyExtraValue%26%2339%3B)%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520await%2520Future.delayed(const%2520Duration(milliseconds%3A%252050))%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520final%2520span%2520%3D%2520transaction.startChild(%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%26%2339%3BchildOfMyOp%26%2339%3B%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520description%3A%2520%26%2339%3BchildOfMyOp%2520span%26%2339%3B%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520)%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520span.setTag(%26%2339%3BmyNewTag%26%2339%3B%2C%2520%26%2339%3BmyNewValue%26%2339%3B)%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520span.setData(%26%2339%3BmyNewData%26%2339%3B%2C%2520%26%2339%3BmyNewDataValue%26%2339%3B)%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520await%2520Future.delayed(const%2520Duration(milliseconds%3A%252070))%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520await%2520span.finish(status%3A%2520const%2520SpanStatus.resourceExhausted())%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520await%2520Future.delayed(const%2520Duration(milliseconds%3A%252090))%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520final%2520spanChild%2520%3D%2520span.startChild(%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%26%2339%3BchildOfChildOfMyOp%26%2339%3B%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520description%3A%2520%26%2339%3BchildOfChildOfMyOp%2520span%26%2339%3B%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520)%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520await%2520Future.delayed(const%2520Duration(milliseconds%3A%2520110))%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520spanChild.startChild(%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%26%2339%3BunfinishedChild%26%2339%3B%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520description%3A%2520%26%2339%3BI%2520wont%2520finish%26%2339%3B%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520)%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520await%2520spanChild.finish(%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520status%3A%2520const%2520SpanStatus.internalError())%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520await%2520Future.delayed(const%2520Duration(milliseconds%3A%252050))%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%26%2347%3B%26%2347%3B%2520findPrimeNumber(1000000)%3B%2520%26%2347%3B%26%2347%3B%2520Uncomment%2520to%2520see%2520it%2520with%2520profiling%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520await%2520transaction.finish(status%3A%2520const%2520SpanStatus.ok())%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%7D%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520text%3A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%26%2339%3BCreates%2520a%2520custom%2520transaction%2C%2520adds%2520child%2520spans%2520and%2520send%2520them%2520to%2520Sentry.%26%2339%3B%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520buttonTitle%3A%2520%26%2339%3BCapture%2520transaction%26%2339%3B%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520)%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520TooltipButton(%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520onPressed%3A%2520()%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520Sentry.captureMessage(%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%26%2339%3BThis%2520message%2520has%2520an%2520attachment%26%2339%3B%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520withScope%3A%2520(scope)%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520const%2520txt%2520%3D%2520%26%2339%3BLorem%2520Ipsum%2520dolor%2520sit%2520amet%26%2339%3B%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520scope.addAttachment(%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520SentryAttachment.fromIntList(%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520utf8.encode(txt)%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%26%2339%3Bfoobar.txt%26%2339%3B%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520contentType%3A%2520%26%2339%3Btext%26%2347%3Bplain%26%2339%3B%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520)%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520)%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%7D%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520)%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%7D%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520text%3A%2520%26%2339%3BSends%2520the%2520capture%2520message%2520with%2520an%2520attachment%2520to%2520Sentry.%26%2339%3B%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520buttonTitle%3A%2520%26%2339%3BCapture%2520message%2520with%2520attachment%26%2339%3B%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520)%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520TooltipButton(%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520onPressed%3A%2520()%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520feedback.BetterFeedback.of(context).show(%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520(feedback.UserFeedback%2520feedback)%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520Sentry.captureMessage(%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520feedback.text%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520withScope%3A%2520(scope)%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520final%2520entries%2520%3D%2520feedback.extra%3F.entries%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520if%2520(entries%2520!%3D%2520null)%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520for%2520(final%2520extra%2520in%2520entries)%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%26%2347%3B%26%2347%3B%2520ignore%3A%2520deprecated_member_use%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520scope.setExtra(extra.key%2C%2520extra.value)%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%7D%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%7D%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520scope.addAttachment(%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520SentryAttachment.fromUint8List(%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520feedback.screenshot%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%26%2339%3Bfeedback.png%26%2339%3B%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520contentType%3A%2520%26%2339%3Bimage%26%2347%3Bpng%26%2339%3B%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520)%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520)%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%7D%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520)%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%7D%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520)%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%7D%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520text%3A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%26%2339%3BSends%2520the%2520capture%2520message%2520with%2520an%2520image%2520attachment%2520to%2520Sentry.%26%2339%3B%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520buttonTitle%3A%2520%26%2339%3BCapture%2520message%2520with%2520image%2520attachment%26%2339%3B%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520)%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520TooltipButton(%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520onPressed%3A%2520()%2520async%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520final%2520id%2520%3D%2520await%2520Sentry.captureMessage(%26%2339%3BUserFeedback%26%2339%3B)%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520if%2520(!context.mounted)%2520return%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520SentryFeedbackWidget.show(%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520context%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520associatedEventId%3A%2520id%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520)%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%7D%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520text%3A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%26%2339%3BShows%2520a%2520custom%2520feedback%2520dialog%2520without%2520an%2520ongoing%2520event%2520that%2520captures%2520and%2520sends%2520user%2520feedback%2520data%2520to%2520Sentry.%26%2339%3B%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520buttonTitle%3A%2520%26%2339%3BCapture%2520Feedback%26%2339%3B%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520)%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520TooltipButton(%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520onPressed%3A%2520()%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520final%2520log%2520%3D%2520Logger(%26%2339%3BLogging%26%2339%3B)%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520log.info(%26%2339%3BMy%2520Logging%2520test%26%2339%3B)%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%7D%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520text%3A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%26%2339%3BDemonstrates%2520the%2520logging%2520integration.%2520log.info()%2520will%2520create%2520an%2520info%2520event%2520send%2520it%2520to%2520Sentry.%26%2339%3B%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520buttonTitle%3A%2520%26%2339%3BLogging%26%2339%3B%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520)%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520TooltipButton(%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520onPressed%3A%2520()%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520Sentry.addFeatureFlag(%26%2339%3Bfeature-one%26%2339%3B%2C%2520true)%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%7D%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520text%3A%2520%26%2339%3BDemonstrates%2520the%2520feature%2520flags.%26%2339%3B%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520buttonTitle%3A%2520%26%2339%3BAdd%2520%26quot%3Bfeature-one%26quot%3B%2520flag%26%2339%3B%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520)%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520TooltipButton(%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520onPressed%3A%2520()%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520Sentry.logger%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520.info(%26%2339%3BSentry%2520Log%2520With%2520Test%2520Attribute%26%2339%3B%2C%2520attributes%3A%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%26%2339%3Btest-attribute%26%2339%3B%3A%2520SentryAttribute.string(%26%2339%3Btest-value%26%2339%3B)%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%7D)%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%7D%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520text%3A%2520%26%2339%3BDemonstrates%2520the%2520logging%2520with%2520Sentry%2520Log.%26%2339%3B%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520buttonTitle%3A%2520%26%2339%3BSentry%2520Log%2520with%2520Attribute%26%2339%3B%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520)%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520if%2520(UniversalPlatform.isIOS%2520%7C%7C%2520UniversalPlatform.isMacOS)%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520const%2520CocoaExample()%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520if%2520(UniversalPlatform.isAndroid)%2520const%2520AndroidExample()%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%26%2347%3B%26%2347%3B%2520ignore%3A%2520invalid_use_of_internal_member%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520if%2520(SentryFlutter.native%2520!%3D%2520null)%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520ElevatedButton(%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520onPressed%3A%2520()%2520async%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520SentryFlutter.nativeCrash()%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%7D%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520child%3A%2520const%2520Text(%26%2339%3BSentry.nativeCrash%26%2339%3B)%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520)%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%5D.map((widget)%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520if%2520(kIsWeb)%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%26%2347%3B%26%2347%3B%2520Add%2520vertical%2520padding%2520to%2520web%2520so%2520the%2520tooltip%2520doesn%26%2339%3Bt%2520obstruct%2520the%2520clicking%2520of%2520the%2520button%2520below.%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520return%2520Padding(%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520padding%3A%2520const%2520EdgeInsets.only(top%3A%252018.0%2C%2520bottom%3A%252018.0)%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520child%3A%2520widget%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520)%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%7D%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520return%2520widget%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%7D).toList()%2C%2520%2520%2520%2520%2520%2520%2520%2520)%2C%2520%2520%2520%2520%2520%2520)%2C%2520%2520%2520%2520)%3B%2520%2520%7D%2520%2520Future%26lt%3Bvoid%26gt%3B%2520isarTest()%2520async%2520%7B%2520%2520%2520%2520final%2520tr%2520%3D%2520Sentry.startTransaction(%2520%2520%2520%2520%2520%2520%26%2339%3BisarTest%26%2339%3B%2C%2520%2520%2520%2520%2520%2520%26%2339%3Bdb%26%2339%3B%2C%2520%2520%2520%2520%2520%2520bindToScope%3A%2520true%2C%2520%2520%2520%2520)%3B%2520%2520%2520%2520final%2520dir%2520%3D%2520await%2520getApplicationDocumentsDirectory()%3B%2520%2520%2520%2520final%2520isar%2520%3D%2520await%2520SentryIsar.open(%2520%2520%2520%2520%2520%2520%5BUserSchema%5D%2C%2520%2520%2520%2520%2520%2520directory%3A%2520dir.path%2C%2520%2520%2520%2520)%3B%2520%2520%2520%2520final%2520newUser%2520%3D%2520User()%2520%2520%2520%2520%2520%2520..name%2520%3D%2520%26%2339%3BJoe%2520Dirt%26%2339%3B%2520%2520%2520%2520%2520%2520..age%2520%3D%252036%3B%2520%2520%2520%2520await%2520isar.writeTxn(()%2520async%2520%7B%2520%2520%2520%2520%2520%2520await%2520isar.users.put(newUser)%3B%2520%26%2347%3B%26%2347%3B%2520insert%2520%26amp%3B%2520update%2520%2520%2520%2520%7D)%3B%2520%2520%2520%2520final%2520existingUser%2520%3D%2520await%2520isar.users.get(newUser.id)%3B%2520%26%2347%3B%26%2347%3B%2520get%2520%2520%2520%2520await%2520isar.writeTxn(()%2520async%2520%7B%2520%2520%2520%2520%2520%2520await%2520isar.users.delete(existingUser!.id)%3B%2520%26%2347%3B%26%2347%3B%2520delete%2520%2520%2520%2520%7D)%3B%2520%2520%2520%2520await%2520tr.finish(status%3A%2520const%2520SpanStatus.ok())%3B%2520%2520%7D%2520%2520Future%26lt%3Bvoid%26gt%3B%2520hiveTest()%2520async%2520%7B%2520%2520%2520%2520final%2520tr%2520%3D%2520Sentry.startTransaction(%2520%2520%2520%2520%2520%2520%26%2339%3BhiveTest%26%2339%3B%2C%2520%2520%2520%2520%2520%2520%26%2339%3Bdb%26%2339%3B%2C%2520%2520%2520%2520%2520%2520bindToScope%3A%2520true%2C%2520%2520%2520%2520)%3B%2520%2520%2520%2520final%2520appDir%2520%3D%2520await%2520getApplicationDocumentsDirectory()%3B%2520%2520%2520%2520SentryHive.init(appDir.path)%3B%2520%2520%2520%2520final%2520catsBox%2520%3D%2520await%2520SentryHive.openBox%26lt%3BMap%26gt%3B(%26%2339%3Bcats%26%2339%3B)%3B%2520%2520%2520%2520await%2520catsBox.put(%26%2339%3Bfluffy%26%2339%3B%2C%2520%7B%26%2339%3Bname%26%2339%3B%3A%2520%26%2339%3BFluffy%26%2339%3B%2C%2520%26%2339%3Bage%26%2339%3B%3A%25204%7D)%3B%2520%2520%2520%2520await%2520catsBox.put(%26%2339%3Bloki%26%2339%3B%2C%2520%7B%26%2339%3Bname%26%2339%3B%3A%2520%26%2339%3BLoki%26%2339%3B%2C%2520%26%2339%3Bage%26%2339%3B%3A%25202%7D)%3B%2520%2520%2520%2520await%2520catsBox.clear()%3B%2520%2520%2520%2520await%2520catsBox.close()%3B%2520%2520%2520%2520SentryHive.close()%3B%2520%2520%2520%2520await%2520tr.finish(status%3A%2520const%2520SpanStatus.ok())%3B%2520%2520%7D%2520%2520Future%26lt%3Bvoid%26gt%3B%2520sqfliteTest()%2520async%2520%7B%2520%2520%2520%2520final%2520tr%2520%3D%2520Sentry.startTransaction(%2520%2520%2520%2520%2520%2520%26%2339%3BsqfliteTest%26%2339%3B%2C%2520%2520%2520%2520%2520%2520%26%2339%3Bdb%26%2339%3B%2C%2520%2520%2520%2520%2520%2520bindToScope%3A%2520true%2C%2520%2520%2520%2520)%3B%2520%2520%2520%2520%26%2347%3B%26%2347%3B%2520databaseFactory%2520%3D%2520databaseFactoryFfiWeb%3B%2520%26%2347%3B%26%2347%3B%2520or%2520databaseFactoryFfi%2520%26%2347%3B%26%2347%3B%2520or%2520SentrySqfliteDatabaseFactory()%2520%2520%2520%2520%26%2347%3B%26%2347%3B%2520final%2520sqfDb%2520%3D%2520await%2520openDatabase(inMemoryDatabasePath)%3B%2520%2520%2520%2520final%2520db%2520%3D%2520await%2520openDatabaseWithSentry(inMemoryDatabasePath)%3B%2520%2520%2520%2520%26%2347%3B%26%2347%3B%2520final%2520db%2520%3D%2520SentryDatabase(sqfDb)%3B%2520%2520%2520%2520%26%2347%3B%26%2347%3B%2520final%2520batch%2520%3D%2520db.batch()%3B%2520%2520%2520%2520await%2520db.execute(%26%2339%3B%26%2339%3B%26%2339%3B%2520%2520%2520%2520%2520%2520CREATE%2520TABLE%2520Product%2520(%2520%2520%2520%2520%2520%2520%2520%2520id%2520INTEGER%2520PRIMARY%2520KEY%2C%2520%2520%2520%2520%2520%2520%2520%2520title%2520TEXT%2520%2520%2520%2520%2520%2520)%2520%2520%26%2339%3B%26%2339%3B%26%2339%3B)%3B%2520%2520%2520%2520final%2520dbTitles%2520%3D%2520%26lt%3BString%26gt%3B%5B%5D%3B%2520%2520%2520%2520for%2520(int%2520i%2520%3D%25201%3B%2520i%2520%26lt%3B%3D%252020%3B%2520i%2B%2B)%2520%7B%2520%2520%2520%2520%2520%2520final%2520title%2520%3D%2520%26%2339%3BProduct%2520%24i%26%2339%3B%3B%2520%2520%2520%2520%2520%2520dbTitles.add(title)%3B%2520%2520%2520%2520%2520%2520await%2520db.insert(%26%2339%3BProduct%26%2339%3B%2C%2520%26lt%3BString%2C%2520Object%3F%26gt%3B%7B%26%2339%3Btitle%26%2339%3B%3A%2520title%7D)%3B%2520%2520%2520%2520%7D%2520%2520%2520%2520await%2520db.query(%26%2339%3BProduct%26%2339%3B)%3B%2520%2520%2520%2520await%2520db.transaction((txn)%2520async%2520%7B%2520%2520%2520%2520%2520%2520await%2520txn%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520.insert(%26%2339%3BProduct%26%2339%3B%2C%2520%26lt%3BString%2C%2520Object%3F%26gt%3B%7B%26%2339%3Btitle%26%2339%3B%3A%2520%26%2339%3BProduct%2520Another%2520one%26%2339%3B%7D)%3B%2520%2520%2520%2520%2520%2520await%2520txn.delete(%26%2339%3BProduct%26%2339%3B%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520where%3A%2520%26%2339%3Btitle%2520%3D%2520%3F%26%2339%3B%2C%2520whereArgs%3A%2520%5B%26%2339%3BProduct%2520Another%2520one%26%2339%3B%5D)%3B%2520%2520%2520%2520%7D)%3B%2520%2520%2520%2520await%2520db.delete(%26%2339%3BProduct%26%2339%3B%2C%2520where%3A%2520%26%2339%3Btitle%2520%3D%2520%3F%26%2339%3B%2C%2520whereArgs%3A%2520%5B%26%2339%3BProduct%25201%26%2339%3B%5D)%3B%2520%2520%2520%2520%26%2347%3B%26%2347%3B%2520final%2520batch%2520%3D%2520db.batch()%3B%2520%2520%2520%2520%26%2347%3B%26%2347%3B%2520batch.delete(%26%2339%3BProduct%26%2339%3B%2C%2520where%3A%2520%26%2339%3Btitle%2520%3D%2520%3F%26%2339%3B%2C%2520whereArgs%3A%2520dbTitles)%3B%2520%2520%2520%2520%26%2347%3B%26%2347%3B%2520await%2520batch.commit()%3B%2520%2520%2520%2520await%2520db.close()%3B%2520%2520%2520%2520await%2520tr.finish(status%3A%2520const%2520SpanStatus.ok())%3B%2520%2520%7D%2520%2520Future%26lt%3Bvoid%26gt%3B%2520driftTest()%2520async%2520%7B%2520%2520%2520%2520final%2520tr%2520%3D%2520Sentry.startTransaction(%2520%2520%2520%2520%2520%2520%26%2339%3BdriftTest%26%2339%3B%2C%2520%2520%2520%2520%2520%2520%26%2339%3Bdb%26%2339%3B%2C%2520%2520%2520%2520%2520%2520bindToScope%3A%2520true%2C%2520%2520%2520%2520)%3B%2520%2520%2520%2520final%2520executor%2520%3D%2520inMemoryExecutor().interceptWith(%2520%2520%2520%2520%2520%2520%2520%2520SentryQueryInterceptor(databaseName%3A%2520%26%2339%3Bsentry_in_memory_db%26%2339%3B))%3B%2520%2520%2520%2520final%2520db%2520%3D%2520AppDatabase(executor)%3B%2520%2520%2520%2520await%2520db.into(db.todoItems).insert(%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520TodoItemsCompanion.insert(%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520title%3A%2520%26%2339%3BThis%2520is%2520a%2520test%2520thing%26%2339%3B%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520content%3A%2520%26%2339%3Btest%26%2339%3B%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520)%2C%2520%2520%2520%2520%2520%2520%2520%2520)%3B%2520%2520%2520%2520await%2520db.select(db.todoItems).get()%3B%2520%2520%2520%2520await%2520db.close()%3B%2520%2520%2520%2520await%2520tr.finish(status%3A%2520const%2520SpanStatus.ok())%3B%2520%2520%7D%7Dclass%2520AndroidExample%2520extends%2520StatelessWidget%2520%7B%2520%2520const%2520AndroidExample(%7Bsuper.key%7D)%3B%2520%2520%40override%2520%2520Widget%2520build(BuildContext%2520context)%2520%7B%2520%2520%2520%2520return%2520Column(children%3A%2520%5B%2520%2520%2520%2520%2520%2520ElevatedButton(%2520%2520%2520%2520%2520%2520%2520%2520onPressed%3A%2520()%2520async%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520await%2520execute(%26%2339%3Bthrow%26%2339%3B)%3B%2520%2520%2520%2520%2520%2520%2520%2520%7D%2C%2520%2520%2520%2520%2520%2520%2520%2520child%3A%2520const%2520Text(%26%2339%3BKotlin%2520Throw%2520unhandled%2520exception%26%2339%3B)%2C%2520%2520%2520%2520%2520%2520)%2C%2520%2520%2520%2520%2520%2520ElevatedButton(%2520%2520%2520%2520%2520%2520%2520%2520onPressed%3A%2520()%2520async%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520await%2520execute(%26%2339%3Bcapture%26%2339%3B)%3B%2520%2520%2520%2520%2520%2520%2520%2520%7D%2C%2520%2520%2520%2520%2520%2520%2520%2520child%3A%2520const%2520Text(%26%2339%3BKotlin%2520Capture%2520Exception%26%2339%3B)%2C%2520%2520%2520%2520%2520%2520)%2C%2520%2520%2520%2520%2520%2520ElevatedButton(%2520%2520%2520%2520%2520%2520%2520%2520%26%2347%3B%26%2347%3B%2520ANR%2520is%2520disabled%2520by%2520default%2C%2520enable%2520it%2520to%2520test%2520it%2520%2520%2520%2520%2520%2520%2520%2520onPressed%3A%2520()%2520async%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520await%2520execute(%26%2339%3Banr%26%2339%3B)%3B%2520%2520%2520%2520%2520%2520%2520%2520%7D%2C%2520%2520%2520%2520%2520%2520%2520%2520child%3A%2520const%2520Text(%26%2339%3BANR%3A%2520Block%2520UI%252010s%2520(Press%2520until%2520dialog%2520appears)%26%2339%3B)%2C%2520%2520%2520%2520%2520%2520)%2C%2520%2520%2520%2520%2520%2520ElevatedButton(%2520%2520%2520%2520%2520%2520%2520%2520onPressed%3A%2520()%2520async%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520await%2520execute(%26%2339%3Bcpp_capture_message%26%2339%3B)%3B%2520%2520%2520%2520%2520%2520%2520%2520%7D%2C%2520%2520%2520%2520%2520%2520%2520%2520child%3A%2520const%2520Text(%26%2339%3BC%2B%2B%2520Capture%2520message%26%2339%3B)%2C%2520%2520%2520%2520%2520%2520)%2C%2520%2520%2520%2520%2520%2520ElevatedButton(%2520%2520%2520%2520%2520%2520%2520%2520onPressed%3A%2520()%2520async%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520await%2520execute(%26%2339%3Bcrash%26%2339%3B)%3B%2520%2520%2520%2520%2520%2520%2520%2520%7D%2C%2520%2520%2520%2520%2520%2520%2520%2520child%3A%2520const%2520Text(%26%2339%3BC%2B%2B%2520SEGFAULT%26%2339%3B)%2C%2520%2520%2520%2520%2520%2520)%2C%2520%2520%2520%2520%2520%2520ElevatedButton(%2520%2520%2520%2520%2520%2520%2520%2520onPressed%3A%2520()%2520async%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520await%2520execute(%26%2339%3Bplatform_exception%26%2339%3B)%3B%2520%2520%2520%2520%2520%2520%2520%2520%7D%2C%2520%2520%2520%2520%2520%2520%2520%2520child%3A%2520const%2520Text(%26%2339%3BPlatform%2520exception%26%2339%3B)%2C%2520%2520%2520%2520%2520%2520)%2C%2520%2520%2520%2520%5D)%3B%2520%2520%7D%7Dvoid%2520navigateToAutoCloseScreen(BuildContext%2520context)%2520%7B%2520%2520Navigator.push(%2520%2520%2520%2520context%2C%2520%2520%2520%2520MaterialPageRoute(%2520%2520%2520%2520%2520%2520settings%3A%2520const%2520RouteSettings(name%3A%2520%26%2339%3BAutoCloseScreen%26%2339%3B)%2C%2520%2520%2520%2520%2520%2520%26%2347%3B%26%2347%3B%2520ignore%3A%2520deprecated_member_use%2520%2520%2520%2520%2520%2520builder%3A%2520(context)%2520%3D%26gt%3B%2520const%2520SentryDisplayWidget(%2520%2520%2520%2520%2520%2520%2520%2520child%3A%2520AutoCloseScreen()%2C%2520%2520%2520%2520%2520%2520)%2C%2520%2520%2520%2520)%2C%2520%2520)%3B%7DFuture%26lt%3Bvoid%26gt%3B%2520tryCatch()%2520async%2520%7B%2520%2520try%2520%7B%2520%2520%2520%2520throw%2520StateError(%26%2339%3Btry%2520catch%26%2339%3B)%3B%2520%2520%7D%2520catch%2520(error%2C%2520stackTrace)%2520%7B%2520%2520%2520%2520await%2520Sentry.captureException(error%2C%2520stackTrace%3A%2520stackTrace)%3B%2520%2520%7D%7DFuture%26lt%3Bvoid%26gt%3B%2520asyncThrows()%2520async%2520%7B%2520%2520throw%2520StateError(%26%2339%3Basync%2520throws%26%2339%3B)%3B%7Dclass%2520IntegrationTestWidget%2520extends%2520StatefulWidget%2520%7B%2520%2520const%2520IntegrationTestWidget(%7Bsuper.key%7D)%3B%2520%2520%40override%2520%2520State%26lt%3BStatefulWidget%26gt%3B%2520createState()%2520%7B%2520%2520%2520%2520return%2520_IntegrationTestWidgetState()%3B%2520%2520%7D%7Dclass%2520_IntegrationTestWidgetState%2520extends%2520State%26lt%3BIntegrationTestWidget%26gt%3B%2520%7B%2520%2520_IntegrationTestWidgetState()%3B%2520%2520var%2520_output%2520%3D%2520%26quot%3B--%26quot%3B%3B%2520%2520var%2520_isLoading%2520%3D%2520false%3B%2520%2520%40override%2520%2520Widget%2520build(BuildContext%2520context)%2520%7B%2520%2520%2520%2520return%2520Column(%2520%2520%2520%2520%2520%2520children%3A%2520%5B%2520%2520%2520%2520%2520%2520%2520%2520Text(%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520_output%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520key%3A%2520const%2520Key(%26%2339%3Boutput%26%2339%3B)%2C%2520%2520%2520%2520%2520%2520%2520%2520)%2C%2520%2520%2520%2520%2520%2520%2520%2520_isLoading%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%3F%2520const%2520CircularProgressIndicator()%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%3A%2520ElevatedButton(%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520onPressed%3A%2520()%2520async%2520%3D%26gt%3B%2520await%2520_captureException()%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520child%3A%2520const%2520Text(%26%2339%3BcaptureException%26%2339%3B)%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520)%2520%2520%2520%2520%2520%2520%5D%2C%2520%2520%2520%2520)%3B%2520%2520%7D%2520%2520Future%26lt%3Bvoid%26gt%3B%2520_captureException()%2520async%2520%7B%2520%2520%2520%2520setState(()%2520%7B%2520%2520%2520%2520%2520%2520_isLoading%2520%3D%2520true%3B%2520%2520%2520%2520%7D)%3B%2520%2520%2520%2520try%2520%7B%2520%2520%2520%2520%2520%2520throw%2520Exception(%26%2339%3BcaptureException%26%2339%3B)%3B%2520%2520%2520%2520%7D%2520catch%2520(error%2C%2520stackTrace)%2520%7B%2520%2520%2520%2520%2520%2520final%2520id%2520%3D%2520await%2520Sentry.captureException(error%2C%2520stackTrace%3A%2520stackTrace)%3B%2520%2520%2520%2520%2520%2520setState(()%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520_output%2520%3D%2520id.toString()%3B%2520%2520%2520%2520%2520%2520%2520%2520_isLoading%2520%3D%2520false%3B%2520%2520%2520%2520%2520%2520%7D)%3B%2520%2520%2520%2520%7D%2520%2520%7D%7Dclass%2520CocoaExample%2520extends%2520StatelessWidget%2520%7B%2520%2520const%2520CocoaExample(%7Bsuper.key%7D)%3B%2520%2520%40override%2520%2520Widget%2520build(BuildContext%2520context)%2520%7B%2520%2520%2520%2520return%2520Column(%2520%2520%2520%2520%2520%2520children%3A%2520%5B%2520%2520%2520%2520%2520%2520%2520%2520ElevatedButton(%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520onPressed%3A%2520()%2520async%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520await%2520execute(%26%2339%3BfatalError%26%2339%3B)%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%7D%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520child%3A%2520const%2520Text(%26%2339%3BSwift%2520fatalError%26%2339%3B)%2C%2520%2520%2520%2520%2520%2520%2520%2520)%2C%2520%2520%2520%2520%2520%2520%2520%2520ElevatedButton(%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520onPressed%3A%2520()%2520async%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520await%2520execute(%26%2339%3Bcapture%26%2339%3B)%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%7D%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520child%3A%2520const%2520Text(%26%2339%3BSwift%2520Capture%2520NSException%26%2339%3B)%2C%2520%2520%2520%2520%2520%2520%2520%2520)%2C%2520%2520%2520%2520%2520%2520%2520%2520ElevatedButton(%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520onPressed%3A%2520()%2520async%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520await%2520execute(%26%2339%3Bcapture_message%26%2339%3B)%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%7D%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520child%3A%2520const%2520Text(%26%2339%3BSwift%2520Capture%2520message%26%2339%3B)%2C%2520%2520%2520%2520%2520%2520%2520%2520)%2C%2520%2520%2520%2520%2520%2520%2520%2520ElevatedButton(%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520onPressed%3A%2520()%2520async%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520await%2520execute(%26%2339%3Bthrow%26%2339%3B)%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%7D%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520child%3A%2520const%2520Text(%26%2339%3BObjective-C%2520Throw%2520unhandled%2520exception%26%2339%3B)%2C%2520%2520%2520%2520%2520%2520%2520%2520)%2C%2520%2520%2520%2520%2520%2520%2520%2520ElevatedButton(%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520onPressed%3A%2520()%2520async%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520await%2520execute(%26%2339%3Bcrash%26%2339%3B)%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%7D%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520child%3A%2520const%2520Text(%26%2339%3BObjective-C%2520SEGFAULT%26%2339%3B)%2C%2520%2520%2520%2520%2520%2520%2520%2520)%2C%2520%2520%2520%2520%2520%2520%5D%2C%2520%2520%2520%2520)%3B%2520%2520%7D%7D%26%2347%3B%26%2347%3B%26%2347%3B%2520compute%2520can%2520only%2520take%2520a%2520top-level%2520function%2C%2520but%2520not%2520instance%2520or%2520static%2520methods.%26%2347%3B%26%2347%3B%2520Top-level%2520functions%2520are%2520functions%2520declared%2520not%2520inside%2520a%2520class%2520and%2520not%2520inside%2520another%2520functionint%2520loop(int%2520val)%2520%7B%2520%2520var%2520count%2520%3D%25200%3B%2520%2520for%2520(var%2520i%2520%3D%25201%3B%2520i%2520%26lt%3B%3D%2520val%3B%2520i%2B%2B)%2520%7B%2520%2520%2520%2520count%2520%2B%3D%2520i%3B%2520%2520%7D%2520%2520throw%2520StateError(%26%2339%3Bfrom%2520a%2520compute%2520isolate%2520%24count%26%2339%3B)%3B%7Dclass%2520SecondaryScaffold%2520extends%2520StatelessWidget%2520%7B%2520%2520const%2520SecondaryScaffold(%7Bsuper.key%7D)%3B%2520%2520static%2520Future%26lt%3Bvoid%26gt%3B%2520openSecondaryScaffold(BuildContext%2520context)%2520%7B%2520%2520%2520%2520return%2520Navigator.push(%2520%2520%2520%2520%2520%2520context%2C%2520%2520%2520%2520%2520%2520MaterialPageRoute%26lt%3Bvoid%26gt%3B(%2520%2520%2520%2520%2520%2520%2520%2520settings%3A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520const%2520RouteSettings(name%3A%2520%26%2339%3BSecondaryScaffold%26%2339%3B%2C%2520arguments%3A%2520%26%2339%3Bfoobar%26%2339%3B)%2C%2520%2520%2520%2520%2520%2520%2520%2520builder%3A%2520(context)%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520return%2520const%2520SecondaryScaffold()%3B%2520%2520%2520%2520%2520%2520%2520%2520%7D%2C%2520%2520%2520%2520%2520%2520)%2C%2520%2520%2520%2520)%3B%2520%2520%7D%2520%2520%40override%2520%2520Widget%2520build(BuildContext%2520context)%2520%7B%2520%2520%2520%2520return%2520Scaffold(%2520%2520%2520%2520%2520%2520appBar%3A%2520AppBar(%2520%2520%2520%2520%2520%2520%2520%2520title%3A%2520const%2520Text(%26%2339%3BSecondaryScaffold%26%2339%3B)%2C%2520%2520%2520%2520%2520%2520)%2C%2520%2520%2520%2520%2520%2520body%3A%2520Center(%2520%2520%2520%2520%2520%2520%2520%2520child%3A%2520Column(%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520children%3A%2520%5B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520const%2520Text(%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%26%2339%3BYou%2520have%2520added%2520a%2520navigation%2520event%2520%26%2339%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%26%2339%3Bto%2520the%2520crash%2520reports%2520breadcrumbs.%26%2339%3B%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520)%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520MaterialButton(%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520onPressed%3A%2520()%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520Navigator.pop(context)%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%7D%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520child%3A%2520const%2520Text(%26%2339%3BGo%2520back%26%2339%3B)%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520)%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520MaterialButton(%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520onPressed%3A%2520()%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520throw%2520Exception(%26%2339%3BException%2520from%2520SecondaryScaffold%26%2339%3B)%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%7D%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520child%3A%2520const%2520Text(%26%2339%3Bthrow%2520uncaught%2520exception%26%2339%3B)%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520)%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%5D%2C%2520%2520%2520%2520%2520%2520%2520%2520)%2C%2520%2520%2520%2520%2520%2520)%2C%2520%2520%2520%2520)%3B%2520%2520%7D%7DFuture%26lt%3Bvoid%26gt%3B%2520makeWebRequest(BuildContext%2520context)%2520async%2520%7B%2520%2520final%2520transaction%2520%3D%2520Sentry.getSpan()%2520%3F%3F%2520%2520%2520%2520%2520%2520Sentry.startTransaction(%2520%2520%2520%2520%2520%2520%2520%2520%26%2339%3Bflutterwebrequest%26%2339%3B%2C%2520%2520%2520%2520%2520%2520%2520%2520%26%2339%3Brequest%26%2339%3B%2C%2520%2520%2520%2520%2520%2520%2520%2520bindToScope%3A%2520true%2C%2520%2520%2520%2520%2520%2520)%3B%2520%2520final%2520client%2520%3D%2520SentryHttpClient(%2520%2520%2520%2520failedRequestStatusCodes%3A%2520%5BSentryStatusCode.range(400%2C%2520500)%5D%2C%2520%2520)%3B%2520%2520%26%2347%3B%26%2347%3B%2520We%2520don%26%2339%3Bt%2520do%2520any%2520exception%2520handling%2520here.%2520%2520%26%2347%3B%26%2347%3B%2520In%2520case%2520of%2520an%2520exception%2C%2520let%2520it%2520get%2520caught%2520and%2520reported%2520to%2520Sentry%2520%2520final%2520response%2520%3D%2520await%2520client.get(Uri.parse(exampleUrl))%3B%2520%2520await%2520transaction.finish(status%3A%2520const%2520SpanStatus.ok())%3B%2520%2520if%2520(!context.mounted)%2520return%3B%2520%2520await%2520showDialog%26lt%3Bvoid%26gt%3B(%2520%2520%2520%2520context%3A%2520context%2C%2520%2520%2520%2520builder%3A%2520(context)%2520%7B%2520%2520%2520%2520%2520%2520return%2520AlertDialog(%2520%2520%2520%2520%2520%2520%2520%2520title%3A%2520Text(%26%2339%3BResponse%2520%24%7Bresponse.statusCode%7D%26%2339%3B)%2C%2520%2520%2520%2520%2520%2520%2520%2520content%3A%2520SingleChildScrollView(%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520child%3A%2520Text(response.body)%2C%2520%2520%2520%2520%2520%2520%2520%2520)%2C%2520%2520%2520%2520%2520%2520%2520%2520actions%3A%2520%5B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520MaterialButton(%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520onPressed%3A%2520()%2520%3D%26gt%3B%2520Navigator.pop(context)%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520child%3A%2520const%2520Text(%26%2339%3BClose%26%2339%3B)%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520)%2520%2520%2520%2520%2520%2520%2520%2520%5D%2C%2520%2520%2520%2520%2520%2520)%3B%2520%2520%2520%2520%7D%2C%2520%2520)%3B%7DFuture%26lt%3Bvoid%26gt%3B%2520makeWebRequestWithDio(BuildContext%2520context)%2520async%2520%7B%2520%2520final%2520dio%2520%3D%2520Dio()%3B%2520%2520dio.addSentry()%3B%2520%2520final%2520transaction%2520%3D%2520Sentry.getSpan()%2520%3F%3F%2520%2520%2520%2520%2520%2520Sentry.startTransaction(%2520%2520%2520%2520%2520%2520%2520%2520%26%2339%3Bdio-web-request%26%2339%3B%2C%2520%2520%2520%2520%2520%2520%2520%2520%26%2339%3Brequest%26%2339%3B%2C%2520%2520%2520%2520%2520%2520%2520%2520bindToScope%3A%2520true%2C%2520%2520%2520%2520%2520%2520)%3B%2520%2520final%2520span%2520%3D%2520transaction.startChild(%2520%2520%2520%2520%26%2339%3Bdio%26%2339%3B%2C%2520%2520%2520%2520description%3A%2520%26%2339%3Bdesc%26%2339%3B%2C%2520%2520)%3B%2520%2520Response%26lt%3BString%26gt%3B%3F%2520response%3B%2520%2520try%2520%7B%2520%2520%2520%2520response%2520%3D%2520await%2520dio.get%26lt%3BString%26gt%3B(exampleUrl)%3B%2520%2520%2520%2520span.status%2520%3D%2520const%2520SpanStatus.ok()%3B%2520%2520%7D%2520catch%2520(exception%2C%2520stackTrace)%2520%7B%2520%2520%2520%2520span.throwable%2520%3D%2520exception%3B%2520%2520%2520%2520span.status%2520%3D%2520const%2520SpanStatus.internalError()%3B%2520%2520%2520%2520await%2520Sentry.captureException(exception%2C%2520stackTrace%3A%2520stackTrace)%3B%2520%2520%7D%2520finally%2520%7B%2520%2520%2520%2520await%2520span.finish()%3B%2520%2520%7D%2520%2520if%2520(!context.mounted)%2520return%3B%2520%2520await%2520showDialog%26lt%3Bvoid%26gt%3B(%2520%2520%2520%2520context%3A%2520context%2C%2520%2520%2520%2520builder%3A%2520(context)%2520%7B%2520%2520%2520%2520%2520%2520return%2520AlertDialog(%2520%2520%2520%2520%2520%2520%2520%2520title%3A%2520Text(%26%2339%3BResponse%2520%24%7Bresponse%3F.statusCode%7D%26%2339%3B)%2C%2520%2520%2520%2520%2520%2520%2520%2520content%3A%2520SingleChildScrollView(%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520child%3A%2520Text(response%3F.data%2520%3F%3F%2520%26%2339%3Bfailed%2520request%26%2339%3B)%2C%2520%2520%2520%2520%2520%2520%2520%2520)%2C%2520%2520%2520%2520%2520%2520%2520%2520actions%3A%2520%5B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520MaterialButton(%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520onPressed%3A%2520()%2520%3D%26gt%3B%2520Navigator.pop(context)%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520child%3A%2520const%2520Text(%26%2339%3BClose%26%2339%3B)%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520)%2520%2520%2520%2520%2520%2520%2520%2520%5D%2C%2520%2520%2520%2520%2520%2520)%3B%2520%2520%2520%2520%7D%2C%2520%2520)%3B%7DFuture%26lt%3Bvoid%26gt%3B%2520showDialogWithTextAndImage(BuildContext%2520context)%2520async%2520%7B%2520%2520final%2520transaction%2520%3D%2520Sentry.getSpan()%2520%3F%3F%2520%2520%2520%2520%2520%2520Sentry.startTransaction(%2520%2520%2520%2520%2520%2520%2520%2520%26%2339%3Basset-bundle-transaction%26%2339%3B%2C%2520%2520%2520%2520%2520%2520%2520%2520%26%2339%3Bload%26%2339%3B%2C%2520%2520%2520%2520%2520%2520%2520%2520bindToScope%3A%2520true%2C%2520%2520%2520%2520%2520%2520)%3B%2520%2520final%2520text%2520%3D%2520%2520%2520%2520%2520%2520await%2520DefaultAssetBundle.of(context).loadString(%26%2339%3Bassets%26%2347%3Blorem-ipsum.txt%26%2339%3B)%3B%2520%2520if%2520(!context.mounted)%2520return%3B%2520%2520final%2520imageBytes%2520%3D%2520%2520%2520%2520%2520%2520await%2520DefaultAssetBundle.of(context).load(%26%2339%3Bassets%26%2347%3Bsentry-wordmark.png%26%2339%3B)%3B%2520%2520await%2520showDialog%26lt%3Bvoid%26gt%3B(%2520%2520%2520%2520%26%2347%3B%26%2347%3B%2520ignore%3A%2520use_build_context_synchronously%2520%2520%2520%2520context%3A%2520context%2C%2520%2520%2520%2520%26%2347%3B%26%2347%3B%2520gets%2520tracked%2520if%2520using%2520SentryNavigatorObserver%2520%2520%2520%2520routeSettings%3A%2520const%2520RouteSettings(%2520%2520%2520%2520%2520%2520name%3A%2520%26%2339%3BAssetBundle%2520dialog%26%2339%3B%2C%2520%2520%2520%2520)%2C%2520%2520%2520%2520builder%3A%2520(context)%2520%7B%2520%2520%2520%2520%2520%2520return%2520AlertDialog(%2520%2520%2520%2520%2520%2520%2520%2520title%3A%2520const%2520Text(%26%2339%3BAsset%2520Example%26%2339%3B)%2C%2520%2520%2520%2520%2520%2520%2520%2520content%3A%2520SingleChildScrollView(%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520child%3A%2520Column(%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520mainAxisSize%3A%2520MainAxisSize.min%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520children%3A%2520%5B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%26%2347%3B%26%2347%3B%2520Use%2520various%2520ways%2520an%2520image%2520is%2520included%2520in%2520the%2520app.%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%26%2347%3B%26%2347%3B%2520Local%2520asset%2520images%2520are%2520not%2520obscured%2520in%2520replay%2520recording.%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520Image.asset(%26%2339%3Bassets%26%2347%3Bsentry-wordmark.png%26%2339%3B)%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520Image.asset(%26%2339%3Bassets%26%2347%3Bsentry-wordmark.png%26%2339%3B%2C%2520bundle%3A%2520rootBundle)%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520Image.asset(%26%2339%3Bassets%26%2347%3Bsentry-wordmark.png%26%2339%3B%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520bundle%3A%2520DefaultAssetBundle.of(context))%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520Image.network(%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%26%2339%3Bhttps%3A%26%2347%3B%26%2347%3Bwww.gstatic.com%26%2347%3Brecaptcha%26%2347%3Bapi2%26%2347%3Blogo_48.png%26%2339%3B)%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520Image.memory(imageBytes.buffer.asUint8List())%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520Text(text)%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%5D%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520)%2C%2520%2520%2520%2520%2520%2520%2520%2520)%2C%2520%2520%2520%2520%2520%2520%2520%2520actions%3A%2520%5B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520MaterialButton(%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520onPressed%3A%2520()%2520%3D%26gt%3B%2520Navigator.pop(context)%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520child%3A%2520const%2520Text(%26%2339%3BClose%26%2339%3B)%2C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520)%2520%2520%2520%2520%2520%2520%2520%2520%5D%2C%2520%2520%2520%2520%2520%2520)%3B%2520%2520%2520%2520%7D%2C%2520%2520)%3B%2520%2520await%2520transaction.finish(status%3A%2520const%2520SpanStatus.ok())%3B%7Dclass%2520ThemeProvider%2520extends%2520ChangeNotifier%2520%7B%2520%2520ThemeData%2520_theme%2520%3D%2520ThemeData.light()%3B%2520%2520ThemeData%2520get%2520theme%2520%3D%26gt%3B%2520_theme%3B%2520%2520set%2520theme(ThemeData%2520theme)%2520%7B%2520%2520%2520%2520_theme%2520%3D%2520theme%3B%2520%2520%2520%2520notifyListeners()%3B%2520%2520%7D%2520%2520void%2520updatePrimaryColor(MaterialColor%2520color)%2520%7B%2520%2520%2520%2520if%2520(theme.brightness%2520%3D%3D%2520Brightness.light)%2520%7B%2520%2520%2520%2520%2520%2520theme%2520%3D%2520ThemeData(primarySwatch%3A%2520color%2C%2520brightness%3A%2520theme.brightness)%3B%2520%2520%2520%2520%7D%2520else%2520%7B%2520%2520%2520%2520%2520%2520theme%2520%3D%2520ThemeData(primarySwatch%3A%2520color%2C%2520brightness%3A%2520theme.brightness)%3B%2520%2520%2520%2520%7D%2520%2520%7D%7DFuture%26lt%3Bvoid%26gt%3B%2520execute(String%2520method)%2520async%2520%7B%2520%2520await%2520_channel.invokeMethod(method)%3B%7D%26%2347%3B%26%2347%3B%2520Don%26%2339%3Bt%2520inline%2520this%2520one%2520or%2520it%2520shows%2520up%2520as%2520an%2520anonymous%2520closure%2520in%2520profiles.%40pragma(%26quot%3Bvm%3Anever-inline%26quot%3B)int%2520findPrimeNumber(int%2520n)%2520%7B%2520%2520int%2520count%2520%3D%25200%3B%2520%2520int%2520a%2520%3D%25202%3B%2520%2520while%2520(count%2520%26lt%3B%2520n)%2520%7B%2520%2520%2520%2520int%2520b%2520%3D%25202%3B%2520%2520%2520%2520bool%2520prime%2520%3D%2520true%3B%2520%26%2347%3B%26%2347%3B%2520to%2520check%2520if%2520found%2520a%2520prime%2520%2520%2520%2520while%2520(b%2520*%2520b%2520%26lt%3B%3D%2520a)%2520%7B%2520%2520%2520%2520%2520%2520if%2520(a%2520%25%2520b%2520%3D%3D%25200)%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520prime%2520%3D%2520false%3B%2520%2520%2520%2520%2520%2520%2520%2520break%3B%2520%2520%2520%2520%2520%2520%7D%2520%2520%2520%2520%2520%2520b%2B%2B%3B%2520%2520%2520%2520%7D%2520%2520%2520%2520if%2520(prime)%2520%7B%2520%2520%2520%2520%2520%2520count%2B%2B%3B%2520%2520%2520%2520%7D%2520%2520%2520%2520a%2B%2B%3B%2520%2520%7D%2520%2520return%2520a%2520-%25201%3B%7D%253C%2Fcode">


