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

UI components for debug purposes

Set of UI components that you can use for implementing debug screens.

Almost all library components (except SliderBrick) are just ListTile wrappers. That means that fof component theming you should follow ListTile theming instructions.

Getting started #

Add to your pubspec.yaml:

dependencies:
  debug_bricks_ui: <last_version>

Components #

TextBrick #

TextBrick

TextBrick

import 'package:debug_bricks_ui/debug_bricks_ui.dart';

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

  @override
  Widget build(BuildContext context) {
    return TextBrick(
      infoIconData: Icons.devices,
      actionIconData: Icons.copy,
      title: 'TextBrick',
      subtitle: 'Subtitle',
      onTap: () {},
    );
  }
}

CheckboxBrick #

CheckboxBrick

CheckboxBrick

import 'package:debug_bricks_ui/debug_bricks_ui.dart';

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

  @override
  Widget build(BuildContext context) {
    return CheckboxBrick(
      title: 'CheckboxBrick',
      subtitle: 'Subtitle',
      value: true,
      changeListener: (value) => {},
    );
  }
}

RadioBrick #

RadioBrick

RadioBrick

import 'package:debug_bricks_ui/debug_bricks_ui.dart';

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

  @override
  Widget build(BuildContext context) {
    return RadioBrick<String>(
      title: 'RadioBrick',
      subtitle: 'Subtitle',
      value: 'value',
      groupValue: 'value',
      changeListener: (value) {},
    );
  }
}

SwitchBrick #

SwitchBrick

SwitchBrick

import 'package:debug_bricks_ui/debug_bricks_ui.dart';

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

  @override
  Widget build(BuildContext context) {
    return SwitchBrick(
      title: 'SwitchBrick',
      subtitle: 'Subtitle',
      value: true,
      changeListener: (value) => {},
    );
  }
}

SliderBrick #

SliderBrick

SliderBrick

import 'package:debug_bricks_ui/debug_bricks_ui.dart';

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

  @override
  Widget build(BuildContext context) {
    final value = 50;
    return SliderBrick(
      title: 'SliderBrick',
      subtitle: 'Subtitle',
      iconData: Icons.trending_flat,
      minValue: 0,
      maxValue: 100,
      value: value,
      divisions: 10,
      label: value.toString(),
    );
  }
}

ExpandableBrick #

ExpandableBrick

ExpandableBrick

import 'package:debug_bricks_ui/debug_bricks_ui.dart';

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

  @override
  Widget build(BuildContext context) {
    return ExpandableBrick(
      title: 'ExpandableBrick',
      subtitle: 'Subtitle',
      children: _buildChildren(),
    );
  }

  List<Widget> _buildChildren() {
    // build items
  }
}