Last updated:
0 purchases
hyper transition
hyper_transition #
HyperOS/MIUI Like PageTransitions
Getting started #
dependencies:
flutter:
sdk: flutter
# add window_rounded_corners
window_rounded_corners: ^{latest version}
# add hyper_transition
hyper_transition: ^{latest version}
copied to clipboard
Usage #
class HyperApp extends StatelessWidget {
const HyperApp({super.key});
@override
Widget build(BuildContext context) {
// required !
WindowCorners.init();
return MaterialApp.router(
title: 'Hyper Transition',
theme: ThemeData(
colorScheme:
ColorScheme.fromSeed(seedColor: Colors.blueGrey.shade100),
useMaterial3: true,
appBarTheme: const AppBarTheme(centerTitle: true),
pageTransitionsTheme: const PageTransitionsTheme(
builders: <TargetPlatform, PageTransitionsBuilder>{
TargetPlatform.android: HyperSnapshotTransitionsBuilder(),
TargetPlatform.iOS: CupertinoPageTransitionsBuilder(),
TargetPlatform.macOS: CupertinoPageTransitionsBuilder(),
},
),
),
routerConfig: appRouter);
}
}
copied to clipboard
HyperSnapshotPageTransition #
Using SnapshotWidget to improve smoothness. But during the transition, the animation in the screen will be frozen. refer to ZoomPageTransitionsBuilder
HyperSnapshotTransitionsBuilder(allowSnapshotting: true,allowEnterRouteSnapshotting: true)
HyperSnapshotPageTransition(
animation: animation,
secondaryAnimation: secondaryAnimation,
allowSnapshotting: true,
allowEnterRouteSnapshotting: true,
child: child
)
copied to clipboard
HyperPageTransition #
Using Animation Widgets to achieve effects
HyperTransitionsBuilder()
HyperPageTransition(
animation: animation,
secondaryAnimation: secondaryAnimation,
child: child
)
copied to clipboard
Screenshot #
HyperSnapshotPageTransition #
allowSnapshotting: true
allowEnterRouteSnapshotting: true
HyperPageTransition #
Android - HyperOS #
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.