This file contains hidden or 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:flutter/material.dart'; | |
import 'package:flutter_demo_provider/app_state.dart'; | |
import 'package:provider/provider.dart'; | |
class TextEditWidget extends StatefulWidget { | |
@override | |
_TextEditWidgetState createState() => _TextEditWidgetState(); | |
} |
This file contains hidden or 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:flutter/material.dart'; | |
import 'package:flutter_demo_provider/app_state.dart'; | |
import 'package:flutter_demo_provider/text_display.dart'; | |
import 'package:flutter_demo_provider/text_edit.dart'; | |
import 'package:provider/provider.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
// This widget is the root of your application. |
This file contains hidden or 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:flutter/material.dart'; | |
class AppState with ChangeNotifier { | |
AppState(); | |
String _displayText = ""; | |
void setDisplayText(String text) { | |
_displayText = text; | |
notifyListeners(); |
This file contains hidden or 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
# Flutter Multi select ChoiceChip | |
Hello Everyone | |
In this article we will see how to use `ChoiceChip` to accept multiple selections | |
Let's get started | |
First things first |
This file contains hidden or 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
var serviceAccount = require("./service/cred.json"); | |
// admin.initializeApp(functions.config().firebase); | |
admin.initializeApp({ | |
credential: admin.credential.cert(serviceAccount), | |
}); | |
const { Storage } = require('@google-cloud/storage'); |
This file contains hidden or 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
/* | |
* Copyright (c) 2012 Google Inc. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains hidden or 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
BillingClient mBillingClient; | |
// To get key go to Developer Console > Select your app > Development Tools > Services & APIs. | |
String base64Key = "PLACE_YOUR_KEY_HERE"; | |
mBillingClient = BillingClient.newBuilder(this).setListener(new PurchasesUpdatedListener() { | |
@Override | |
public void onPurchasesUpdated(int responseCode, @Nullable List<Purchase> purchases) { | |
for(Purchase purchase: purchases) { | |
// When every a new purchase is made |
This file contains hidden or 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 android.text.TextUtils | |
import android.util.Base64 | |
import com.android.billingclient.util.BillingHelper | |
import java.io.IOException | |
import java.security.InvalidKeyException | |
import java.security.KeyFactory | |
import java.security.NoSuchAlgorithmException | |
import java.security.PublicKey | |
import java.security.Signature |
This file contains hidden or 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 initState() { | |
super.initState(); | |
_retrieveDynamicLink(); | |
} | |
Future<void> _retrieveDynamicLink() async { | |
final PendingDynamicLinkData data = await FirebaseDynamicLinks.instance.retrieveDynamicLink(); | |
final Uri deepLink = data?.link; | |
if (deepLink != null) { |
This file contains hidden or 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:async'; | |
import 'package:firebase_dynamic_links/firebase_dynamic_links.dart'; | |
class DynamicLinks { | |
// create a link with params | |
static Future<Uri> createLinkWithParams(String code) => | |
_getLink('mylink', {'code': code}); | |