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 March 28, 2024 20:52
Reverse chat layout
// Copyright 2019 the Dart project authors. 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});
@Piinks
Piinks / main.dart
Created December 5, 2023 22:49
Test scroll
// Run this sample as a:
// - Web app on Windows
// - Desktop app on Windows
// - Web app on Linux
// - Desktop app on Linux
// For each:
// - scroll with a physical mouse wheel
// (magic mouse from Apple does not count! It is treated as a trackpad)
// - scroll with trackpad
@Piinks
Piinks / main.dart
Created November 9, 2023 17:04
SliverVariedExtentList
// 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';
import 'package:flutter/rendering.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@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.