back_handler 1.0.4 copy "back_handler: ^1.0.4" to clipboard
back_handler: ^1.0.4 copied to clipboard

A Flutter plugin that provides double-tap back button functionality to exit the app with customizable toast messages, custom widgets, and flexible callbacks.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'src/config/constants.dart';
import 'src/config/router.dart';
import 'src/config/theme.dart';
import 'src/screens/home_screen.dart';

void main() {
  runApp(const BackHandlerExampleApp());
}

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: AppConstants.appTitle,
      theme: AppTheme.lightTheme,
      onGenerateRoute: AppRouter.generateRoute,
      home: const HomeScreen(),
    );
  }
}
2
likes
160
points
26
downloads

Publisher

verified publishersuryabasak.com

Weekly Downloads

A Flutter plugin that provides double-tap back button functionality to exit the app with customizable toast messages, custom widgets, and flexible callbacks.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on back_handler

Packages that implement back_handler