Skip to content

Instantly share code, notes, and snippets.

Avatar

Alex Bunting buntagonalprism

View GitHub Profile
View connections_code_standards.dart
// my_feature.dart
class MyFeatureLauncher {
final _factory = di<MyFeatureBlocFactory>();
void show(BuildContext context) {
Navigator.of(context).push(MaterialPageRoute(
settings: RouteSettings(name: '/my-feature'),
builder: (context) => BlocProvider(
block: _factory.init(diCon<Strings>(context)),
@buntagonalprism
buntagonalprism / Individual Flutter Stateless Widget.dart
Created Jun 7, 2018
Individual Flutter Stateless Widget template file for inclusion in Medium article
View Individual Flutter Stateless Widget.dart
#set( $nameparts = $NAME.split("_"))
#set( $namepart = '')
#set( $classname = '')
#foreach( $namepart in $nameparts )
#set( $classname = $classname + $namepart.substring(0, 1).toUpperCase() + $namepart.substring(1))
#end
import 'package:flutter/material.dart';
class $classname extends StatelessWidget {
@buntagonalprism
buntagonalprism / Individual Flutter Stateful Widget.dart
Created Jun 7, 2018
Individual Flutter Stateful Widget template file for inclusion in Medium article
View Individual Flutter Stateful Widget.dart
#set( $nameparts = $NAME.split("_"))
#set( $namepart = '')
#set( $classname = '')
#foreach( $namepart in $nameparts )
#set( $classname = $classname + $namepart.substring(0, 1).toUpperCase() + $namepart.substring(1))
#end
import 'package:flutter/material.dart';
class $classname extends StatefulWidget {
@buntagonalprism
buntagonalprism / Individual Dart JSON Model.dart
Last active Jun 7, 2018
Individual Dart JSON Model class template file for inclusion in Medium article
View Individual Dart JSON Model.dart
#set( $nameparts = $NAME.split("_"))
#set( $namepart = '')
#set( $classname = '')
#foreach( $namepart in $nameparts )
#set( $classname = $classname + $namepart.substring(0, 1).toUpperCase() + $namepart.substring(1))
#end
import 'package:json_annotation/json_annotation.dart';
part #[[']]#$NAME#[[.g.dart']]#;
@buntagonalprism
buntagonalprism / Individual Dart Class.dart
Last active Jun 7, 2018
Individual Dart Class template file for inclusion in Medium article
View Individual Dart Class.dart
#set( $nameparts = $NAME.split("_"))
#set( $namepart = '')
#set( $classname = '')
#foreach( $namepart in $nameparts )
#set( $classname = $classname + $namepart.substring(0, 1).toUpperCase() + $namepart.substring(1))
#end
class $classname {
// TODO: add class properties and methods
@buntagonalprism
buntagonalprism / Dart Class.dart
Last active Aug 21, 2020
Flutter and Dart collection of file templates for Android Studio development
View Dart Class.dart
#set( $nameparts = $NAME.split("_"))
#set( $namepart = '')
#set( $classname = '')
#foreach( $namepart in $nameparts )
#set( $classname = $classname + $namepart.substring(0, 1).toUpperCase() + $namepart.substring(1))
#end
class $classname {
// TODO: add class properties and methods
You can’t perform that action at this time.