mirror of
https://github.com/Auties00/Reboot-Launcher.git
synced 2026-01-14 11:39:17 +01:00
Made build portable
This commit is contained in:
57
dependencies/fluent_ui-3.12.0/lib/src/navigation/route.dart
vendored
Normal file
57
dependencies/fluent_ui-3.12.0/lib/src/navigation/route.dart
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
import 'package:fluent_ui/fluent_ui.dart';
|
||||
|
||||
/// A modal route that replaces the entire screen.
|
||||
class FluentPageRoute<T> extends PageRoute<T> {
|
||||
late final WidgetBuilder _builder;
|
||||
// ignore: prefer_final_fields
|
||||
bool _maintainState = true;
|
||||
final String? _barrierLabel;
|
||||
|
||||
/// Creates a modal route that replaces the entire screen.
|
||||
FluentPageRoute({
|
||||
bool maintainState = true,
|
||||
String? barrierLabel,
|
||||
required WidgetBuilder builder,
|
||||
RouteSettings? settings,
|
||||
bool fullscreenDialog = false,
|
||||
}) : _maintainState = maintainState,
|
||||
_barrierLabel = barrierLabel,
|
||||
_builder = builder,
|
||||
super(
|
||||
settings: settings,
|
||||
fullscreenDialog: fullscreenDialog,
|
||||
);
|
||||
|
||||
@override
|
||||
Color? get barrierColor => null;
|
||||
|
||||
@override
|
||||
String? get barrierLabel => _barrierLabel;
|
||||
|
||||
@override
|
||||
Widget buildPage(
|
||||
BuildContext context,
|
||||
Animation<double> animation,
|
||||
Animation<double> secondaryAnimation,
|
||||
) {
|
||||
assert(debugCheckHasFluentTheme(context));
|
||||
final Widget result = _builder(context);
|
||||
return Semantics(
|
||||
scopesRoute: true,
|
||||
explicitChildNodes: true,
|
||||
child: DrillInPageTransition(
|
||||
animation: CurvedAnimation(
|
||||
parent: animation,
|
||||
curve: FluentTheme.of(context).animationCurve,
|
||||
),
|
||||
child: result,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
bool get maintainState => _maintainState;
|
||||
|
||||
@override
|
||||
Duration get transitionDuration => const Duration(milliseconds: 200);
|
||||
}
|
||||
Reference in New Issue
Block a user