simple_file_log_flutter 0.0.4 copy "simple_file_log_flutter: ^0.0.4" to clipboard
simple_file_log_flutter: ^0.0.4 copied to clipboard

A log util with file for flutter.

example/lib/main.dart

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

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  (await MyLogFlutter.instance.init()).info('app start...');
  runApp(const MyApp());
}

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

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> with LogUtil {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: TextButton(
            onPressed: () {
              logger.fine('test log:${DateTime.now()}');
            },
            child: const Text('Test Log'),
          ),
        ),
      ),
    );
  }
}
1
likes
0
points
23
downloads

Publisher

unverified uploader

Weekly Downloads

A log util with file for flutter.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, logging, path_provider, simple_file_log

More

Packages that depend on simple_file_log_flutter