Skip to content

Instantly share code, notes, and snippets.

View maheshmnj's full-sized avatar
💭
Bring it on 🔥

Mahesh Jamdade maheshmnj

💭
Bring it on 🔥
View GitHub Profile
@maheshmnj
maheshmnj / ultra.dart
Last active December 17, 2023 20:50
Ultra Gradient in Flutter
import 'dart:ui';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@maheshmnj
maheshmnj / overlay.dart
Last active May 26, 2023 19:26
Overlay dimensions cannot be updated on window resize.
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
@maheshmnj
maheshmnj / lcsort.dart
Last active November 5, 2023 00:19
algorithm to sort the books using the Library of Congress col numbers
import 'dart:math';
void main() {
/// Enter list of LCNumbers to sort in quotes ("") separated by comma (,)
List<Book> books = <String>[
"GN799.A41 H6 2017",
"PQ4843.O53 G313",
"CR6005.O35 L3 1954",
"GN799.A41 H6 1937",
"ZR605.A35 H5 1979",
@maheshmnj
maheshmnj / mysql.md
Last active March 2, 2023 20:30
my sql workbench quick notes
@maheshmnj
maheshmnj / postgres.md
Last active February 10, 2024 20:10
docs for using postgres sql cli tool psql

Start the server (for installation see Install instructions)

pg_ctl -D /opt/homebrew/var/postgresql@14 start

Stop the server

pg_ctl -D /opt/homebrew/var/postgresql@14 start
@maheshmnj
maheshmnj / textfield_validator.dart
Last active May 29, 2023 17:03
validator with custom input field
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({
super.key,
});
@override
@maheshmnj
maheshmnj / vim.md
Last active August 21, 2022 17:18
Vim cheatsheet for beginners, A complete official cheatsheet can be found here https://vim.rtorr.com/
@maheshmnj
maheshmnj / copyWith.dart
Created July 12, 2022 14:08
CopyWith isn't working
import 'package:flutter/foundation.dart';
void main() {
final newWord = Word('123','hello','greet');
newWord.copyWith(id: '345',word:"edited word");
print(newWord.id); // `123` instead of `345`
print(newWord.word); // `hello` instead of `edited word`
}
@maheshmnj
maheshmnj / bottomnavbar.dart
Last active September 2, 2023 11:53
Demo app for a medium post "Everything about the Nested bottom navigation bar"
/*
* File: main.dart
* Project: BottomNavigationBar demo
* File Created: Wednesday, 26th May 2022 1:15:47 pm
* Author: Mahesh Jamdade
* -----
* Last Modified: Saturday, 28th May 2022 4:42:07 pm
* Modified By: Mahesh Jamdade
* -----
*/
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
Settings appSettings = Settings();
class MyApp extends StatelessWidget {
@override