flutter_debug_drawer 0.0.2 copy "flutter_debug_drawer: ^0.0.2" to clipboard
flutter_debug_drawer: ^0.0.2 copied to clipboard

Adds a side menu in all screens with debug information. You can decide which information to show and create new modules to show information.

example/lib/main.dart

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

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      builder: DebugDrawerBuilder.build(modules: [
        PlatformModule(),
        MediaQueryModule(),
        PackageModule(),
      ]),
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(),
    );
  }
}

class MyHomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("UNO"),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Text(
              'You have pushed the button this many times:',
            ),
            Text(
              'hola',
              style: Theme.of(context).textTheme.display1,
            ),
          ],
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: () => Navigator.of(context)
            .push(PageRouteBuilder(pageBuilder: (context, _, __) => Page2())),
        tooltip: 'Increment',
        child: Icon(Icons.add),
      ), // This trailing comma makes auto-formatting nicer for build methods.
    );
  }
}

class Page2 extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("DOS"),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Text(
              'You have pushed the button this many times:',
            ),
            Text(
              'PEPEc',
              style: Theme.of(context).textTheme.display1,
            ),
          ],
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: () => Navigator.of(context).pop(),
        tooltip: 'Increment',
        child: Icon(Icons.add),
      ), // This trailing comma makes auto-formatting nicer for build methods.
    );
  }
}
3
likes
40
pub points
0%
popularity

Publisher

verified publishersergiandreplace.com

Adds a side menu in all screens with debug information. You can decide which information to show and create new modules to show information.

Repository (GitHub)
View/report issues

License

BSD-3-Clause (license)

Dependencies

cupertino_icons, flutter, package_info

More

Packages that depend on flutter_debug_drawer