Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Laxman Bhattarai erluxman

🏠
Working from home
View GitHub Profile
View wordlesolver.dart
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 Nov 19, 2021
Run shell commands from android app with kotlin
View AndroidShellCommand.kt
/*
* 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
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(