flutter_stack_trace 0.1.2 copy "flutter_stack_trace: ^0.1.2" to clipboard
flutter_stack_trace: ^0.1.2 copied to clipboard

outdated

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    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() {
    FlutterChain.print("test",isShowTime: false);
    _scheduleAsync();
  }

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

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

Publisher

unverified uploader

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

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, stack_trace

More

Packages that depend on flutter_stack_trace