mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-04-23 23:39:12 +00:00
Added scrollbar
This commit is contained in:
parent
91e3ea44f6
commit
74a4f65924
1 changed files with 191 additions and 172 deletions
|
@ -1,3 +1,5 @@
|
|||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:timezone/timezone.dart' as tz;
|
||||
import 'package:timezone/data/latest.dart' as tz;
|
||||
|
@ -20,6 +22,8 @@ class BlockingScheduleModal extends StatefulWidget {
|
|||
}
|
||||
|
||||
class _BlockingScheduleModalState extends State<BlockingScheduleModal> {
|
||||
final _weekdaysScrollController = ScrollController();
|
||||
|
||||
String? _timezone;
|
||||
List<String> _weekdays = [];
|
||||
TimeOfDay? _from;
|
||||
|
@ -103,6 +107,8 @@ class _BlockingScheduleModalState extends State<BlockingScheduleModal> {
|
|||
: null;
|
||||
|
||||
return Dialog(
|
||||
child: ConstrainedBox(
|
||||
constraints: const BoxConstraints(maxWidth: 500),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(24),
|
||||
child: Column(
|
||||
|
@ -156,8 +162,18 @@ class _BlockingScheduleModalState extends State<BlockingScheduleModal> {
|
|||
),
|
||||
const SizedBox(height: 16),
|
||||
SizedBox(
|
||||
height: 50,
|
||||
height: Platform.isMacOS || Platform.isLinux || Platform.isWindows ? 66 : 50,
|
||||
child: Scrollbar(
|
||||
controller: _weekdaysScrollController,
|
||||
thumbVisibility: Platform.isMacOS || Platform.isLinux || Platform.isWindows,
|
||||
interactive: Platform.isMacOS || Platform.isLinux || Platform.isWindows,
|
||||
thickness: Platform.isMacOS || Platform.isLinux || Platform.isWindows ? 8 : 0,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(
|
||||
bottom: Platform.isMacOS || Platform.isLinux || Platform.isWindows ? 16 : 0
|
||||
),
|
||||
child: ListView(
|
||||
controller: _weekdaysScrollController,
|
||||
scrollDirection: Axis.horizontal,
|
||||
children: [
|
||||
FilterChip(
|
||||
|
@ -204,6 +220,8 @@ class _BlockingScheduleModalState extends State<BlockingScheduleModal> {
|
|||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
|
@ -291,6 +309,7 @@ class _BlockingScheduleModalState extends State<BlockingScheduleModal> {
|
|||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue