pop_scope_page_transitions 0.0.1 copy "pop_scope_page_transitions: ^0.0.1" to clipboard
pop_scope_page_transitions: ^0.0.1 copied to clipboard

Fix popscope sliding back failure, not just for iOS

Keeping the system's PopScope widget, is simpler and more efficient.

Features #

✅ You can use PopScope widget;

✅ Support for multiple platforms;

✅ It is the same as the default sideslip back. Takes effect only when a pop is triggered, otherwise it is cancelled;

demo.gif

Usage #

To use this package, add pop_scope_page_transitions as a dependency in your pubspec.yaml file.

example.

Example #

Import the library #

import 'package:pop_scope_page_transitions/pop_scope_page_transitions.dart';

Configure page transitions #


class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
        pageTransitionsTheme: const PageTransitionsTheme(
          builders: {
            // TargetPlatform.android: PopScopePageTransitionsBuilder(),
            TargetPlatform.iOS: PopScopePageTransitionsBuilder(),
          },
        ),
      ),
      routes: {
        '/': (context) => const HomePage(),
        '/second': (context) => const SecondPage(),
      },
    );
  }
}

And then, you can add PopScope widget in your view.

3
likes
150
points
16
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Fix popscope sliding back failure, not just for iOS

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter

More

Packages that depend on pop_scope_page_transitions