ui_kit/example/lib/button_section.dart
2025-05-26 16:49:14 +03:00

36 lines
968 B
Dart

import 'package:flutter/material.dart';
import 'package:ui_kit/ui_kit.dart';
class ButtonSection extends StatefulWidget {
const ButtonSection({super.key});
@override
State<ButtonSection> createState() => _ButtonSectionState();
}
class _ButtonSectionState extends State<ButtonSection> {
static final buttonList = ['flat', 'inactive', 'solid', 'ghost'];
@override
Widget build(BuildContext context) {
return SizedBox(
width: width(context) * 100,
height: height(context) * 40,
child: ListView.builder(
itemCount: buttonList.length,
itemBuilder: (BuildContext context, int index) {
final currentItem = buttonList[index];
return Container(
margin: EdgeInsets.only(bottom: 10),
child: ButtonWidget(
onPressed: () {},
label: 'Подтвердить',
variant: currentItem,
),
);
},
),
);
}
}