Skip to content

Instantly share code, notes, and snippets.

View erluxman's full-sized avatar
🏠
Working from home

Laxman Bhattarai erluxman

🏠
Working from home
View GitHub Profile
@erluxman
erluxman / wordlesolver.dart
Created March 27, 2022 14:14
Wordle Solver
void main() {
final selectedWords = all_words.where((word) {
return
//word.has("m", rightPositions: [0]) &&
//word.has("o", rightPositions: [2]) &&
word.has("m", wrongPositions: [0,1,3]) &&
word.has("p", wrongPositions: [2]) &&
word.has("y", wrongPositions: [4]) &&
word.lacks("o") &&
word.lacks("u") &&
@erluxman
erluxman / AndroidShellCommand.kt
Created November 19, 2021 05:25
Run shell commands from android app with kotlin
/*
* Copyright (C) 2021 Jared Rummler
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@erluxman
erluxman / animatedfab.dart
Created January 17, 2021 16:17
Animatedfab
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 July 14, 2020 11:22
Package json for SO question
{
"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 July 14, 2020 11:21
GatsbyConfigfile for stackoverflow question
module.exports = {
siteMetadata: {
title: 'erluxman',
author: 'Laxman Bhattarai',
description: 'My Journey with Code',
siteUrl: 'https://erluxman.com',
social: {
twitter: '@erluxman',
},
},
@erluxman
erluxman / defaulttextstyle.dart
Created July 10, 2020 15:15
DefaultTextstyle
import 'package:flirt/flirt.dart';
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
@erluxman
erluxman / connectivitydemo.dart
Created July 7, 2020 09:54
Connectivity Demo
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 July 6, 2020 08:18
Autocomplete Text Field in Flutter
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,
@erluxman
erluxman / firebase_auth_repo.dart
Last active July 6, 2020 03:51
FirebaseAuthRepo
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
@erluxman
erluxman / doughdemo.dart
Created July 5, 2020 12:01
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(