dev 1.0.0 copy "dev: ^1.0.0" to clipboard
dev: ^1.0.0 copied to clipboard

Dev tools and widgets for Flutter applications.

example/lib/main.dart

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

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      home: MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({Key? key}) : super(key: key);

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

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

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Flutter Demo Home Page'),
      ),
      body: DevMenu(
        behavior: HitTestBehavior.opaque,
        gestures: [
          GestureLine(AxisDirection.down),
          GestureLine(AxisDirection.right),
          GestureLine(AxisDirection.up),
        ],
        onOpen: _incrementCounter,
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              const Text(
                'You have pushed the button this many times:',
              ),
              Text(
                '$_counter',
                style: Theme.of(context).textTheme.headline4,
              ),
            ],
          ),
        ),
        devMenu: Column(
          children: [
            ElevatedButton(
              onPressed: _incrementCounter,
              child: Text('Increment'),
            ),
          ],
        ),
      ),
    );
  }
}
1
likes
140
points
8.67k
downloads

Publisher

verified publisherandrebaltazar.com

Weekly Downloads

Dev tools and widgets for Flutter applications.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter, gestures

More

Packages that depend on dev