Skip to content

Commit

Permalink
Merge pull request #29 from ezeanyimhenry/ui/translate-screen
Browse files Browse the repository at this point in the history
passed readContent getter instead of message getter
  • Loading branch information
ezeanyimhenry authored Jul 31, 2024
2 parents 83b0f6a + 602cbb8 commit d517ff5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/notifier/nfc_notifier.dart
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class NFCNotifier extends ChangeNotifier {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => TranslateScreen(message: message),
builder: (context) => TranslateScreen(message: readContent),
),
);
},
Expand Down
6 changes: 3 additions & 3 deletions lib/presentation/screens/read-nfc/read_nfc_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class _ReadNFCScreenState extends State<ReadNFCScreen> {
if (provider.readContent.isNotEmpty) {
WidgetsBinding.instance.addPostFrameCallback((_) {
Navigator.pop(context); // Close the previous bottom sheet
_showSuccessBottomSheet(context, provider.message);
_showSuccessBottomSheet(context, provider.readContent);
});
}
return const SizedBox();
Expand Down Expand Up @@ -170,7 +170,7 @@ class _ReadNFCScreenState extends State<ReadNFCScreen> {
);
}

void _showSuccessBottomSheet(BuildContext context, String message) {
void _showSuccessBottomSheet(BuildContext context, String readContent) {
showModalBottomSheet(
isDismissible: false,
context: context,
Expand All @@ -184,7 +184,7 @@ class _ReadNFCScreenState extends State<ReadNFCScreen> {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => TranslateScreen(message: message),
builder: (context) => TranslateScreen(message: readContent),
),
);
},
Expand Down
2 changes: 1 addition & 1 deletion lib/presentation/screens/write-nfc/text_record_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ class _TextRecordScreenState extends State<TextRecordScreen> {
context,
MaterialPageRoute(
builder: (txt) => TranslateScreen(
message: provider.message)));
message: provider.readContent)));
},
message: "Make sure your device is well placed.",
title: "Scan Successful!",
Expand Down

0 comments on commit d517ff5

Please sign in to comment.