first commit

This commit is contained in:
vl.arkhangelskii
2026-09-27 19:12:14 +03:00
commit ba3ba38fc9
318 changed files with 9377 additions and 0 deletions
@@ -0,0 +1,70 @@
import 'package:flutter/cupertino.dart';
import 'package:sign_checker/theme/theme.dart';
import 'package:sign_checker/ui/ui.dart';
import 'package:sign_checker_widgetbook/knobs/common_knobs.dart';
import 'package:sign_checker_widgetbook/support/preview.dart';
import 'package:widgetbook/widgetbook.dart';
WidgetbookComponent buttonsComponent() {
return WidgetbookComponent(
name: 'AppButton',
useCases: [
WidgetbookUseCase(
name: 'Playground',
builder: (context) {
return IosPreview(
stretch: true,
child: AppButton(
label: knobText(
context,
label: 'Label',
initialValue: 'Подробнее',
),
style: knobEnum(
context,
label: 'Style',
values: AppButtonStyle.values,
initial: AppButtonStyle.filled,
),
size: knobEnum(
context,
label: 'Size',
values: AppButtonSize.values,
initial: AppButtonSize.large,
),
expanded: knobBool(
context,
label: 'Expanded',
initialValue: true,
),
loading: knobBool(context, label: 'Loading'),
icon: knobBool(context, label: 'Icon')
? CupertinoIcons.book
: null,
onPressed: knobBool(context, label: 'Enabled', initialValue: true)
? () {}
: null,
),
);
},
),
WidgetbookUseCase(
name: 'All styles',
builder: (context) {
return IosPreview(
stretch: true,
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
for (final style in AppButtonStyle.values) ...[
AppButton(label: style.name, style: style, onPressed: () {}),
const SizedBox(height: AppSpacing.s3),
],
],
),
);
},
),
],
);
}