Skip to content

Instantly share code, notes, and snippets.

View Piinks's full-sized avatar
💈
Yak shavin'

Kate Lovett Piinks

💈
Yak shavin'
View GitHub Profile
@Piinks
Piinks / main.dart
Created October 17, 2023 19:50
Repro Customer Issue
import 'package:flutter/material.dart';
void main() {
runApp(const BugExample());
}
class BugExample extends StatelessWidget {
const BugExample();
@override
@Piinks
Piinks / main.dart
Created August 10, 2023 19:42
Mouse wheel checker
// 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 'dart:math' as math;
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
@Piinks
Piinks / main.dart
Last active January 18, 2024 21:24
Two Dimensional Grid in Flutter
// 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 'dart:math' as math;
import 'package:flutter/foundation.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
@Piinks
Piinks / main.dart
Created August 9, 2023 18:29
New Slivers
// 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
@Piinks
Piinks / main.dart
Created August 7, 2023 22:48
Intercepting mouse scrolling when nesting scroll views
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
void main() => runApp(App());
class App extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
@Piinks
Piinks / main.dart
Created February 17, 2023 23:17
TextField in a ListView comes into focus ✅
import 'package:flutter/material.dart';
void main() => runApp(Demo());
class Demo extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: ListView.builder(
@Piinks
Piinks / main.dart
Created July 29, 2022 22:02
Playing with dynamic grid layout
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.
@Piinks
Piinks / main.dart
Last active July 11, 2022 20:58
Grid Examples
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@Piinks
Piinks / main.dart
Created September 29, 2020 17:49
NestedScrollView Example
import 'package:flutter/material.dart';
final Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatefulWidget {
@override
@Piinks
Piinks / main.dart
Created August 17, 2020 22:13
Inverted scrollables
import 'package:flutter/material.dart';
void main() {
runApp(MaterialApp(home: Home()));
}
class Home extends StatefulWidget {
@override
State createState() => HomeState();
}