anchor.diff:  import 'package:flutter/material.dart';
   
  -class ResponsiveDialog extends StatelessWidget {
  +class ResponsiveDialog extends StatefulWidget {
     final Widget? title;
     final Widget child;
     final List<Widget> actions;
  
positive.code:       : super(key: key);
  
    @override
    Widget build(BuildContext context) =>
        LayoutBuilder(builder: ((context, constraints) {
          if (constraints.maxWidth < 540) {
  
negative.code:               insetPadding: const EdgeInsets.all(0),
                child: Scaffold(
                  appBar: AppBar(
                    title: widget.title,
                    actions: widget.actions,
                    leading: BackButton(
                      onPressed: () {
                        widget.onCancel?.call();
                        Navigator.of(context).pop();
                      },
                    ),
                  ),
                  body: SingleChildScrollView(
                    padding: const EdgeInsets.all(18.0),
                    child: Container(key: _childKey, child: widget.child),
                  ),
                ));
          } else {
            // Dialog
            return AlertDialog(
              insetPadding: EdgeInsets.zero,
              title: widget.title,
              scrollable: true,
              content: SizedBox(
                width: 380,
                child: Container(key: _childKey, child: widget.child),
              ),
              actions: [
                TextButton(
                  child: const Text('Cancel'),
                  onPressed: () {
                    widget.onCancel?.call();
                    Navigator.of(context).pop();
                  },
                ),
                ...widget.actions
              ],
            );
          }
  