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
List<Widget> _button() { | |
List<Widget> widgets = this | |
._items | |
.map((item) => Container( | |
margin: EdgeInsets.symmetric(vertical: 10.0), | |
child: Container( | |
child: Column( | |
children: <Widget>[ | |
Align( | |
alignment: Alignment.bottomCenter, |
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> initPlatformState() async { | |
String platformVersion; | |
// Platform messages may fail, so we use a try/catch PlatformException. | |
final user = await FirebaseAuth.instance.currentUser(); | |
try { | |
platformVersion = await FlutterInappPurchase.instance.platformVersion; | |
} on PlatformException { | |
platformVersion = 'Failed to get platform version.'; |
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 _getPurchaseHistory() async { | |
List<PurchasedItem> items = | |
await FlutterInappPurchase.instance.getPurchaseHistory(); | |
for (var item in items) { | |
print('${item.toString()}'); | |
this._purchases.add(item); | |
} | |
setState(() { |
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 _getProduct() async { | |
List<IAPItem> items = | |
await FlutterInappPurchase.instance.getProducts(_productLists); | |
for (var item in items) { | |
print('${item.toString()}'); | |
this._items.add(item); | |
} | |
setState(() { | |
this._items = items; |
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:async'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter_inapp_purchase/flutter_inapp_purchase.dart'; | |
class PremiumScreen extends StatefulWidget { | |
@override | |
_PremiumScreenState createState() => _PremiumScreenState(); | |
} | |
class _PremiumScreenState extends State<PremiumScreen> { |
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 main() { | |
isProperlyNested(String str) { | |
var splittedString = str.split(""); | |
List outputs = []; | |
for (var i = 0; i < str.length; i++) { | |
var currentVal = str[i]; | |
if (currentVal == '{' || currentVal == '(' || currentVal == '[') { | |
outputs.add(currentVal); |
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:io'; | |
import 'package:chewie/chewie.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:image_picker/image_picker.dart'; | |
import 'package:video_player/video_player.dart'; | |
void main() { | |
runApp(MyApp()); | |
} |
OlderNewer