Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed Cancel text #200

Merged
merged 1 commit into from
Jun 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class ExtensionLanguageFilterDialog extends ConsumerWidget {
},
),
),
actions: const [PopButton()],
actions: [PopButton(popText: context.l10n!.close)],
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class SourceLanguageFilter extends ConsumerWidget {
},
),
),
actions: const [PopButton()],
actions: [PopButton(popText: context.l10n!.close)],
);
}
}
3 changes: 1 addition & 2 deletions lib/src/widgets/pop_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';

import '../utils/extensions/custom_extensions.dart';

Expand All @@ -15,7 +14,7 @@ class PopButton extends StatelessWidget {
@override
Widget build(BuildContext context) {
return TextButton(
onPressed: () => context.pop(),
onPressed: () => Navigator.pop(context),
child: Text(popText ?? context.l10n!.cancel),
);
}
Expand Down
8 changes: 4 additions & 4 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -497,10 +497,10 @@ packages:
dependency: "direct main"
description:
name: go_router
sha256: d687b6129476c92bd75244b8dfc1bb56f9a287ab3d51cdf0baf570afeb923c51
sha256: da08429b5c1026cc78bd60c60bfff34f0b273b29feddeab00d3f5b56fb6f35ed
url: "https://pub.dev"
source: hosted
version: "8.0.3"
version: "8.0.5"
go_router_builder:
dependency: "direct dev"
description:
Expand Down Expand Up @@ -1222,10 +1222,10 @@ packages:
dependency: transitive
description:
name: url_launcher_platform_interface
sha256: "6c9ca697a5ae218ce56cece69d46128169a58aa8653c1b01d26fcd4aad8c4370"
sha256: bfdfa402f1f3298637d71ca8ecfe840b4696698213d5346e9d12d4ab647ee2ea
url: "https://pub.dev"
source: hosted
version: "2.1.2"
version: "2.1.3"
url_launcher_web:
dependency: transitive
description:
Expand Down