Skip to content

Instantly share code, notes, and snippets.

ListView.builder(
itemCount: data == null ? 1 : data.length + 1,
itemBuilder: (BuildContext context, int index) {
if (index == 0) {
// return the header
return new Column(...);
}
index -= 1;
// return row
@horgag1
horgag1 / gist:ea7f673e60b8216066b8fd3af5b66525
Created October 2, 2018 13:45
Rounded button ... suitable for login button on home page
import 'package:flutter/material.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Title',
home: LoginButt(),
Widget genrateBluredImage() {
return new Container(
decoration: new BoxDecoration(
image: new DecorationImage(
image: new AssetImage('assets/horse.jpg'),
fit: BoxFit.cover,
),
),
//I blured the parent conainer to blur background image, you can get rid of this part
child: BackdropFilter(
import 'dart:async';
import 'dart:convert';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
Future<List<Result>> fetchResults(http.Client client) async {
final response = await client.get('https://api.myjson.com/bins/j5xau');
import 'package:flutter/material.dart';
import 'package:wellspingapp/wellspring_icons.dart';
import 'package:wellspingapp/auth_provider.dart';
import 'package:wellspingapp/sessions_page.dart';
import 'package:wellspingapp/app_data.dart';
import 'package:wellspingapp/play_page.dart';
import 'package:flutter_svg/flutter_svg.dart';
class BottomNavBar extends StatefulWidget {
<?xml version="1.0" encoding="UTF-8"?>
<svg width="246px" height="257px" viewBox="0 0 246 257" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 52.6 (67491) - http://www.bohemiancoding.com/sketch -->
<title>mask_purple_energizer</title>
<desc>Created with Sketch.</desc>
<defs>
<linearGradient x1="0%" y1="0%" x2="101.999998%" y2="100.999999%" id="linearGradient-1">
<stop stop-color="#3023AE" offset="0%"></stop>
<stop stop-color="#C86DD7" offset="100%"></stop>
</linearGradient>
class _ListPageState extends State<ListPage> {
Future<DocumentReference> getPosts() async {
final FirebaseAuth _auth = FirebaseAuth.instance;
final Firestore _firestore = Firestore.instance;
FirebaseUser user = await _auth.currentUser();
DocumentReference ref = _firestore.collection('users').document(user.uid);
return ref;
}
import 'dart:async';
import 'dart:io';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:firebase_storage/firebase_storage.dart';
import 'package:flutter/material.dart';
import 'package:flutter_chat_demo/const.dart';
import 'package:fluttertoast/fluttertoast.dart';
import 'package:image_picker/image_picker.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'dart:async';
import 'dart:io';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:firebase_storage/firebase_storage.dart';
import 'package:flutter/material.dart';
import 'package:flutter_chat_demo/const.dart';
import 'package:fluttertoast/fluttertoast.dart';
import 'package:image_picker/image_picker.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:flutter/material.dart';
import 'package:flutter_calendar_carousel/flutter_calendar_carousel.dart';
import 'package:flutter_calendar_carousel/classes/event.dart';
import 'package:flutter_calendar_carousel/classes/event_list.dart';
class CalendarPage2 extends StatefulWidget {
@override
_CalendarPage2State createState() => new _CalendarPage2State();