-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add ability to completely delete a tag
useful because right now tags are auto-detected when an entry is submitted, which means anything following a hashtag (i.e. things in URLs, etc) might be mistakenly detected as a tag
- Loading branch information
1 parent
42d2632
commit eda70c8
Showing
8 changed files
with
125 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:pret_a_porter/pret_a_porter.dart'; | ||
|
||
class ConfirmationModal extends StatelessWidget { | ||
final int count; | ||
|
||
const ConfirmationModal({super.key, required this.count}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return SizedBox( | ||
height: 300, | ||
child: Center( | ||
child: Column( | ||
mainAxisAlignment: MainAxisAlignment.center, | ||
children: [ | ||
Text( | ||
'Are you sure you want to delete this tag, and remove it from $count entries?', | ||
textAlign: TextAlign.center, | ||
), | ||
const Padding( | ||
padding: EdgeInsets.only( | ||
top: PretConfig.defaultElementSpacing, | ||
), | ||
), | ||
const Text( | ||
'Warning: this is an irreversible + highly destructive action!', | ||
textAlign: TextAlign.center, | ||
style: TextStyle(color: Colors.red)), | ||
const Padding( | ||
padding: EdgeInsets.only( | ||
top: PretConfig.defaultElementSpacing, | ||
), | ||
), | ||
Row( | ||
mainAxisAlignment: MainAxisAlignment.center, | ||
children: [ | ||
OutlinedButton( | ||
autofocus: true, | ||
child: const Text('Cancel'), | ||
onPressed: () => Navigator.pop(context, false), | ||
), | ||
const Padding( | ||
padding: EdgeInsets.only( | ||
left: PretConfig.defaultElementSpacing, | ||
), | ||
), | ||
OutlinedButton( | ||
style: const ButtonStyle( | ||
backgroundColor: MaterialStatePropertyAll(Colors.red), | ||
), | ||
onPressed: () => Navigator.pop(context, true), | ||
child: const Text('Delete'), | ||
) | ||
], | ||
) | ||
], | ||
), | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters