Category: Exemplos Flutter

Aguns exemplos de código Flutter

App Icon no Flutter

Anuncios do Admob no Flutter

pubspec.yaml dependencies: flutter: sdk: flutter # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^0.1.2 firebase_admob: ^0.9.0+9 AndroidManifest.xml <meta-data android:name=”com.google.android.gms.ads.APPLICATION_ID” android:value=”[ADMOB_APP_ID]”/> Main import ‘package:firebase_admob/firebase_admob.dart’;  @overrideWidget (BuildContext context) { FirebaseAdMob.instance.initialize(appId: “[ADMOB_APP_ID]”); myBanner ..load() ..show( anchorOffset: 60.0, horizontalCenterOffset: 10.0, anchorType: AnchorType.bottom, ); myInterstitial ..load() …

Continue a ler

JunKenPon – Como eu fiz este aplicativo em Flutter (#2 Gesture Detector)

#1 – Criação do Interface https://www.youtube.com/watch?v=vTLN67NKk4s import ‘package:flutter/material.dart’;import ‘package:jankenpon/Game.dart’;void main(){ runApp(MaterialApp( home: Game(), debugShowCheckedModeBanner: false, ));} import ‘dart:math’;import ‘package:flutter/cupertino.dart’;import ‘package:flutter/material.dart’;class Game extends StatefulWidget { @override _GameState createState() => _GameState();}class _GameState extends State<Game> { var _imageAppChoice=AssetImage(“images/base.png”); var _batleResult=”Batle Field”; var _resultado=””; var _userVictory=0, _appVictory=0; var _imageBatleResult=AssetImage(“images/base.png”); void _selectOption(String userChoice) { var options = [“rock”, “paper”, “scissors”, …

Continue a ler

JunKenPon – Como eu fiz este aplicativo em Flutter

#1 – Criação do Interface import ‘package:flutter/material.dart’;import ‘package:jankenpon/Game.dart’;void main(){ runApp(MaterialApp( home: Game(), debugShowCheckedModeBanner: false, ));} import ‘package:flutter/cupertino.dart’;import ‘package:flutter/material.dart’;class Game extends StatefulWidget { @override _GameState createState() => _GameState();}class _GameState extends State<Game> { @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text(“JanKenPon”) ), body: Column( crossAxisAlignment: CrossAxisAlignment.center, children: <Widget>[ Padding( padding: EdgeInsets.only(top: 24, bottom: 8), …

Continue a ler