Skip to content

Instantly share code, notes, and snippets.

View drexel-ue's full-sized avatar

IKesh Pack drexel-ue

  • Ohio
View GitHub Profile
Controller
import 'package:trivia_black/model/point.dart';
import 'package:trivia_black/trivia_black.dart';
class PointController extends ResourceController {
PointController(this.context);
ManagedContext context;
@Operation.post('identifier')
@drexel-ue
drexel-ue / responsive_demo.dart
Last active July 16, 2020 01:21
Running this gist in pub.dev (https://dartpad.dev/7eb75e7bf34873f4e414420cf2374b79) will show a brief display of a scalable responsive design pattern
// Responsive design demo.
import 'package:flutter/material.dart';
void main() => runApp(ResponsiveDemo());
/// enum to denote the type of device we're dealing with based on the screen.
enum DeviceScreenType {
mobileSmall,
mobileMedium,
Scrollable(
axisDirection: AxisDirection.right,
controller: _pageController,
physics: const PageScrollPhysics(parent: ClampingScrollPhysics()),
viewportBuilder: (BuildContext context, ViewportOffset offset) {
return LayoutBuilder(
builder: (context, constraints) {
offset.applyViewportDimension(constraints.maxWidth);
offset.applyContentDimensions(0.0, constraints.maxWidth);
return AnimatedBuilder(
# A valid snippet should starts with:
#
# snippet trigger_word [ "description" [ options ] ]
#
# and end with:
#
# endsnippet
#
# Snippet options:
#
include: package:lint/analysis_options.yaml
analyzer:
strong-mode:
implicit-casts: true
implicit-dynamic: true
linter:
rules:
- always_declare_return_types
# - always_put_control_body_on_new_line