Skip to content

Instantly share code, notes, and snippets.

View sagarshende23's full-sized avatar
😇
Helping Others

Sagar Shende sagarshende23

😇
Helping Others
View GitHub Profile
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,
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(
RaisedButton(
key: keys[2],
child: Text('Flare Giffy'),
onPressed: () {
showDialog(
context: context,
builder: (_) => FlareGiffyDialog(
key: keys[3],
flarePath: 'assets/space_demo.flr',
flareAnimation: 'loading',
//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'),
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() {
@override
void initState() {
FirebaseAdMob.instance.initialize(appId: BannerAd.testAdUnitId);
//Change appId With Admob Id
_bannerAd = createBannerAd()
..load()
..show();
super.initState();
}
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,
void _onTapDown(TapDownDetails details) {
_controller.forward();
}
void _onTapUp(TapUpDetails details) {
_controller.reverse();
}
@override
Widget build(BuildContext context) {
_scale = 1 - _controller.value;
return GestureDetector(
onTapDown: _onTapDown,
onTapUp: _onTapUp,
child: Transform.scale(
scale: _scale,
child: _animatedButtonUI,
),
Widget get _animatedButtonUI => Container(
height: 70,
width: 200,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(100.0),
boxShadow: [
BoxShadow(
color: Color(0x80000000),
blurRadius: 30.0,
offset: Offset(0.0, 5.0),