forked from SankethBK/diaryvault
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'SankethBK:master' into 29_auto_save_notes
- Loading branch information
Showing
8 changed files
with
128 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import 'package:dairy_app/app/themes/theme_extensions/note_create_page_theme_extensions.dart'; | ||
|
||
import 'package:flutter/material.dart'; | ||
import 'package:url_launcher/url_launcher.dart'; | ||
|
||
class SendFeedBack extends StatelessWidget { | ||
const SendFeedBack({Key? key}) : super(key: key); | ||
|
||
final emailAddress = '[email protected]'; | ||
final subject = 'Feedback for DiaryVault'; | ||
|
||
@override | ||
Widget build(BuildContext context) => InkWell( | ||
onTap: _launchEmailApp, | ||
child: Padding( | ||
padding: const EdgeInsets.symmetric(vertical: 6.0), | ||
child: Text( | ||
"Send feedback", | ||
style: TextStyle( | ||
fontSize: 16.0, | ||
color: Theme.of(context) | ||
.extension<NoteCreatePageThemeExtensions>()! | ||
.mainTextColor, | ||
), | ||
), | ||
), | ||
); | ||
|
||
void _launchEmailApp() async { | ||
try { | ||
final Uri emailLaunchUri = Uri( | ||
scheme: 'mailto', | ||
path: emailAddress, | ||
queryParameters: {'subject': subject}, | ||
); | ||
|
||
await launchUrl(emailLaunchUri); | ||
} catch (e) { | ||
throw Exception( | ||
"Error sending feed-back", | ||
); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import 'package:dairy_app/app/themes/theme_extensions/note_create_page_theme_extensions.dart'; | ||
import 'package:flutter/material.dart'; | ||
import 'package:share_plus/share_plus.dart'; | ||
|
||
class ShareWithFriends extends StatelessWidget { | ||
const ShareWithFriends({Key? key}) : super(key: key); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
final mainTextStyle = TextStyle( | ||
fontSize: 16.0, | ||
color: Theme.of(context) | ||
.extension<NoteCreatePageThemeExtensions>()! | ||
.mainTextColor, | ||
); | ||
const appDescription = | ||
"Discover diaryVault - a diary app designed to help you capture your thoughts, memories, and moments effortlessly. Available now on the Play Store!"; | ||
|
||
return GestureDetector( | ||
onTap: (() async { | ||
try { | ||
const playstoreURL = | ||
'https://play.google.com/store/apps/details?id=me.sankethbk.dairyapp'; | ||
await Share.share('$appDescription\n\n$playstoreURL'); | ||
} catch (e) { | ||
throw Exception( | ||
"Error sharing app", | ||
); | ||
} | ||
}), | ||
child: Padding( | ||
padding: const EdgeInsets.symmetric(vertical: 6.0), | ||
child: Text( | ||
"Share with Friends", | ||
style: mainTextStyle, | ||
), | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters