Skip to content

Instantly share code, notes, and snippets.

Avatar

Jermaine Oppong graphicbeacon

View GitHub Profile
@graphicbeacon
graphicbeacon / main.dart
Last active Jun 26, 2020
Flutter Grid example with highlighted square
View main.dart
import 'package:flutter/material.dart';
void main() {
runApp(MaterialApp(
debugShowCheckedModeBanner: false, home: Scaffold(body: BoxApp())));
}
class BoxApp extends StatefulWidget {
@override
BoxAppState createState() => BoxAppState();
@graphicbeacon
graphicbeacon / index.html
Created Jun 20, 2020
Centering card with Materialize example
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<!-- Compiled and minified CSS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css">
<!-- Compiled and minified JavaScript -->
@graphicbeacon
graphicbeacon / server.dart
Created May 25, 2020
Shelf Dart Tutorial solution code
View server.dart
import 'dart:io';
import 'package:shelf/shelf.dart' as shelf;
import 'package:shelf/shelf_io.dart' as io;
// For Google Cloud Run, set _hostname to '0.0.0.0'.
const _hostname = 'localhost';
const _port = 8080;
void main(List<String> args) async {
@graphicbeacon
graphicbeacon / Dockerfile
Created May 17, 2020
Setup Dart with Docker
View Dockerfile
# ./Dockerfile
FROM google/dart-runtime
@graphicbeacon
graphicbeacon / main.dart
Last active Mar 22, 2020
Flutter slideout container with handle
View main.dart
import 'package:flutter/material.dart';
void main() => runApp(
MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
body: Page(),
),
),
);
@graphicbeacon
graphicbeacon / main.dart
Created Mar 21, 2020
Slideout container
View main.dart
import 'package:flutter/material.dart';
void main() => runApp(MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
body: Page()
)
));
class Page extends StatefulWidget {
@graphicbeacon
graphicbeacon / main.dart
Created Mar 21, 2020
Flutter AnimationController example
View main.dart
import 'package:flutter/animation.dart';
import 'package:flutter/material.dart';
void main() => runApp(MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
body: Padding(
padding: const EdgeInsets.only(top: 20, left: 20, right: 20),
child: PageAnimation()
)
@graphicbeacon
graphicbeacon / main.dart
Last active Mar 22, 2020
Flutter GestureDetector example - draggable square
View main.dart
import 'package:flutter/material.dart';
void main() => runApp(MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
body: Padding(
// padding: const EdgeInsets.only(top: 20, left: 20, right: 20),
padding: const EdgeInsets.all(0),
child: Page()
)
@graphicbeacon
graphicbeacon / main.dart
Created Mar 19, 2020
"Learn Dart Before you Flutter" Youtube video solution
View main.dart
class Order {
var _id;
var _reference;
var date;
var code;
List<String> bookings;
Order(this._id, this._reference, {this.date});
Order.withDiscount(this._id, this._reference, [this.code]) {
date = DateTime.now();
@graphicbeacon
graphicbeacon / main.dart
Last active Mar 19, 2020
"Build Your Own Forms in Flutter" video tutorial
View main.dart
import 'package:flutter/material.dart';
void main() => runApp(MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
body: Padding(
padding: const EdgeInsets.all(20),
child: PageForm()
)
)
You can’t perform that action at this time.