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
| // Subscribe to any incoming purchases at app initialization. These can | |
| // propagate from either storefront so it's important to listen as soon as | |
| // possible to avoid losing events. | |
| class _MyAppState extends State<MyApp> { | |
| StreamSubscription<List<PurchaseDetails>> _subscription; | |
| @override | |
| void initState() { | |
| final Stream purchaseUpdates = | |
| InAppPurchaseConnection.instance.purchaseUpdatedStream; |
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
| In App Purchase | |
| A Flutter plugin for in-app purchases. Exposes APIs for making in-app purchases through the App Store (on iOS) and Google Play (on Android). | |
| Features | |
| Add this to your Flutter app to: | |
| Show in app products that are available for sale from the underlying shop. Includes consumables, permanent upgrades, and subscriptions. | |
| Load in app products currently owned by the user according to the underlying shop. | |
| Send your user to the underlying store to purchase your products. | |
| Getting Started |
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
| class _MyScreenState extends State<MyScreen> { | |
| double _inputHeight = 50; | |
| final TextEditingController _textEditingController = TextEditingController(); | |
| @override | |
| void initState() { | |
| super.initState(); | |
| _textEditingController.addListener(_checkInputHeight); | |
| } |
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:validate/validate.dart'; | |
| void main() => runApp(new MaterialApp( | |
| title: 'Forms in Flutter', | |
| home: new LoginPage(), | |
| )); | |
| class LoginPage extends StatefulWidget { | |
| @override |
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
| Modules | Directives | FAQ | Glossary | Sitemap | |
| Apache HTTP Server Version 2.4 | |
| <- | |
| Apache > HTTP Server > Documentation > Version 2.4 > Rewrite | |
| Redirecting and Remapping with mod_rewrite | |
| Available Languages: en | fr |
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
| To hide the microsite directory in url, you can use the following rules: | |
| <rewrite> | |
| <rules> | |
| <rule name="HideMicroSite" stopProcessing="true"> | |
| <match url="^microsite/(.*)" /> | |
| <conditions> | |
| <add input="{HTTP_HOST}" pattern="^site\.com$" /> | |
| </conditions> | |
| <action type="Redirect" url="{R:1}" /> |
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
| Note: This example contains Chinese text and a payload of nested JSON. The payload had to be encoded as a string before being passed on to the API. I found that using the flutter http package one has to use a workaround to decode the characters properly (dart-lang/http#243). The alternative is to use the dio package which encodes everything as utf-8 properly. When decoding the get request, one has to remember to also decode the nested json separately. | |
| Fix for others having this issue: | |
| Flutter has a new network profiler in the Dart tools. Using this I was able to see that an error returned that Field payload does not have a default value. | |
| Solution: | |
| Add a default NULL value to the payload field and with that inserts are now working. | |
| My payload is a json field so I had to jsonEncode(payload) before adding it to the post (in my toJson method) | |
| Also found that I could simply wrap the entire jsonEncode(post) with single quotes |
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
| class NetworkService { | |
| final JsonDecoder _decoder = new JsonDecoder(); | |
| final JsonEncoder _encoder = new JsonEncoder(); | |
| Map<String, String> headers = {"content-type": "text/json"}; | |
| Map<String, String> cookies = {}; | |
| void _updateCookie(http.Response response) { | |
| String allSetCookie = response.headers['set-cookie']; |
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
| /* | |
| * Encode/Decode functions for Dart | |
| * | |
| * Copyright 2011 Google Inc. | |
| * Neil Fraser (fraser@google.com) | |
| * | |
| * 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 | |
| * |
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-Csv $fullpath -Delimiter "`t" -Header Year, ParentID | | |
| Select-Object -Skip 1 | | |
| ForEach-Object { | |
| $parent = $_.ParentID | |
| $_.Year -replace '.*?"(.*?)".*', '$1' | Out-File "$path\$parent.txt" -Append | |
| } |