mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 15:24:35 +01:00
- fix: pve text color - opt.: rm ssh tab appbar - opt.: ssh tab only display fab on `Add` page
29 lines
656 B
Dart
29 lines
656 B
Dart
import 'package:choice/selection.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
class ChoiceChipX<T> extends StatelessWidget {
|
|
const ChoiceChipX({
|
|
super.key,
|
|
required this.label,
|
|
required this.state,
|
|
required this.value,
|
|
});
|
|
|
|
final String label;
|
|
final ChoiceController<T> state;
|
|
final T value;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Padding(
|
|
padding: const EdgeInsets.symmetric(vertical: 3, horizontal: 3),
|
|
child: ChoiceChip(
|
|
label: Text(label),
|
|
side: BorderSide.none,
|
|
selected: state.selected(value),
|
|
onSelected: state.onSelected(value),
|
|
),
|
|
);
|
|
}
|
|
}
|