Updated popups in views
This commit is contained in:
@@ -3,6 +3,7 @@ import 'package:intl/intl.dart';
|
|||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:tallee/core/adaptive_page_route.dart';
|
import 'package:tallee/core/adaptive_page_route.dart';
|
||||||
import 'package:tallee/core/custom_theme.dart';
|
import 'package:tallee/core/custom_theme.dart';
|
||||||
|
import 'package:tallee/core/enums.dart';
|
||||||
import 'package:tallee/data/db/database.dart';
|
import 'package:tallee/data/db/database.dart';
|
||||||
import 'package:tallee/data/models/group.dart';
|
import 'package:tallee/data/models/group.dart';
|
||||||
import 'package:tallee/data/models/match.dart';
|
import 'package:tallee/data/models/match.dart';
|
||||||
@@ -10,10 +11,10 @@ import 'package:tallee/data/models/player.dart';
|
|||||||
import 'package:tallee/l10n/generated/app_localizations.dart';
|
import 'package:tallee/l10n/generated/app_localizations.dart';
|
||||||
import 'package:tallee/presentation/views/main_menu/group_view/create_group_view.dart';
|
import 'package:tallee/presentation/views/main_menu/group_view/create_group_view.dart';
|
||||||
import 'package:tallee/presentation/widgets/app_skeleton.dart';
|
import 'package:tallee/presentation/widgets/app_skeleton.dart';
|
||||||
import 'package:tallee/presentation/widgets/buttons/animated_dialog_button.dart';
|
|
||||||
import 'package:tallee/presentation/widgets/buttons/main_menu_button.dart';
|
import 'package:tallee/presentation/widgets/buttons/main_menu_button.dart';
|
||||||
import 'package:tallee/presentation/widgets/colored_icon_container.dart';
|
import 'package:tallee/presentation/widgets/colored_icon_container.dart';
|
||||||
import 'package:tallee/presentation/widgets/custom_alert_dialog.dart';
|
import 'package:tallee/presentation/widgets/dialog/custom_alert_dialog.dart';
|
||||||
|
import 'package:tallee/presentation/widgets/dialog/custom_dialog_action.dart';
|
||||||
import 'package:tallee/presentation/widgets/tiles/info_tile.dart';
|
import 'package:tallee/presentation/widgets/tiles/info_tile.dart';
|
||||||
import 'package:tallee/presentation/widgets/tiles/text_icon_tile.dart';
|
import 'package:tallee/presentation/widgets/tiles/text_icon_tile.dart';
|
||||||
|
|
||||||
@@ -70,23 +71,16 @@ class _GroupDetailViewState extends State<GroupDetailView> {
|
|||||||
context: context,
|
context: context,
|
||||||
builder: (context) => CustomAlertDialog(
|
builder: (context) => CustomAlertDialog(
|
||||||
title: '${loc.delete_group}?',
|
title: '${loc.delete_group}?',
|
||||||
content: loc.this_cannot_be_undone,
|
content: Text(loc.this_cannot_be_undone),
|
||||||
actions: [
|
actions: [
|
||||||
AnimatedDialogButton(
|
CustomDialogAction(
|
||||||
onPressed: () => Navigator.of(context).pop(false),
|
|
||||||
child: Text(
|
|
||||||
loc.cancel,
|
|
||||||
style: const TextStyle(color: CustomTheme.textColor),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
AnimatedDialogButton(
|
|
||||||
onPressed: () => Navigator.of(context).pop(true),
|
onPressed: () => Navigator.of(context).pop(true),
|
||||||
child: Text(
|
text: loc.delete,
|
||||||
loc.delete,
|
),
|
||||||
style: const TextStyle(
|
CustomDialogAction(
|
||||||
color: CustomTheme.secondaryColor,
|
onPressed: () => Navigator.of(context).pop(false),
|
||||||
),
|
buttonType: ButtonType.secondary,
|
||||||
),
|
text: loc.cancel,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -4,15 +4,16 @@ import 'package:provider/provider.dart';
|
|||||||
import 'package:tallee/core/adaptive_page_route.dart';
|
import 'package:tallee/core/adaptive_page_route.dart';
|
||||||
import 'package:tallee/core/common.dart';
|
import 'package:tallee/core/common.dart';
|
||||||
import 'package:tallee/core/custom_theme.dart';
|
import 'package:tallee/core/custom_theme.dart';
|
||||||
|
import 'package:tallee/core/enums.dart';
|
||||||
import 'package:tallee/data/db/database.dart';
|
import 'package:tallee/data/db/database.dart';
|
||||||
import 'package:tallee/data/models/match.dart';
|
import 'package:tallee/data/models/match.dart';
|
||||||
import 'package:tallee/l10n/generated/app_localizations.dart';
|
import 'package:tallee/l10n/generated/app_localizations.dart';
|
||||||
import 'package:tallee/presentation/views/main_menu/match_view/create_match/create_match_view.dart';
|
import 'package:tallee/presentation/views/main_menu/match_view/create_match/create_match_view.dart';
|
||||||
import 'package:tallee/presentation/views/main_menu/match_view/match_result_view.dart';
|
import 'package:tallee/presentation/views/main_menu/match_view/match_result_view.dart';
|
||||||
import 'package:tallee/presentation/widgets/buttons/animated_dialog_button.dart';
|
|
||||||
import 'package:tallee/presentation/widgets/buttons/main_menu_button.dart';
|
import 'package:tallee/presentation/widgets/buttons/main_menu_button.dart';
|
||||||
import 'package:tallee/presentation/widgets/colored_icon_container.dart';
|
import 'package:tallee/presentation/widgets/colored_icon_container.dart';
|
||||||
import 'package:tallee/presentation/widgets/custom_alert_dialog.dart';
|
import 'package:tallee/presentation/widgets/dialog/custom_alert_dialog.dart';
|
||||||
|
import 'package:tallee/presentation/widgets/dialog/custom_dialog_action.dart';
|
||||||
import 'package:tallee/presentation/widgets/tiles/info_tile.dart';
|
import 'package:tallee/presentation/widgets/tiles/info_tile.dart';
|
||||||
import 'package:tallee/presentation/widgets/tiles/text_icon_tile.dart';
|
import 'package:tallee/presentation/widgets/tiles/text_icon_tile.dart';
|
||||||
|
|
||||||
@@ -64,23 +65,16 @@ class _MatchDetailViewState extends State<MatchDetailView> {
|
|||||||
context: context,
|
context: context,
|
||||||
builder: (context) => CustomAlertDialog(
|
builder: (context) => CustomAlertDialog(
|
||||||
title: '${loc.delete_match}?',
|
title: '${loc.delete_match}?',
|
||||||
content: loc.this_cannot_be_undone,
|
content: Text(loc.this_cannot_be_undone),
|
||||||
actions: [
|
actions: [
|
||||||
AnimatedDialogButton(
|
CustomDialogAction(
|
||||||
onPressed: () => Navigator.of(context).pop(false),
|
|
||||||
child: Text(
|
|
||||||
loc.cancel,
|
|
||||||
style: const TextStyle(color: CustomTheme.textColor),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
AnimatedDialogButton(
|
|
||||||
onPressed: () => Navigator.of(context).pop(true),
|
onPressed: () => Navigator.of(context).pop(true),
|
||||||
child: Text(
|
text: loc.delete,
|
||||||
loc.delete,
|
),
|
||||||
style: const TextStyle(
|
CustomDialogAction(
|
||||||
color: CustomTheme.secondaryColor,
|
onPressed: () => Navigator.of(context).pop(false),
|
||||||
),
|
buttonType: ButtonType.secondary,
|
||||||
),
|
text: loc.cancel,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ import 'package:tallee/core/custom_theme.dart';
|
|||||||
import 'package:tallee/core/enums.dart';
|
import 'package:tallee/core/enums.dart';
|
||||||
import 'package:tallee/l10n/generated/app_localizations.dart';
|
import 'package:tallee/l10n/generated/app_localizations.dart';
|
||||||
import 'package:tallee/presentation/views/main_menu/settings_view/licenses_view.dart';
|
import 'package:tallee/presentation/views/main_menu/settings_view/licenses_view.dart';
|
||||||
import 'package:tallee/presentation/widgets/buttons/animated_dialog_button.dart';
|
import 'package:tallee/presentation/widgets/dialog/custom_alert_dialog.dart';
|
||||||
import 'package:tallee/presentation/widgets/custom_alert_dialog.dart';
|
import 'package:tallee/presentation/widgets/dialog/custom_dialog_action.dart';
|
||||||
import 'package:tallee/presentation/widgets/tiles/settings_list_tile.dart';
|
import 'package:tallee/presentation/widgets/tiles/settings_list_tile.dart';
|
||||||
import 'package:tallee/services/data_transfer_service.dart';
|
import 'package:tallee/services/data_transfer_service.dart';
|
||||||
import 'package:url_launcher/url_launcher.dart';
|
import 'package:url_launcher/url_launcher.dart';
|
||||||
@@ -122,25 +122,16 @@ class _SettingsViewState extends State<SettingsView> {
|
|||||||
context: context,
|
context: context,
|
||||||
builder: (context) => CustomAlertDialog(
|
builder: (context) => CustomAlertDialog(
|
||||||
title: '${loc.delete_all_data}?',
|
title: '${loc.delete_all_data}?',
|
||||||
content: loc.this_cannot_be_undone,
|
content: Text(loc.this_cannot_be_undone),
|
||||||
actions: [
|
actions: [
|
||||||
AnimatedDialogButton(
|
CustomDialogAction(
|
||||||
onPressed: () => Navigator.of(context).pop(false),
|
|
||||||
child: Text(
|
|
||||||
loc.cancel,
|
|
||||||
style: const TextStyle(
|
|
||||||
color: CustomTheme.textColor,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
AnimatedDialogButton(
|
|
||||||
onPressed: () => Navigator.of(context).pop(true),
|
onPressed: () => Navigator.of(context).pop(true),
|
||||||
child: Text(
|
text: loc.delete,
|
||||||
loc.delete,
|
),
|
||||||
style: const TextStyle(
|
CustomDialogAction(
|
||||||
color: CustomTheme.secondaryColor,
|
onPressed: () => Navigator.of(context).pop(false),
|
||||||
),
|
buttonType: ButtonType.secondary,
|
||||||
),
|
text: loc.cancel,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user