flutter_stack_trace 1.0.1

Flutter Android iOS

A package for manipulating flutter stack traces and printing them readably,base on stack_trace

example/lib/main.dart

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

void main() => FlutterChain.capture(
      () {
        runApp(MyApp());
      },
//      simple: false,
    );

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    debugLog("On technical forums, I think it's rarely appropriate to constantly ping people for greeting. There are exceptions. But I don't want to be spending this time explaining. The explicit request should have been clear, in my opinion.");
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(),
    );
  }
}

class MyHomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Text(
              'You have pushed the button this many times:',
            ),
          ],
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: _click,
        child: Icon(Icons.add),
      ),
    );
  }

  _click() {
    debugLog("test", isShowTime: false);
    _scheduleAsync();
  }

  void _scheduleAsync() {
    new Future.delayed(new Duration(seconds: 1)).then((_) => _runAsync());
  }

  void _runAsync() {
    throw 'oh no!';
  }
}
0
likes
80
pub points
49%
popularity

A package for manipulating flutter stack traces and printing them readably,base on stack_trace

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

21527312@qq.com

License

BSD (LICENSE)

Dependencies

flutter, stack_trace

More

Packages that depend on flutter_stack_trace