flutter_error_checker 0.0.1
SDKflutter
Platformandroidioswindowslinuxmacosweb
Automatically captures Flutter framework errors, Dart exceptions, and UI rendering issues..
Flutter Error Checker
A Flutter package that automatically captures and logs errors by sending them to a FastAPI backend for monitoring.
Installation
Add to your pubspec.yaml:
dependencies:
flutter_error_checker: ^0.0.1
Run:
flutter pub get
Setup
- Initialize the error checker in your main.dart:
import 'package:flutter_error_checker/flutter_error_checker.dart';
void main() {
FlutterErrorChecker.init();
runApp(MyApp());
}
-
Ensure your FastAPI backend is running at
http://127.0.0.1:8000/error-log -
Create the following FastAPI endpoint:
from fastapi import FastAPI
from pydantic import BaseModel
app = FastAPI()
class ErrorLog(BaseModel):
error: str
stack_trace: str
@app.post("/error-log")
async def log_error(error_log: ErrorLog):
return {"status": "success"}
How it Works
Once initialized, the package automatically:
- Captures Flutter framework errors
- Captures unhandled Dart exceptions
- Sends error details to your FastAPI server
- Logs submission status to console
Example
// Your normal Flutter code - errors are captured automatically
void main() {
FlutterErrorChecker.init();
runApp(MaterialApp(
home: Scaffold(
body: Center(
child: Text('App with error tracking'),
),
),
));
}
Need Help?
For issues and feature requests, please file an issue on our GitHub repository.