Skip to content

Instantly share code, notes, and snippets.

@rodydavis
rodydavis / whatsnew.dart
Last active July 5, 2018 12:38
Drop in file for flutter to show a whats new page for the user that is native for android and iOS. (Similar to apples version in keynote, pages, app store and other apps)
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'dart:io';
import 'dart:async';
//Example
class StartPage extends StatelessWidget {
// Example to Put on Login Function to Only Show on Version Change
// var prefs = await SharedPreferences.getInstance();
@slightfoot
slightfoot / ios_android.dart
Created June 30, 2018 14:15
Example of using defaultTargetPlatform to change the entire widget tree based on platform.
import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
void main() {
//runApp(IOSApp());
//runApp(AndroidApp());
runApp(defaultTargetPlatform == TargetPlatform.iOS ? IOSApp() : AndroidApp());
}
// IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN!
/* tslint:disable */
export const VERSION = {
"dirty": true,
"raw": "30374842-dirty",
"hash": "30374842",
"distance": null,
"tag": null,
"semver": null,
"suffix": "30374842-dirty",
import { Component, forwardRef, Renderer2, ViewChild } from '@angular/core';
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
export const EPANDED_TEXTAREA_VALUE_ACCESSOR : any = {
provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef(() => TextareaExpandedComponent),
multi: true,
};
@Component({
@collinjackson
collinjackson / main.dart
Last active August 17, 2023 20:06
PageView example with dots indicator
// Copyright 2017, the Flutter project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'dart:math';
import 'package:flutter/material.dart';
void main() {
runApp(new MyApp());
}
@staltz
staltz / introrx.md
Last active September 25, 2024 09:04
The introduction to Reactive Programming you've been missing