Shipbook SDK for Flutter applications. Capture logs, errors, and exceptions from your Flutter apps and view them in the Shipbook console. Learn more at shipbook.io.
Add to your pubspec.yaml:
dependencies:
shipbook_flutter: ^1.0.0Then run:
flutter pub getimport 'package:shipbook_flutter/shipbook_flutter.dart';
import 'package:shipbook_flutter/log.dart';
void main() {
runApp(const MyApp());
// Initialize Shipbook (do this once at app startup, after runApp)
Shipbook.start('YOUR_APP_ID', 'YOUR_APP_KEY');
}
// Get a logger for your class/component
final log = Shipbook.getLogger('MyWidget');
// Log messages at different severity levels
log.v('Detailed trace information');
log.d('Debug information');
log.i('General information');
log.w('Warning message');
log.e('Error message');
// Log with an error object
try {
throw StateError('Something failed');
} catch (error) {
log.e('Operation failed', error);
}- Remote Logging - View all your app logs in the Shipbook console
- Error Tracking - Automatically captures uncaught exceptions and Flutter errors
- Session Tracking - Group logs by user session
- Offline Support - Logs are queued and sent when connectivity is restored
- Dynamic Configuration - Change log levels remotely without redeploying
- User Identification - Associate logs with specific users
Shipbook.enableInnerLog(true);Shipbook.registerUser(
'user-123',
userName: 'johndoe',
fullName: 'John Doe',
email: 'john@example.com',
phoneNumber: '+1234567890',
additionalInfo: {'role': 'admin'},
);Shipbook.logout();Shipbook.screen('HomePage');You can also use static methods without creating a logger instance. The tag is automatically inferred from the caller's file name:
Log.error('Something went wrong');
Log.warning('This is a warning');
Log.info('General info');
Log.debug('Debug info');
Log.verbose('Trace info');- Sign up at shipbook.io
- Create a new application in the console
- Copy your App ID and App Key from the application settings
For full setup instructions, see the Flutter documentation.
Elisha Sterngold (ShipBook Ltd.)
ShipBook SDK is available under the MIT license. See the LICENSE file for more info.