Skip to content

Instantly share code, notes, and snippets.

View theindianappguy's full-sized avatar
:octocat:
Working...

Sanskar Tiwari theindianappguy

:octocat:
Working...
View GitHub Profile
@theindianappguy
theindianappguy / README-Template.md
Last active March 7, 2020 03:52 — forked from PurpleBooth/README-Template.md
A template to make good README.md
@theindianappguy
theindianappguy / main.dart
Last active March 12, 2020 13:22
Memory Game - DartPad
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {

Image Picker plugin for Flutter

pub package

A Flutter plugin for iOS and Android for picking images from the image library, and taking new pictures with the camera.

Installation

First, add image_picker as a dependency in your pubspec.yaml file.

@theindianappguy
theindianappguy / GitCommitEmoji.md
Created May 1, 2020 07:17 — forked from parmentf/GitCommitEmoji.md
Git Commit message Emoji
@theindianappguy
theindianappguy / widget.dart
Last active May 12, 2020 05:44
appBar for ChatApp
import 'package:flutter/material.dart';
Widget appBarMain(BuildContext context) {
return AppBar(
title: Image.asset(
"assets/images/logo.png",
height: 40,
),
elevation: 0.0,
centerTitle: false,
@theindianappguy
theindianappguy / signin.dart
Created May 12, 2020 06:06
SignIn Screen UI for ChatApp
import 'package:flutter/material.dart';
class SignIn extends StatefulWidget {
@override
_SignInState createState() => _SignInState();
}
class _SignInState extends State<SignIn> {
@theindianappguy
theindianappguy / widgets.dart
Created May 12, 2020 06:13
InputDecoration textFieldInputDecoration for Flutter Chat App
InputDecoration textFieldInputDecoration(String hintText) {
return InputDecoration(
hintText: hintText,
hintStyle: TextStyle(color: Colors.white54),
focusedBorder:
UnderlineInputBorder(borderSide: BorderSide(color: Colors.white)),
enabledBorder:
UnderlineInputBorder(borderSide: BorderSide(color: Colors.white)));
}
@theindianappguy
theindianappguy / auth_chat_app.dart
Created May 12, 2020 07:45
auth.dart file for Chat App Tutorial
import 'package:chatapp/models/user.dart';
import 'package:chatapp/views/chat.dart';
import 'package:firebase_auth/firebase_auth.dart';
import 'package:flutter/material.dart';
import 'package:google_sign_in/google_sign_in.dart';
class AuthService {
final FirebaseAuth _auth = FirebaseAuth.instance;
User _userFromFirebaseUser(FirebaseUser user) {
@theindianappguy
theindianappguy / signup_function_in_signup.dart
Last active December 11, 2020 15:12
Signup function in signup.dart Chat App with Flutter and Firebase
singUp() async {
if(formKey.currentState.validate()){
setState(() {
isLoading = true;
});
await authService.signUpWithEmailAndPassword(emailEditingController.text,
passwordEditingController.text).then((result){
class HomePage extends StatefulWidget {
@override
_HomePageState createState() => _HomePageState();
}
class _HomePageState extends State<HomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(