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
exports.appleSignInCallback = (request, response) => { | |
const redirect = `intent://callback?${new URLSearchParams( | |
request.body | |
).toString()}#Intent;package=${process.env.ANDROID_PACKAGE_IDENTIFIER | |
};scheme=signinwithapple;end`; | |
console.log(`Redirecting to ${redirect}`); | |
response.redirect(307, redirect); | |
} |
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
downloadAudioFile(MuseumObject object) async { | |
var size = object.media!.mediaSize ?? 0; | |
var fileSize = (object.media!.mediaSize! / 1000000).toStringAsPrecision(3); | |
var result = await Get.defaultDialog( | |
title: '', | |
middleText: | |
'You are about to download ${fileSize}MB of data. Do you want to continue?', | |
onCancel: () { | |
Navigator.of(context).pop(false); |
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
// sample of future builder starts | |
Future<PpleData?> _futurPple = // make request here | |
setState(() {}); | |
FutureBuilder<PpleData?>( | |
future: _futurPple, | |
builder: (context, snapshot){ | |
if(snapshot.connectionState == ConnectionState.waiting) return CircularProgressIndicator.adaptive(); // any other type of loader | |
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
Widget createBtn(){ | |
return SizedBox( | |
width: 160, | |
height: 48, | |
child: ElevatedButton( | |
onPressed: () async{ | |
var authUser = Provider.of<AuthProvider>(context, listen: false).user; | |
var eProvider = Provider.of<EventProvider>(context, listen: false); | |
ScreenshotController screenshotController = ScreenshotController(); | |
print('lat: ${_selectedPrediction!.lat}'); |
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
void logDeletedAccountEvent(String userId) { | |
if(kDebugMode) return; | |
print('inside deleted account event analytics'); | |
analytics!.logEvent( | |
name: 'deleted_account', | |
parameters: { | |
'user_id': userId, | |
'deviceOS': Platform.isAndroid ? 'android' : 'ios', | |
}, | |
); |
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
{ | |
"data": [ | |
{ | |
"data_type": "post", | |
"data_result": { | |
"post_id": "96121ddd-8dd3-402b-9c8d-6be9cf1b6535", | |
"caption": "Foodie", | |
"is_a_moment": true, | |
"i_like": null, | |
"comments_count": 0, |
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
Configuration createConfiguration() { | |
// final flutterSticker = Sticker( | |
// "example_sticker_logos_flutter", "Flutter", "assets/Flutter-logo.png"); | |
// final imglySticker = Sticker( | |
// "example_sticker_logos_imgly", "img.ly", "assets/IgorSticker.png"); | |
/// A completely custom category. | |
// final logos = StickerCategory( | |
// "example_sticker_category_logos", "Logos", "assets/Flutter-logo.png", |
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
FirebaseMessaging.instance.getInitialMessage().then((RemoteMessage message) async{ | |
if (message != null) { | |
if(message.data != null){ | |
if(message.data['not_type'] == 'user_chat_new_message'){ | |
print(message.data['not_type']); | |
// intialise chat between this two users | |
var startChat = await Provider.of<ChatProvider>(navigatorKey.currentState.context, listen: false).initChat( | |
message.data['user_1_id'], | |
message.data['user_2_id'] |
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
{ | |
"stripeAmount": 143.75, | |
"quantity": 5, | |
"total": 143.75, | |
"charges": 12.5, | |
"vat": 5, | |
"vatAmount": 6.25, | |
"hostTip": 0, | |
"subTotal": 106.25, | |
"eventId": "6236013535bd756735d8d954", |
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
{ | |
"_id": "61322d9d2dceeb00312c13f0", | |
"name": "Intro to comp science", | |
"description": "Introduction to common problems and ideological concepts of computers", | |
"school": { | |
"_id": "613229fc2dceeb00312c13eb", | |
"name": "Obafemi Awolowo University" | |
}, | |
"faculty": { | |
"_id": "61322ca92dceeb00312c13ec", |
NewerOlder