drawer: Only show feedback menu item when platform is Android or iOS
Because flutter_email_sender v5.0.2 is only support Android and iOS.
This commit is contained in:
parent
de9620a55c
commit
d0507f6dbc
|
@ -59,7 +59,7 @@ class AboutPage extends StatelessWidget {
|
|||
if (!data.hasData) {
|
||||
_version = '';
|
||||
} else {
|
||||
final packageInfo = data.data!;
|
||||
final PackageInfo packageInfo = data.data!;
|
||||
if (Platform.isWindows) {
|
||||
_version = packageInfo.version; // TODO
|
||||
|
||||
|
@ -139,9 +139,7 @@ class AboutPage extends StatelessWidget {
|
|||
Future<void> _launchFeedback() async {
|
||||
String? locale = "en_US";
|
||||
|
||||
if (!Platform.isWindows) {
|
||||
locale = await Devicelocale.currentLocale;
|
||||
}
|
||||
locale = await Devicelocale.currentLocale;
|
||||
|
||||
debugPrint("$_tag local = $locale");
|
||||
if (locale != null && locale.startsWith("zh_")) {
|
||||
|
|
|
@ -173,13 +173,14 @@ class _HomeState extends State<Home> with TickerProviderStateMixin {
|
|||
groupValue: _drawerIndex,
|
||||
onChanged: _changeIndex,
|
||||
),
|
||||
CustomDrawerItem<_DrawerIndex>(
|
||||
value: _DrawerIndex.feedback,
|
||||
title: S.of(context).feedback,
|
||||
icon: const Icon(FluentIcons.chat_warning_24_regular),
|
||||
groupValue: _drawerIndex,
|
||||
onChanged: _changeIndex,
|
||||
),
|
||||
if (Platform.isAndroid || Platform.isIOS)
|
||||
CustomDrawerItem<_DrawerIndex>(
|
||||
value: _DrawerIndex.feedback,
|
||||
title: S.of(context).feedback,
|
||||
icon: const Icon(FluentIcons.chat_warning_24_regular),
|
||||
groupValue: _drawerIndex,
|
||||
onChanged: _changeIndex,
|
||||
),
|
||||
CustomDrawerItem<_DrawerIndex>(
|
||||
value: _DrawerIndex.Help,
|
||||
title: S.of(context).help,
|
||||
|
|
Loading…
Reference in New Issue