Skip to content

Instantly share code, notes, and snippets.

Collin Jackson collinjackson

View GitHub Profile
View gist:8d78de88913e08d7768f6f816c9d8c5d
@deprecated('Use `FacebookAuthProvider` and `signInAndRetrieveData` instead')
Future<FirebaseUser> signInWithFacebook(
{@required String accessToken}) {
return signIn(credential: FacebookAuthProvider.getCredential(accessToken: accessToken));
}
/// Signs in with a Twitter account using the specified credentials.
///
/// The returned future completes with the signed-in user or a [PlatformException], if sign in failed.
@deprecated('Use `TwitterAuthProvider` and `signInAndRetrieveData` instead')
View gist:28e4f38653ab3749806e7cde54a1e76c
import 'package:flutter/material.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: 'Flutter Demo',
theme: new ThemeData(
@collinjackson
collinjackson / nested_scroll_view.dart
Last active Mar 28, 2019
nestedscrollview example
View nested_scroll_view.dart
// 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 'package:flutter/material.dart';
void main() {
runApp(new TestApp());
}
View nested_navigator.dart
import 'package:flutter/material.dart';
void main() {
runApp(new MaterialApp(
home: new Container(
color: Colors.white,
child: new MyAppHome(),
),
));
}
@collinjackson
collinjackson / sentry_example.dart
Created Aug 25, 2017
Example of sentry wrapping http.Client
View sentry_example.dart
// Non-confidential feedback for Posse
class SentryHttpClient extends BaseClient {
SentryHttpClient(this._inner);
final Client _inner;
@override
Future<StreamedResponse> send(BaseRequest request) async {
try {
return _inner.send(request);
View date_picker_example.dart
// Non-confidential feedback for Posse
import 'dart:async';
import 'package:intl/intl.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:meta/meta.dart';
import 'package:numberpicker/numberpicker.dart';
class _BirthDatePickerDialog extends StatefulWidget {
View main.dart
import 'dart:math' as math;
import 'package:flutter/material.dart';
class PosseDemo extends StatelessWidget {
Widget build(BuildContext context) {
return new Scaffold(
body: new CustomScrollView(
slivers: [
View main.dart
// Non-confidential feedback
import 'dart:math' as math;
import 'package:flutter/material.dart';
const _kMidHeadingsHeight = 128.0;
const _kMinHeadingsHeight = 72.0;
// SectionHeadingsLayout computes the initial bounds of each heading based
// on the layout configuration:
View main.dart
import 'package:flutter/material.dart';
class Demo extends StatefulWidget {
@override
DemoState createState() => new DemoState();
}
class DemoState extends State<Demo> with TickerProviderStateMixin {
@override
View main.dart
import 'package:flutter/material.dart';
class LoginPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
void _profile() {
Navigator.popAndPushNamed(context, "/Profile");
}
return new Scaffold(
floatingActionButton: new FloatingActionButton(
You can’t perform that action at this time.