wiredash 0.1.0 copy "wiredash: ^0.1.0" to clipboard
wiredash: ^0.1.0 copied to clipboard

outdated

Wiredash is an interactive user feedback tool for Flutter apps.

example/lib/main.dart

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

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

class ExampleApp extends StatefulWidget {
  @override
  _ExampleAppState createState() => _ExampleAppState();
}

class _ExampleAppState extends State<ExampleApp> {
  final _navigatorKey = GlobalKey<NavigatorState>();
  var _brightness = Brightness.light;

  @override
  Widget build(BuildContext context) {
    return Wiredash(
      projectId: "YOUR-PROJECT-ID",
      secret: "YOUR-SECRET",
      navigatorKey: _navigatorKey,
      options: WiredashOptionsData(
        showDebugFloatingEntryPoint: true,
      ),
      theme: WiredashThemeData(brightness: _brightness),
      child: MaterialApp(
        navigatorKey: _navigatorKey,
        title: 'Wiredash Demo',
        theme: ThemeData(brightness: _brightness),
        home: DemoHomePage(
          brightness: _brightness,
          onBrightnessChange: () {
            setState(() {
              if (_brightness == Brightness.light) {
                _brightness = Brightness.dark;
              } else {
                _brightness = Brightness.light;
              }
            });
          },
        ),
      ),
    );
  }
}

class DemoHomePage extends StatelessWidget {
  final Brightness brightness;
  final VoidCallback onBrightnessChange;

  const DemoHomePage(
      {@required this.brightness, @required this.onBrightnessChange, Key key})
      : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Wiredash Demo'),
        actions: <Widget>[
          IconButton(
            icon: Icon(Icons.help_outline),
            onPressed: () => Wiredash.of(context).show(),
          )
        ],
      ),
      body: const Center(
        child: Text(
          'Press the FAB to change the theme.',
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: onBrightnessChange,
        tooltip: 'Change Brightness',
        child: Icon(Icons.brightness_medium),
      ),
    );
  }
}
276
likes
0
pub points
94%
popularity

Publisher

verified publisherwiredash.io

Wiredash is an interactive user feedback tool for Flutter apps.

Homepage
Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, http, http_parser, provider, shared_preferences

More

Packages that depend on wiredash