debug_bricks_ui 0.0.3 debug_bricks_ui: ^0.0.3 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 #
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 #
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 #
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 #
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 #
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 #
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
}
}