Skip to content

Instantly share code, notes, and snippets.

View caseycrogers's full-sized avatar
🐢

Casey Rogers caseycrogers

🐢
View GitHub Profile
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://cdnjs.cloudflare.com/ajax/libs/qrcodejs/1.0.0/qrcode.min.js"
integrity="sha512-CNgIRecGo7nphbeZ04Sc13ka07paqdeTu0WR1IM4kNcpmBAUSHSQX0FslNhTDadL4O5SAGapGt4FodqL8My0mA=="
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<title>Swipeball</title>
class DropdownMenu extends StatefulWidget {
const DropdownMenu({
super.key,
required this.name,
required this.child,
required this.overlayBuilder,
});
final String name;
final Widget child;
@caseycrogers
caseycrogers / draggable_yeetable_sheet.dart
Last active November 1, 2023 04:43
Sheet that snaps between open and dismissed
class DraggableYeetableSheet extends StatefulWidget {
const DraggableYeetableSheet({super.key});
@override
State<DraggableYeetableSheet> createState() => _DraggableYeetableSheetState();
}
class _DraggableYeetableSheetState extends State<DraggableYeetableSheet> {
final DraggableScrollableController sheetController =
DraggableScrollableController();
@caseycrogers
caseycrogers / button_wrapper.dart
Created October 30, 2023 23:07
Logging and Error Displaying Button Wrapper
class LoggingElevatedButton extends ElevatedButton implements ActionLogger {
LoggingElevatedButton({
required this.name,
this.parameters,
this.onError,
AsyncCallback? onPressed,
required super.child,
super.style,
}) : super(
@caseycrogers
caseycrogers / ensure_visible_test.dart
Created October 5, 2023 19:59
testing ensure visible
void main() async {
FutureBuilder.debugRethrowError = true;
runApp(const _ScrollTestWidget());
}
class _ScrollTestWidget extends StatefulWidget {
const _ScrollTestWidget();
@override
State<_ScrollTestWidget> createState() => _ScrollTestWidgetState();
@caseycrogers
caseycrogers / container_widget.dart
Created June 14, 2023 17:32
An alternative to the extension method system for styling widgets without excessive nesting.
import 'package:flutter/material.dart';
abstract class StatelessContainerWidget extends StatelessWidget {
/// A constructor that exposes all of the `Container` arguments as a style
/// object.
const StatelessContainerWidget({
super.key,
this.cStyle,
});
@caseycrogers
caseycrogers / declarative_page_view_demo.dart
Last active May 9, 2023 22:23
Declarative Page View Demo
class DeclarativePageDemo extends StatefulWidget {
const DeclarativePageDemo({super.key});
@override
State<DeclarativePageDemo> createState() => _DeclarativePageDemoState();
}
class _DeclarativePageDemoState extends State<DeclarativePageDemo> {
ValueNotifier<PageValue> pageNotifier = ValueNotifier(PageValue.home);
@caseycrogers
caseycrogers / countdown_timer.dart
Created April 21, 2023 05:32
A CountDown Timer Because Dart Team Couldn't Be Bothered
class CountdownTimer extends ValueListenable<Duration> with ChangeNotifier {
CountdownTimer(this.duration, {this.frequency});
final Duration duration;
final Duration? frequency;
final Stopwatch _stopwatch = Stopwatch();
Timer? _timer;
import 'package:flutter/material.dart';
class MyWidget extends StatefulWidget {
const MyWidget({Key? key}) : super(key: key);
@override
State<MyWidget> createState() => _MyWidgetState();
}
class _MyWidgetState extends State<MyWidget> {
Hey Casey,
Unfortunately, we're not going to move forward with your application at this moment. Interviewing is a messy process, and we know that we'll inevitably make mistakes as we iron out our process. We also believe in giving the people we interview honest feedback.
This was a tough decision for us. We thought you coded very methodically during the interview, paying good attention to what it was doing and being carefully to test it. We really liked your overall process and approach to problem solving.
However we made the decision because we didn't see the depth of knowledge we'd need in order to move forward. While your coding process was good, it also showed your lack of experience at times. There was some slowness and awkwardness with Python (having to think for a while about row-major and column-major representations), and not enough knowledge about HTTP, databases, and binary data representation.
We really don't want to discourage you too much though. Interviews are tough and we all have days we