Skip to content

Instantly share code, notes, and snippets.

View Andrious's full-sized avatar
🏠
Working from home

Andrious Solutions Andrious

🏠
Working from home
View GitHub Profile
@Andrious
Andrious / build.gradle
Last active July 30, 2019 18:13
System build.gradle for Firebase
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.2'
classpath 'com.google.gms:google-services:4.3.0'
}
@Andrious
Andrious / build.gradle
Created July 3, 2018 17:53
App build.gradle for Firebase
// ADD THIS AT THE BOTTOM
// Otherwise, Default FirebaseApp is not initialized in this process
apply plugin: 'com.google.gms.google-services'
@Andrious
Andrious / iniState1.dart
Created July 4, 2018 05:05
Series of iniState() functions to is the Auth class library.
@override
void initState() {
super.initState();
Auth.init(
scopes: <String>[
'email',
'https://www.googleapis.com/auth/contacts.readonly',
],
listen:(account){
@Andrious
Andrious / Controller.dart
Last active November 8, 2018 06:51
Dart Files for the MVCCounterApp. The Counter App using the mvc_pattern plugin.
import 'package:mvc_pattern/mvc_pattern.dart';
/// Notice 'the rest of the app' has no idea this Dart file even exists.
import 'Model.dart';
class Con extends ControllerMVC {
factory Con(){
if(_this == null) _this = Con._();
@Andrious
Andrious / Controller.dart
Last active November 1, 2018 18:52
The App has the View. First Approach to implement the MVC Library Package, mvc_pattern.
import 'package:mvc_pattern/mvc_pattern.dart';
/// Notice 'the rest of the app' has no idea this Dart file even exists.
import 'Model.dart';
class Controller extends ControllerMVC {
Controller() {
con = this;
}
static Controller con;
@Andrious
Andrious / Controller.dart
Created November 1, 2018 18:59
Where's the View? The Second Approach to implementing the MVC Library Package, mvc_pattern.
import 'package:mvc_pattern/mvc_pattern.dart';
/// Notice 'the rest of the app' has no idea this Dart file even exists.
import 'Model.dart';
class Controller extends ControllerMVC {
Controller() {
con = this;
}
static Controller con;
@Andrious
Andrious / Controller.dart
Created November 1, 2018 19:07
Your Own View. The third approach to implementing the MVC Library Package, mvc_pattern.
import 'package:mvc_pattern/mvc_pattern.dart';
/// Notice 'the rest of the app' has no idea this Dart file even exists.
import 'Model.dart';
class Controller extends ControllerMVC {
Controller() {
con = this;
}
static Controller con;
@Andrious
Andrious / main.dart
Last active December 8, 2018 20:58
Main Dart file demonstrating the ads.dart implementation for AdMobs in Flutter
// 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.
import 'package:flutter/material.dart';
import 'package:ads/ads.dart';
import 'package:firebase_admob/firebase_admob.dart';
@Andrious
Andrious / main.dart
Created December 8, 2018 22:07
Dart file demonstrating the Prefs.dart library file implementing the Shared Preferences plugin into a Flutter app.
import 'dart:async' show Future;
import 'package:flutter/material.dart';
import 'package:prefs/prefs.dart';
void main() {
runApp(new MyApp());
}
@Andrious
Andrious / pubspec.yaml
Last active January 28, 2019 20:25
pubspec.yaml for the mvc_application
dependencies:
mvc_application:
git:
url: git://github.com/AndriousSolutions/mvc_application.git