|
|
|
@ -1,5 +1,8 @@
|
|
|
|
|
import 'dart:io'; |
|
|
|
|
|
|
|
|
|
import 'package:fluent_ui/fluent_ui.dart' as f; |
|
|
|
|
import 'package:flutter/cupertino.dart' as c; |
|
|
|
|
import 'package:flutter/gestures.dart'; |
|
|
|
|
import 'package:flutter/material.dart' as m; |
|
|
|
|
import 'package:flutter/services.dart'; |
|
|
|
|
import 'package:flutter/widgets.dart'; |
|
|
|
@ -59,6 +62,36 @@ Map<String, WidgetBuilder> get routes => {
|
|
|
|
|
}, |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
class DragFluentScrollBevahior extends f.FluentScrollBehavior { |
|
|
|
|
const DragFluentScrollBevahior(); |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Set<PointerDeviceKind> get dragDevices => { |
|
|
|
|
PointerDeviceKind.mouse, |
|
|
|
|
PointerDeviceKind.touch, |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
class DragCupertinoScrollBevahior extends c.CupertinoScrollBehavior { |
|
|
|
|
const DragCupertinoScrollBevahior(); |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Set<PointerDeviceKind> get dragDevices => { |
|
|
|
|
PointerDeviceKind.mouse, |
|
|
|
|
PointerDeviceKind.touch, |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
class DragMaterialScrollBevahior extends m.MaterialScrollBehavior { |
|
|
|
|
const DragMaterialScrollBevahior(); |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Set<PointerDeviceKind> get dragDevices => { |
|
|
|
|
PointerDeviceKind.mouse, |
|
|
|
|
PointerDeviceKind.touch, |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
class StartPoint extends ConsumerWidget { |
|
|
|
|
final String appTitle = 'Info Tren'; |
|
|
|
|
|
|
|
|
@ -83,6 +116,7 @@ class StartPoint extends ConsumerWidget {
|
|
|
|
|
// ), |
|
|
|
|
// ), |
|
|
|
|
), |
|
|
|
|
scrollBehavior: Platform.isLinux ? const DragCupertinoScrollBevahior() : null, |
|
|
|
|
routes: routes, |
|
|
|
|
), |
|
|
|
|
); |
|
|
|
@ -95,6 +129,7 @@ class StartPoint extends ConsumerWidget {
|
|
|
|
|
accentColor: f.Colors.blue, |
|
|
|
|
), |
|
|
|
|
routes: routes, |
|
|
|
|
scrollBehavior: Platform.isLinux ? const DragFluentScrollBevahior() : const f.FluentScrollBehavior(), |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
else { |
|
|
|
@ -110,6 +145,7 @@ class StartPoint extends ConsumerWidget {
|
|
|
|
|
useMaterial3: true, |
|
|
|
|
// fontFamily: 'Atkinson Hyperlegible', |
|
|
|
|
), |
|
|
|
|
scrollBehavior: Platform.isLinux ? const DragMaterialScrollBevahior() : null, |
|
|
|
|
routes: routes, |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|