flutter_logger_native 0.1.1
flutter_logger_native: ^0.1.1 copied to clipboard

A fluttter logger to iOS and Android native via ffi.

example/lib/main.dart

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

void main() {
  Log().currentLevel = YDLogLevel.Debug;
  runApp(MyApp());
}

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  String _platformVersion = 'Unknown';

  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: Text('Running on: $_platformVersion\n'),
        ),
        floatingActionButton: FloatingActionButton(
          onPressed: () {
            Log().e("少时诵诗书所");
            Log().i(null);
            Log().v("this is a log");
          },
          tooltip: 'Increment',
          child: Icon(Icons.add),
        ),
      ),
    );
  }
}
1
likes
90
pub points
22%
popularity

A fluttter logger to iOS and Android native via ffi.

Repository (missing)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

ffi, flutter, stack_trace

More

Packages that depend on flutter_logger_native