Skip to content

Instantly share code, notes, and snippets.

View GuiRitter's full-sized avatar

Guilherme Alan Ritter GuiRitter

  • Rio Grande do Sul, Brazil
View GitHub Profile
@GuiRitter
GuiRitter / main.dart
Last active October 17, 2023 13:08
Lack of DropDownButton menu shadow theming in Flutter
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override

Hi everyone.

Ever since I started uploading projects on GitHub, I thought it was a bad idea that the source code of some libraries had to be copied into projects so they could be imported, or that the project had to be configured in NetBeans after being downloaded.

I learned nothing about build automation or dependency management in Computer Engineering, so I had no idea how to tackle this problem.

Then, last year, I started working with Maven. It's exactly what I always wanted. Only now I had the time to look into it further to see how I could publish my libraries in a Maven compatible way.

If you are just getting started with programming, here's a summary of how it works: you declare on a project that you need a library. Then, in order to build or run the project, Maven downloads the library, keeps it somewhere centralized, and links both together. This way, you don't need to deal with the library files manually

@GuiRitter
GuiRitter / FitRectangleInRectangle.java
Last active August 5, 2018 22:21
Code to fit a rectangle inside another rectangle while keeping aspect ratio.
public final class FitRectangleInRectangle {
public static class Input {
public int height;
public int width;
public Input() {}