Skip to content

Instantly share code, notes, and snippets.

Last active Nov 23, 2019
What would you like to do?
Prueba test Flutter positioned into Stack
import 'package:firebase_admob/firebase_admob.dart';
import '../services/globals.dart';
class Ads {
InterstitialAd myInterstitial;
MobileAdTargetingInfo targetingInfo = new MobileAdTargetingInfo(
testDevices: TEST_DEVICES,
/* keywords: <String>[
"horoscopo gratis",
"horoscopo diario",
"tarot gratis",
"videntes buenas",
"free tarot reading",
"free voyance",
"free Horoscope"
contentUrl: "",
childDirected: false,
designedForFamilies: true,
gender: MobileAdGender.unknown,
InterstitialAd createBannerInter() {
return new InterstitialAd(
adUnitId: AD_MOB_INTERSITIAL_ID, //InterstitialAd.testAdUnitId,
targetingInfo: targetingInfo,
listener: (MobileAdEvent event) {
print("BannerAd event is $event");
if (event == MobileAdEvent.closed) {}
void showInter() {
FirebaseAdMob.instance.initialize(appId: AD_MOB_APP_ID);
myInterstitial = createBannerInter()
void showPub() {
print("no hace nada por ahora");
//la idea es hacer algo asi para poder llamarlo desde otras pantallas, el load al cargar la pantalla y
// el show en cualquier evento que yo quiera. Ads().loadInter(); y Ads().showInter()
FirebaseAdMob.instance.initialize(appId: AD_MOB_APP_ID);
myInterstitial = createBannerInter()
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can
// be found in the LICENSE file.
// Demonstrates a basic shared element (Hero) animation.
import 'package:flutter/material.dart';
import '../comunes/recursos.dart' as _recursos;
class Pruebas extends StatelessWidget {
Widget build(BuildContext context) {
var arregloListaCartas = [
var randomItem = (arregloListaCartas..shuffle());
aleatorio(int _id) {
Widget _stacker() {
return Container(
height: 196.0,
margin: const EdgeInsets.only(top: 40.0),
child: new ListView(
scrollDirection: Axis.horizontal,
children: <Widget>[
new Stack(
children: new List.generate(22, (int index) {
return GestureDetector(
onTap: () {
child: new Container(
// padding: const EdgeInsets.all(4.0),
// margin: const EdgeInsets.only(left: 20.0),
margin: const EdgeInsets.only(right: 5.0),
width: 110.0,
height: 196.0,
child: new Image(
image: new AssetImage('assets/bgcard-a.jpg'),
fit: BoxFit.cover)));
return Scaffold(
appBar: AppBar(
title: const Text('Prueba test'),
body: new Stack(
children: <Widget>[
new Container(
decoration: _recursos.backgroundImageComun(),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment