From 6c8251cf348e6c172b7c2836b9a86374003eaf72 Mon Sep 17 00:00:00 2001 From: miakh <2659269+miakh@users.noreply.github.com> Date: Fri, 1 Nov 2024 01:07:53 +0100 Subject: [PATCH 1/2] context fix --- lib/components/dataGrid/DataGridHelper.dart | 4 ++-- lib/pages/AdministrationPage.dart | 2 +- lib/pages/UserPage.dart | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/components/dataGrid/DataGridHelper.dart b/lib/components/dataGrid/DataGridHelper.dart index 1d110e68..f379694b 100644 --- a/lib/components/dataGrid/DataGridHelper.dart +++ b/lib/components/dataGrid/DataGridHelper.dart @@ -49,9 +49,9 @@ class DataGridHelper }, );} - static Widget mapIconRenderer(rendererContext, List icons) { + static Widget mapIconRenderer(BuildContext context, rendererContext, List icons) { int? value = rendererContext.cell.value; - return iconToRow(rendererContext, value, icons); + return iconToRow(context, value, icons); } static Widget iconToRow(BuildContext context, int? id, List icons) { diff --git a/lib/pages/AdministrationPage.dart b/lib/pages/AdministrationPage.dart index c77ff705..1a6a2bca 100644 --- a/lib/pages/AdministrationPage.dart +++ b/lib/pages/AdministrationPage.dart @@ -446,7 +446,7 @@ class _AdministrationPageState extends State with SingleTick type: PlutoColumnType.select(mapIcons, builder: (icon) { return DataGridHelper.iconToRow(context, icon, svgIcons); }), - renderer: (rendererContext) => DataGridHelper.mapIconRenderer(rendererContext, svgIcons), + renderer: (rendererContext) => DataGridHelper.mapIconRenderer(context, rendererContext, svgIcons), ), PlutoColumn( width: 150, diff --git a/lib/pages/UserPage.dart b/lib/pages/UserPage.dart index 1758d9fc..e0bb7223 100644 --- a/lib/pages/UserPage.dart +++ b/lib/pages/UserPage.dart @@ -393,7 +393,7 @@ class _UserPageState extends State { ).tr(), )), const SizedBox( - height: 16, + height: 8, ), Container( alignment: Alignment.topCenter, From b954974c1bed81741fb0a6a3cde601ddc283421e Mon Sep 17 00:00:00 2001 From: miakh <2659269+miakh@users.noreply.github.com> Date: Fri, 1 Nov 2024 01:16:14 +0100 Subject: [PATCH 2/2] install button fix --- lib/pages/SettingsPage.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pages/SettingsPage.dart b/lib/pages/SettingsPage.dart index d8cb2582..fb0e26ae 100644 --- a/lib/pages/SettingsPage.dart +++ b/lib/pages/SettingsPage.dart @@ -191,7 +191,7 @@ class _SettingsPageState extends State { context: context, label: "Install App".tr(), onPressed: _canInstallPWA ? handleInstallButtonPress : null, - color: _canInstallPWA ? ThemeConfig.seed1 : Colors.grey, + color: _canInstallPWA ? ThemeConfig.blackColor(context) : Colors.grey, textColor: Colors.white, ), if (!_isPlatformSupported) @@ -208,7 +208,7 @@ class _SettingsPageState extends State { padding: const EdgeInsets.only(top: 8.0), child: Text( "The app is already installed.", - style: TextStyle(fontSize: 16, color: ThemeConfig.seed1), + style: TextStyle(fontSize: 16, color: ThemeConfig.blackColor(context)), textAlign: TextAlign.center, ).tr(), ),