Skip to content
This repository has been archived by the owner on Aug 7, 2024. It is now read-only.

Commit

Permalink
Preparing Windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
ilovelinux committed Jun 29, 2022
1 parent 0babf1a commit e5e7ad2
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 5 deletions.
11 changes: 11 additions & 0 deletions lib/screens/booking/booking.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import 'dart:io';
import 'dart:ui';

import 'package:collection/collection.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
Expand Down Expand Up @@ -30,6 +33,14 @@ const double _separatorWidth = 20;
const double _height = 60;
const double _margin = 6;

class DragWithTouchAndMouse extends MaterialScrollBehavior {
@override
Set<PointerDeviceKind> get dragDevices => {
PointerDeviceKind.touch,
PointerDeviceKind.mouse,
};
}

class BookingPage extends StatelessWidget {
final Hall hall;

Expand Down
16 changes: 11 additions & 5 deletions lib/screens/booking/booking_table.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,15 @@ class _BookingTable extends StatelessWidget {
),
child: BlocProvider(
create: (context) => BookingTableCubit(),
child: Column(
children: [
Expanded(child: _TimeTable(slots.withSeparators, bookingsPerSeats)),
_BookingButton(),
],
child: ScrollConfiguration(
behavior: DragWithTouchAndMouse(),
child: Column(
children: [
Expanded(
child: _TimeTable(slots.withSeparators, bookingsPerSeats)),
_BookingButton(),
],
),
),
),
);
Expand Down Expand Up @@ -97,6 +101,8 @@ class _TimeTable extends StatelessWidget {
seat: bookingsPerSeats.seats[index],
bookedSlots: bookingsOfTheDay[index + 1],
),
horizontalScrollbarStyle:
Platform.isWindows ? const ScrollbarStyle(isAlwaysShown: true) : null,
);
}

Expand Down
Binary file modified windows/runner/resources/app_icon.ico
Binary file not shown.

0 comments on commit e5e7ad2

Please sign in to comment.