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'; | |
class AddToCart extends StatelessWidget { | |
final ProductModel product; | |
AddToCart({Key key, @required this.product}) : super(key: key); | |
void showConfirm(context, cart) { | |
showDialog( | |
context: context, |
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'; | |
import 'package:flutter_offline/flutter_offline.dart'; | |
void main() => runApp(new MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
debugShowCheckedModeBanner: false, |
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 _onTapDown(TapDownDetails details) { | |
_controller.forward(); | |
} | |
void _onTapUp(TapUpDetails details) { | |
_controller.reverse(); | |
} |
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
@override | |
Widget build(BuildContext context) { | |
_scale = 1 - _controller.value; | |
return GestureDetector( | |
onTapDown: _onTapDown, | |
onTapUp: _onTapUp, | |
child: Transform.scale( | |
scale: _scale, | |
child: _animatedButtonUI, | |
), |
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'; | |
import 'package:firebase_admob/firebase_admob.dart'; | |
const String testDevice = 'MobileId'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatefulWidget { | |
@override | |
_MyAppState createState() => _MyAppState(); |
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
@override | |
void initState() { | |
FirebaseAdMob.instance.initialize(appId: BannerAd.testAdUnitId); | |
//Change appId With Admob Id | |
_bannerAd = createBannerAd() | |
..load() | |
..show(); | |
super.initState(); | |
} |
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
static const MobileAdTargetingInfo targetingInfo = MobileAdTargetingInfo( | |
testDevices: testDevice != null ? <String>[testDevice] : null, | |
nonPersonalizedAds: true, | |
keywords: <String>['Game', 'Mario'], | |
); | |
BannerAd _bannerAd; | |
InterstitialAd _interstitialAd; | |
//Banner Ads | |
BannerAd createBannerAd() { |
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'; | |
import 'package:giffy_dialog/giffy_dialog.dart'; | |
void main() => runApp(MyApp()); | |
const List<Key> keys = [ | |
Key('Network'), | |
Key('Network Dialog'), | |
Key('Flare'), | |
Key('Flare Dialog'), |
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
//Asset Giffy Dialog | |
RaisedButton( | |
key: keys[4], | |
child: Text('Asset Giffy'), | |
onPressed: () { | |
showDialog( | |
context: context, | |
builder: (_) => AssetGiffyDialog( | |
key: keys[5], | |
image: Image.asset('assets/rappi_basket.gif'), |
NewerOlder