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.
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),
),
),
);
}
}