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:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: 'Flutter Demo', |
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
enum ItemType { drink, pizza } | |
class Item { | |
String id; | |
String name; | |
double price; | |
ItemType type; | |
List<int> image; | |
Item({ |
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
_children.insert( | |
2, | |
AdmobBanner( | |
adUnitId: getBannerAdUnitId(), | |
adSize: AdmobBannerSize.BANNER, | |
), | |
); |
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
String getBannerAdUnitId() { | |
if (Platform.isIOS) { | |
return 'ca-app-pub-3940256099942544/2934735716'; | |
} else if (Platform.isAndroid) { | |
return 'ca-app-pub-3940256099942544/6300978111'; | |
} | |
return null; | |
} |
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'; | |
# ... | |
void main() { | |
# other code .. | |
Admob.inittialize(ggetAppId()) | |
runApp(Application()) |
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
<key>GADApplicationIdentifier</key> | |
<string>ca-app-pub-3940256099942544~1458002511</string> | |
<key>io.flutter.embedded_views_preview</key> | |
<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
<meta-data | |
android:name="com.google.android.gms.ads.APPLICATION_ID" | |
android:value="ca-app-pub-3940256099942544~3347511713"/> |
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
# ... | |
dependencies: | |
flutter: | |
sdk: flutter | |
admob_flutter: ^0.3.1 | |
# other dependencies | |
# ... |
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
# ... | |
dependencies: | |
flutter: | |
sdk: flutter | |
admob_flutter: ^0.3.1 | |
# other dependencies | |
# ... |
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:flutter/material.dart'; | |
void main() { | |
runApp(Application()); | |
} | |
class Application extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( |