Skip to content

Commit

Permalink
Fixed scroll offset for color selection
Browse files Browse the repository at this point in the history
  • Loading branch information
Maurice Hennig committed Oct 12, 2021
1 parent 17c77ef commit 944e7b7
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions lib/areas/schedule/widgets/schedule_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,22 @@ class ScheduleListState extends State<ScheduleList>
builder: (context) => CupertinoAlertDialog(
title: const Text("Farbe wählen"),
content: BlockPicker(
layoutBuilder: (context, colors, child) =>
SizedBox(
height: 365,
width: 300,
child: GridView.count(
controller: ScrollController(
initialScrollOffset: 30),
crossAxisCount: 4,
crossAxisSpacing: 5.0,
mainAxisSpacing: 5.0,
children: colors
.map(
(Color color) => child(color))
.toList(),
),
),
availableColors: const [
Colors.red,
Colors.pink,
Expand Down

0 comments on commit 944e7b7

Please sign in to comment.