import 'package:flutter/material.dart' show TextButton, Theme; import 'package:flutter/widgets.dart'; class EditDialogTitle extends StatelessWidget { const EditDialogTitle({ super.key, this.onDeletePressed, required this.dialogType, }); final VoidCallback? onDeletePressed; final DialogType dialogType; @override Widget build(BuildContext context) { return Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ // TODO: Localize if (dialogType == DialogType.bookmark) Text('Create Bookmark') else Text('Create Collection'), if (onDeletePressed != null) TextButton( onPressed: () { onDeletePressed!.call(); Navigator.of(context).pop(); }, child: Text( 'Delete', style: TextStyle(color: Theme.of(context).colorScheme.error), ), ), ], ); } } enum DialogType { bookmark, collection }