Skip to content

Instantly share code, notes, and snippets.

View WesselvanDam's full-sized avatar

Wessel van Dam WesselvanDam

View GitHub Profile
@WesselvanDam
WesselvanDam / main.dart
Created November 19, 2023 20:28
CustomScrollView with overflow
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) => MaterialApp(
home: const MyHomePage(),
@WesselvanDam
WesselvanDam / main.dart
Last active November 19, 2023 22:03
CustomScrollView with overflow
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) => MaterialApp(
home: const MyHomePage(),
@WesselvanDam
WesselvanDam / main.dart
Last active January 30, 2023 23:34
DrawerDestination
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
debugShowCheckedModeBanner: false,
@WesselvanDam
WesselvanDam / animatedDrawer.dart
Created January 22, 2023 21:12
Demo of the Animated Drawer positioning problem
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return const MaterialApp(
@WesselvanDam
WesselvanDam / scaffoldBackgroundColorBug.dart
Created January 22, 2023 18:29
Example of the ScaffoldBackgroundColor being parsed incorrectly from a ColorScheme generated by the Material ThemeBuilder
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
@WesselvanDam
WesselvanDam / main.dart
Created January 19, 2023 14:47
silent-peak-0421
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
@WesselvanDam
WesselvanDam / main.dart
Created January 19, 2023 14:47
Counter example
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
@WesselvanDam
WesselvanDam / main.dart
Created January 19, 2023 14:46
Counter example
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
@WesselvanDam
WesselvanDam / multiple_widgets_used_same_globalkey.dart
Last active February 27, 2021 16:31
Minimal code example resulting in an error saying multiple widgets used the same GlobalKey.
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {