mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-15 10:15:58 -07:00
feat: UI 2.0 and other Improvements (#357)
Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
parent
9ca06eaa37
commit
e7b5bb40ff
169 changed files with 4584 additions and 3626 deletions
43
lib/screens/settings/widgets/settings_list_group.dart
Normal file
43
lib/screens/settings/widgets/settings_list_group.dart
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:dynamic_color/dynamic_color.dart';
|
||||
|
||||
List<Widget> settingsListGroup(BuildContext context, Widget label, List<Widget> children) {
|
||||
final radius = BorderRadius.circular(24);
|
||||
final radiusSmall = const Radius.circular(6);
|
||||
final color = Theme.of(context).colorScheme.surfaceContainerLow.harmonizeWith(Colors.red);
|
||||
return [
|
||||
Card(
|
||||
elevation: 0,
|
||||
margin: const EdgeInsets.symmetric(horizontal: 4, vertical: 1),
|
||||
color: color,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: radius.copyWith(
|
||||
bottomLeft: radiusSmall,
|
||||
bottomRight: radiusSmall,
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 4.0),
|
||||
child: label,
|
||||
),
|
||||
),
|
||||
...children.map(
|
||||
(e) {
|
||||
return Card(
|
||||
elevation: 0,
|
||||
color: color,
|
||||
margin: const EdgeInsets.symmetric(horizontal: 4, vertical: 1),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: radius.copyWith(
|
||||
topLeft: radiusSmall,
|
||||
topRight: radiusSmall,
|
||||
bottomLeft: e != children.last ? radiusSmall : null,
|
||||
bottomRight: e != children.last ? radiusSmall : null,
|
||||
)),
|
||||
child: e,
|
||||
);
|
||||
},
|
||||
)
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue