Skip to content

Instantly share code, notes, and snippets.

View Christopher2K's full-sized avatar
🎯
Focusing

Christopher N. KATOYI Christopher2K

🎯
Focusing
View GitHub Profile
@Christopher2K
Christopher2K / widget.dart
Last active May 8, 2022 17:38
[Programmatically open drawer from scaffold directly] How to open scaffold's drawer with code #flutter #dart
class Widget extends StatelessWidget {
final GlobalKey<ScaffoldState> _drawerKey = GlobalKey();
void _openDrawer () {
_drawerKey.currentState.openDrawer();
}
@override
Widget build(BuildContext context) {
return Scaffold(
@Christopher2K
Christopher2K / colors.scss
Last active October 6, 2022 03:32
Tailwind sucks so I made a worse kit
@use "sass:color";
@use "sass:math";
@use "sass:map";
@use "theme";
@function generate_color_shades($base_color, $color_name) {
$colors: ();
$base_lightness: math.ceil(color.lightness($base_color));