mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-10-02 22:26:52 +02:00
refactor(ui): consolidate file feedback and shared display helpers
This commit is contained in:
1 parent
c5789df87d
commit
377710ec22
17 files changed
+77
-164
No files matched your search
@@ -1,7 +1,19 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:spotiflac_android/l10n/l10n.dart';
|
||||
import 'package:spotiflac_android/theme/mornye_theme.dart';
|
||||
import 'package:spotiflac_android/widgets/mornye_chrome.dart';
|
||||
|
||||
/// Reports a failure to open a local file with a plain Material snackbar.
|
||||
void showCannotOpenFileSnackBar(BuildContext context, Object error) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(
|
||||
context.l10n.snackbarCannotOpenFile(context.friendlyError(error)),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/// Transient messages use the same glass as confirmation dialogs in Mornye.
|
||||
ScaffoldFeatureController<SnackBar, SnackBarClosedReason> showAppSnackBar(
|
||||
BuildContext context, {
|
||||
|
||||
Reference in new issue
Block a user