Disable Or Override Back Button
Complete Code For In Disable Or Override Back Button Flutter
main.dart
import 'package:flutter/material.dart'; void main(){ runApp(MyApp()); } class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( debugShowCheckedModeBanner: false, home: MyHomePage(), ); } } class MyHomePage extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( backgroundColor: Colors.lightGreen, title: Text('No Back Button'), ), body: WillPopScope( onWillPop: () async { Future.value( false); }, child: Center( child: Text('Back Button dont work on this Screen'), ), ), ); } }