added cargo files
This commit is contained in:
44
PinePods-0.8.2/mobile/lib/ui/widgets/search_slide_route.dart
Normal file
44
PinePods-0.8.2/mobile/lib/ui/widgets/search_slide_route.dart
Normal file
@@ -0,0 +1,44 @@
|
||||
// Copyright 2020 Ben Hills and the project contributors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// A transitioning route that slides the child in from the
|
||||
/// right.
|
||||
class SlideRightRoute extends PageRouteBuilder<void> {
|
||||
final Widget widget;
|
||||
|
||||
@override
|
||||
final RouteSettings settings;
|
||||
|
||||
SlideRightRoute({
|
||||
required this.widget,
|
||||
required this.settings,
|
||||
}) : super(
|
||||
pageBuilder: (
|
||||
BuildContext context,
|
||||
Animation<double> animation,
|
||||
Animation<double> secondaryAnimation,
|
||||
) {
|
||||
return widget;
|
||||
},
|
||||
settings: settings,
|
||||
transitionsBuilder: (
|
||||
BuildContext context,
|
||||
Animation<double> animation,
|
||||
Animation<double> secondaryAnimation,
|
||||
Widget child,
|
||||
) {
|
||||
return SlideTransition(
|
||||
position: Tween<Offset>(
|
||||
begin: const Offset(
|
||||
1.0,
|
||||
0.0,
|
||||
),
|
||||
end: Offset.zero,
|
||||
).animate(animation),
|
||||
child: child,
|
||||
);
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user