123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- import 'package:flutter/material.dart';
- class TabButtonGroup extends StatefulWidget {
- const TabButtonGroup(
- this.tabButtonList, {
- this.margin = const EdgeInsets.only(right: 8),
- Key? key,
- }) : super(key: key);
- final List<Widget>? tabButtonList;
- final EdgeInsetsGeometry? margin;
- @override
- State<TabButtonGroup> createState() => _TabButtonGroupState();
- }
- class _TabButtonGroupState extends State<TabButtonGroup> {
- @override
- Widget build(BuildContext context) {
- return Column(
- children: [
- Container(
- color: const Color.fromRGBO(238, 238, 238, 1),
- child: Flex(
- direction: Axis.horizontal,
- mainAxisAlignment: MainAxisAlignment.start,
- children: [
- Container(
- height: 40,
- alignment: Alignment.center,
- margin: widget.margin,
- child: MouseRegion(
- cursor: SystemMouseCursors.click,
- child: Row(
- children: widget.tabButtonList ?? [],
- ),
- ),
- ),
- ],
- ),
- ),
- SizedBox(
- height: 4,
- child: Container(
- height: 4,
- decoration: BoxDecoration(color: Theme.of(context).primaryColor),
- ),
- )
- ],
- );
- }
- }
|