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
class MyHomePage extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
String networkimg = | |
'https://cdn.dribbble.com/users/750517/screenshots/8574989/media/7610aa397363fdfe6f2daa1145493aee.gif'; | |
return Center( | |
child: Column( | |
mainAxisAlignment: MainAxisAlignment.center, | |
children: <Widget>[ | |
RaisedButton( |
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
RaisedButton( | |
key: keys[2], | |
child: Text('Flare Giffy'), | |
onPressed: () { | |
showDialog( | |
context: context, | |
builder: (_) => FlareGiffyDialog( | |
key: keys[3], | |
flarePath: 'assets/space_demo.flr', | |
flareAnimation: 'loading', |
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'), |
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
@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
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, | |
), |
NewerOlder