fix: launch url on all platforms (#4797)

* fix: error handled launchUrl

* chore: update links to use new subdomain

* feat: show toast if onFailure is not provided
This commit is contained in:
Mathias Mogensen
2024-03-03 22:04:59 +01:00
committed by GitHub
parent 1fadb15351
commit 63464cbf2e
24 changed files with 180 additions and 153 deletions

View File

@ -1,9 +1,10 @@
import 'dart:io';
import 'package:appflowy/generated/locale_keys.g.dart';
import 'package:appflowy_editor/appflowy_editor.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:appflowy/core/helpers/url_launcher.dart';
import 'package:appflowy/generated/locale_keys.g.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:package_info_plus/package_info_plus.dart';
enum _FlowyMobileStateContainerType {
@ -80,7 +81,7 @@ class FlowyMobileStateContainer extends StatelessWidget {
onPressed: () {
final String? version = snapshot.data?.version;
final String os = Platform.operatingSystem;
safeLaunchUrl(
afLaunchUrlString(
'https://github.com/AppFlowy-IO/AppFlowy/issues/new?assignees=&labels=&projects=&template=bug_report.yaml&title=[Bug]%20Mobile:%20&version=$version&os=$os&context=Error%20log:%20$errorMsg',
);
},
@ -90,7 +91,7 @@ class FlowyMobileStateContainer extends StatelessWidget {
),
OutlinedButton(
onPressed: () =>
safeLaunchUrl('https://discord.gg/JucBXeU2FE'),
afLaunchUrlString('https://discord.gg/JucBXeU2FE'),
child: Text(
LocaleKeys.workspace_errorActions_reachOut.tr(),
),