Skip to content

Instantly share code, notes, and snippets.

View RobertBrunhage's full-sized avatar

Robert Brunhage RobertBrunhage

View GitHub Profile
@RobertBrunhage
RobertBrunhage / main.dart
Last active May 7, 2023 11:38
Dart 3 examples
// ------- Different class declarations -------
base class BaseClassExample {}
mixin class MiximClassExample {}
final class FinalClassExample {}
// ------- Different class usages -------
@RobertBrunhage
RobertBrunhage / material_bottomsheet_hell.dart
Last active May 9, 2023 05:41
A usage of material bottomsheet that should push the bottomsheet up in case of keyboard, but doesn't
import 'package:flutter/material.dart';
const Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
import 'package:flutter/material.dart';
const Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@RobertBrunhage
RobertBrunhage / .gitconfig
Last active July 21, 2023 18:45
Ignore files/folders that makes me cringe
[core]
excludesfile = ~/.gitignore
@RobertBrunhage
RobertBrunhage / neutral_color_extension.dart
Created February 3, 2025 07:39
A Theme extension to use neutral colors with automatic light and dark mode switching
import 'package:flutter/material.dart';
@immutable
class NeutralColors extends ThemeExtension<NeutralColors> {
final Color neutral50;
final Color neutral100;
final Color neutral200;
final Color neutral300;
final Color neutral400;
final Color neutral500;