Refactor: Reduce .of(context) calls theme
Signed commit
This commit is contained in:
parent
a928ecec1e
commit
5d2aaef3ca
69 changed files with 525 additions and 501 deletions
|
|
@ -66,6 +66,8 @@ class SendFileDialogState extends State<SendFileDialog> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final theme = Theme.of(context);
|
||||
|
||||
var sendStr = L10n.of(context)!.sendFile;
|
||||
final allFilesAreImages =
|
||||
widget.files.every((file) => file is MatrixImageFile);
|
||||
|
|
@ -91,9 +93,8 @@ class SendFileDialogState extends State<SendFileDialog> {
|
|||
Flexible(
|
||||
child: Material(
|
||||
borderRadius: BorderRadius.circular(AppConfig.borderRadius),
|
||||
elevation:
|
||||
Theme.of(context).appBarTheme.scrolledUnderElevation ?? 4,
|
||||
shadowColor: Theme.of(context).appBarTheme.shadowColor,
|
||||
elevation: theme.appBarTheme.scrolledUnderElevation ?? 4,
|
||||
shadowColor: theme.appBarTheme.shadowColor,
|
||||
clipBehavior: Clip.hardEdge,
|
||||
child: Image.memory(
|
||||
widget.files.first.bytes,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue