Skip to content

Instantly share code, notes, and snippets.

View Lootwig's full-sized avatar

David Lootwig

View GitHub Profile
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
@Lootwig
Lootwig / main.dart
Created May 1, 2021 08:47
Column inside ClipRect
import 'package:flutter/material.dart';
final Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
@Lootwig
Lootwig / main.dart
Created November 8, 2021 22:30
Navigator resets when inspector is used to select widget
import 'package:flutter/material.dart';
void main() => runApp(X());
class X extends StatelessWidget {
const X({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
@Lootwig
Lootwig / main.dart
Created December 8, 2021 17:09
bloc_maybe_statechange
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
import 'package:flutter/material.dart';
void main() => runApp(const MaterialApp(home:Scaffold(body: Center(child:A()))));
class A extends StatelessWidget {
const A({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
final from = [Object()];
@Lootwig
Lootwig / main.dart
Last active August 25, 2022 20:19
septemberAppBar
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
@Lootwig
Lootwig / voucher.ts
Created November 14, 2022 22:39
voucher-with-account
export class Voucher {
description: string;
rows: VoucherRow[];
constructor(description: string, rows: VoucherRow[]) {
this.description = description;
this.rows = rows;
}
get isBalanced(): boolean {
@Lootwig
Lootwig / voucher.ts
Created November 14, 2022 22:51
validator
export class Voucher {
description: string;
rows: VoucherRow[];
constructor(description: string, rows: VoucherRow[]) {
this.description = description;
this.rows = rows;
}
get isBalanced(): boolean {
@Lootwig
Lootwig / main.dart
Created August 9, 2023 13:02
solar-midnight-7981
import 'package:flutter/material.dart';
const Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
@Lootwig
Lootwig / main.dart
Created August 10, 2023 12:25
solar-midnight-7981
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// This widget is the root of your application.