Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Laxman Bhattarai erluxman

🏠
Working from home
View GitHub Profile
View animatedfab.dart
import 'package:flutter/material.dart';
import 'rectangular_icon_button.dart';
class AnimatedFAB extends StatefulWidget {
const AnimatedFAB({Key key, this.icon, this.color, this.items})
: super(key: key);
final Color color;
final Widget icon;
final List<SecondaryButtonParams> items;
@erluxman
erluxman / package.json
Created Jul 14, 2020
Package json for SO question
View package.json
{
"name": "erluxman",
"private": true,
"engines": {
"node": "14.x"
},
"description": "Erluxman",
"version": "1.0.0",
"author": "Laxman Bhattarai <erluxman@gmail.com>",
"bugs": {
@erluxman
erluxman / gatsby-config.js
Created Jul 14, 2020
GatsbyConfigfile for stackoverflow question
View gatsby-config.js
module.exports = {
siteMetadata: {
title: 'erluxman',
author: 'Laxman Bhattarai',
description: 'My Journey with Code',
siteUrl: 'https://erluxman.com',
social: {
twitter: '@erluxman',
},
},
View defaulttextstyle.dart
import 'package:flirt/flirt.dart';
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
View connectivitydemo.dart
import 'dart:async';
import 'package:connectivity/connectivity.dart';
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
@erluxman
erluxman / autocompleteTextfield.dart
Created Jul 6, 2020
Autocomplete Text Field in Flutter
View autocompleteTextfield.dart
import 'package:flutter/material.dart';
import 'package:flutter_typeahead/flutter_typeahead.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
View firebase_auth_repo.dart
import 'package:apple_sign_in/apple_sign_in.dart';
import 'package:firebase_auth/firebase_auth.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_facebook_login/flutter_facebook_login.dart';
import 'package:google_sign_in/google_sign_in.dart';
import 'package:rxdart/rxdart.dart';
import 'package:toast_badge/toast_badge.dart';
/* Add the following dependencies to fully use it
View doughdemo.dart
import 'package:dough/dough.dart';
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return DoughRecipe(
data: DoughRecipeData(
@erluxman
erluxman / numrounding.dart
Created Jun 29, 2020
Num dounding to 1, 1.5, 2.0 et
View numrounding.dart
main(){
print(round(2.4));
print(round(2.1));
print(round(2.6));
print(round(2.8));
}
double round(double num){
double decimal = double.parse((num - num.toInt()).toStringAsFixed(1));
@erluxman
erluxman / rectangularnotch.dart
Created Apr 28, 2020
Rectangular notched Fab
View rectangularnotch.dart
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(