Skip to content

Commit

Permalink
fix(button-feedback): configuration android manifest (#1086)
Browse files Browse the repository at this point in the history
* fix(button-feedback): configuration android manifest

* fix(button-feedback): configuration android manifest
  • Loading branch information
PriscilliaAmmeux authored Nov 20, 2023
1 parent 9b27b2f commit 9b47c26
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 11 deletions.
23 changes: 23 additions & 0 deletions yaki_mobile/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,27 @@
android:name="flutterEmbedding"
android:value="2" />
</application>
<!-- Provide required visibility configuration for API level 30 and above -->
<queries>
<!-- If your app checks for web support -->
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="http" />
</intent>
<!-- If your app checks for web support -->
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="https" />
</intent>
<!-- If your app checks for mailto support -->
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="mailto" />
</intent>
<!-- If your app checks for call support -->
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="tel" />
</intent>
</queries>
</manifest>
6 changes: 6 additions & 0 deletions yaki_mobile/ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<array>
<string>mailto</string>
<string>tel</string>
<string>http</string>
<string>https</string>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
Expand Down
17 changes: 6 additions & 11 deletions yaki_mobile/lib/presentation/features/shared/feedback_user.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,21 @@ class FeedbackUser extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
GestureDetector(
InkWell(
onTap: () async {
const String url = 'mailto:[email protected]';
final Uri uri = Uri.parse(url);
final Uri uri = Uri.parse('mailto:[email protected]');
if (await canLaunchUrl(uri)) {
if (!await launchUrl(
uri,
mode: LaunchMode.externalApplication,
)) {
throw Exception('Could not launch $url');
throw Exception('Could not launch $uri');
}
}
},
child: Row(
children: [
Text(
tr('feedback'),
style: textFeedback(),
),
],
child: Text(
tr('feedback'),
style: textFeedback(),
),
),
],
Expand Down
2 changes: 2 additions & 0 deletions yaki_mobile/lib/presentation/styles/text_style.dart
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ TextStyle textFeedback() {
return const TextStyle(
color: Colors.grey,
fontSize: 16,
fontWeight: FontWeight.bold,
decoration: TextDecoration.underline,
);
}

Expand Down

0 comments on commit 9b47c26

Please sign in to comment.