dev_logger_ui 1.0.0-dev.2 copy "dev_logger_ui: ^1.0.0-dev.2" to clipboard
dev_logger_ui: ^1.0.0-dev.2 copied to clipboard

Display API requests, responses, errors, and mocked APIs(response/url) in the UI. Log all of them to the console, and also display exceptions in the UI.

example/lib/main.dart

import 'dart:async';
import 'dart:developer';

import 'package:dev_logger_ui/dev_logger_ui/dev_logger_ui.dart';
import 'package:flutter/material.dart';

import 'my_home_page.dart';

GlobalKey<NavigatorState> navigatorKey = GlobalKey<NavigatorState>();

void main() {
  runZonedGuarded(
    () {
      WidgetsFlutterBinding.ensureInitialized();
      FlutterError.onError = (error) {
        log("giu nguyen ");
      };
      ApiLogger.instance.listenFlutterError(FlutterError.onError);
      runApp(const MyApp());
    },
    (error, stack) {
      ApiLogger.instance.addNormalError(error, stack);
      Completer().completeError(error, stack);
      log("bat loi ");
    },
  );
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      navigatorKey: navigatorKey,
      title: 'Flutter Demo example1',
      builder: ApiLogger.builder(),
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page example1'),
    );
  }
}
0
likes
0
points
119
downloads

Publisher

unverified uploader

Weekly Downloads

Display API requests, responses, errors, and mocked APIs(response/url) in the UI. Log all of them to the console, and also display exceptions in the UI.

Homepage

License

unknown (license)

Dependencies

collection, cupertino_icons, dio, flutter, flutter_localizations, flutter_udid, http, http_parser, intl, json_annotation, keyboard_dismisser, lazy_data_viewer, mailer, mime, path_provider, provider, shake

More

Packages that depend on dev_logger_ui