flutter_fimber_filelogger 2.0.0 copy "flutter_fimber_filelogger: ^2.0.0" to clipboard
flutter_fimber_filelogger: ^2.0.0 copied to clipboard

discontinued
PlatformAndroidiOS

A file logger tree for Flutter Fimber (which includes an auto-clean mechanism)

example/lib/main.dart

import 'package:fimber/fimber.dart';
import 'package:flutter/material.dart';
import 'package:flutter_fimber_filelogger/flutter_fimber_filelogger.dart';

void main() {
  Fimber.plantTree(
      FileLoggerTree(levels: FileLoggerLevels.ALL, numberOfDays: 5));
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key? key, required this.title}) : super(key: key);

  // This widget is the home page of your application. It is stateful, meaning
  // that it has a State object (defined below) that contains fields that affect
  // how it looks.

  // This class is the configuration for the state. It holds the values (in this
  // case the title) provided by the parent (in this case the App widget) and
  // used by the build method of the State. Fields in a Widget subclass are
  // always marked "final".

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  int _counter = 0;

  void _incrementCounter() {
    setState(() {
      _counter++;
    });

    Fimber.d('Counter clicked $_counter times!');
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Text(
              'You have pushed the button this many times:',
            ),
            Text(
              '$_counter',
              style: Theme.of(context).textTheme.headline4,
            ),
          ],
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: _incrementCounter,
        tooltip: 'Increment',
        child: Icon(Icons.add),
      ), // This trailing comma makes auto-formatting nicer for build methods.
    );
  }
}
5
likes
110
pub points
39%
popularity

Publisher

verified publisherdaad.mobi

A file logger tree for Flutter Fimber (which includes an auto-clean mechanism)

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (LICENSE)

Dependencies

flutter, flutter_fimber, intl, path, path_provider, synchronized

More

Packages that depend on flutter_fimber_filelogger