Skip to content

badeesAbood/console_flutter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

console_flutter

A simple Flutter package project to store, view, and manage app console log, API logs.

Base log type:

  • verbose (Default, with black color text)
  • info (Blue color text)
  • error (Red color text)

Installation

In the dependencies: section of your pubspec.yaml, add the following line:

dependencies:
  console_flutter: <latest_version>

Usage

In main function

import 'package:console_flutter/console_flutter.dart';

void main() async {
    WidgetsFlutterBinding.ensureInitialized();
    Console.logEnabled(kDebugMode); // false will ignore Console view
    runApp(MyApp());
}
  • Method 1: WrapperWidget

In your app

import 'package:console_flutter/console_flutter.dart';

class MyApp extends StatelessWidget {
  Widget build(BuildContext context) {
    return MaterialApp(
        ...
        body: ConsoleWrapper(
            child: MyHomePage(),
        ),
    );
  }
}
  • Method 2: Custom Navigate

Custom your view and action to open Logs Screen

import 'package:console_flutter/console_flutter.dart';

Console.showConsoleLog(context);

About

Plugin to show API logs for Flutter

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dart 88.0%
  • Ruby 9.0%
  • Swift 2.7%
  • Objective-C 0.3%