49 lines
1.7 KiB
Dart
49 lines
1.7 KiB
Dart
import 'package:flutter/cupertino.dart';
|
|
import 'package:please_pay_me/theme/theme.dart';
|
|
import 'package:please_pay_me/ui/ui.dart';
|
|
import 'package:please_pay_me_widgetbook/knobs/common_knobs.dart';
|
|
import 'package:please_pay_me_widgetbook/support/preview.dart';
|
|
import 'package:widgetbook/widgetbook.dart';
|
|
|
|
WidgetbookComponent progressComponent() {
|
|
return WidgetbookComponent(
|
|
name: 'Progress',
|
|
useCases: [
|
|
WidgetbookUseCase(
|
|
name: 'Activity indicator',
|
|
builder: (context) {
|
|
return IosPreview.centered(
|
|
child: AppSpinner(
|
|
radius: knobDouble(context, label: 'Radius', initialValue: 14, min: 6, max: 28),
|
|
color: knobTint(context),
|
|
),
|
|
);
|
|
},
|
|
),
|
|
WidgetbookUseCase(
|
|
name: 'Progress bar',
|
|
builder: (context) {
|
|
return IosPreview(
|
|
stretch: true,
|
|
padding: const EdgeInsets.all(AppSpacing.s4),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
|
children: [
|
|
AppProgressBar(
|
|
value: knobDouble(context, label: 'Value', initialValue: 0.42),
|
|
color: knobTint(context),
|
|
height: knobDouble(context, label: 'Height', initialValue: 4, min: 2, max: 12),
|
|
),
|
|
const SizedBox(height: AppSpacing.s4),
|
|
const AppProgressBar(value: 0.15, color: AppColors.systemRed),
|
|
const SizedBox(height: AppSpacing.s4),
|
|
const AppProgressBar(value: 1, color: AppColors.systemGreen),
|
|
],
|
|
),
|
|
);
|
|
},
|
|
),
|
|
],
|
|
);
|
|
}
|