flocon 2.0.1
flocon: ^2.0.1 copied to clipboard
Flocon SDK for Flutter - sends your app's network calls, analytics events and tables to the Flocon desktop debugger.
import 'package:flocon/flocon.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
// Connects in the background to the desktop app (localhost by default), retrying every 3 seconds.
if (kDebugMode) {
await startFlocon((flocon) => flocon
..install(FloconNetwork(isImage: (request, _) => request.url.host == 'picsum.photos')));
}
Flocon.analytics.sender('firebase').logEvents([
AnalyticsEvent(eventName: 'app_started', properties: [AnalyticsProperty('source', 'example')]),
]);
Flocon.table.table('users').log([TableColumnConfig('name', 'Ada')]);
Flocon.timeline.logLifecycle('started');
runApp(MaterialApp(
navigatorObservers: [FloconNavigatorObserver()],
home: const Scaffold(body: Center(child: Text('Flocon'))),
));
}