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
# Uncomment this line to define a global platform for your project | |
platform :ios, '13.0' | |
# CocoaPods analytics sends network stats synchronously affecting flutter build latency. | |
ENV['COCOAPODS_DISABLE_STATS'] = 'true' | |
project 'Runner', { | |
'Debug' => :debug, | |
'Profile' => :release, | |
'Release' => :release, |
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
#!/bin/bash | |
set -e | |
echo "The script you are running is: $(dirname "$0")/$(basename "$0")" | |
function runDebug() { | |
flutter run iOS --debug --target=lib/main_dev.dart | |
} | |
function runRelease() { |
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
// import 'package:collection/collection.dart'; | |
// Write a function top10words that takes as input a list of words | |
// and returns a list of 10 most frequent words in the input list | |
void main() { | |
// TODO:: call top10words on words list below | |
// var top10 = top10words(words); | |
// expects top10 to include "Iris", "Elisa", "Jack" |
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
// Dart imports: | |
import 'dart:convert'; | |
import 'dart:typed_data'; | |
// Flutter imports: | |
import 'package:flutter/foundation.dart' show kIsWeb; | |
// Package imports: | |
import 'package:get_it/get_it.dart'; | |
import 'package:universal_html/html.dart'; |
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
[ | |
{ | |
"origin": ["*"], | |
"method": ["GET"], | |
"maxAgeSeconds": 3600 | |
} | |
] |
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
import 'dart:convert'; | |
import 'dart:html'; | |
Future<void> downloadFile(String fileName, String pathToFile) async { | |
if (pathToFile.isEmpty) return; | |
if (!kIsWeb) return; | |
Uint8List? data = await FirebaseStorage.instance.ref(pathToFile).getData(); | |
if (data == null) return; | |
String encodedData = base64Encode(data); |
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
Future<void> storePushNotificationToken(String userId, String token) async { | |
final batch = _firestore.batch(); | |
final pushTokenRef = _firestore.collection(FirestoreCollection.pushToken.path).doc(userId); | |
batch.set( | |
pushTokenRef, | |
{'userId': userId, 'token': token}, | |
SetOptions(merge: true), | |
); |
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
Scaffold( | |
appBar: AppBar(...), | |
body: WillPopScope( | |
onWillPop: onBackClick, | |
child: CustomScrollView( | |
slivers: <Widget>[ | |
SliverToBoxAdapter( | |
child: Column( | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: <Widget>[ |
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
apply plugin: 'com.android.application' | |
apply plugin: 'kotlin-android' | |
apply plugin: 'kotlin-android-extensions' | |
apply plugin: 'kotlin-kapt' | |
apply plugin: 'io.fabric' | |
apply from: '../gradle/afsTasks.gradle' <======== | |
android { | |
compileSdkVersion 28 |
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
package hmac | |
import org.apache.commons.codec.binary.Base64 | |
import java.net.URLEncoder | |
import java.time.LocalDateTime | |
import java.time.OffsetDateTime | |
import javax.crypto.Mac | |
import javax.crypto.spec.SecretKeySpec | |
import java.util.HashMap |
NewerOlder