Skip to content

Instantly share code, notes, and snippets.

View swavkulinski's full-sized avatar

Swav Kulinski (Robotoaster) swavkulinski

View GitHub Profile
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../core-pages/core-pages.html">
<polymer-element name="my-element">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu-button/core-menu-button.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html">
<link rel="import" href="../paper-input/paper-input.html">
<polymer-element name="my-element">
@swavkulinski
swavkulinski / KSP.log
Last active April 2, 2016 15:09
MM error while loading Koprnicus in KSP 1.1
[ERR 14:07:39.286] AssemblyLoader: Exception loading 'ModuleManager': System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.
at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (bool)
at System.Reflection.Assembly.GetTypes () [0x00000] in <filename unknown>:0
at AssemblyLoader.LoadAssemblies () [0x00000] in <filename unknown>:0
Additional information about this exception:
System.TypeLoadException: Could not load type 'ModuleManager.MMPatchLoader' from assembly 'ModuleManager.2.6.18, Version=2.6.18.0, Culture=neutral, PublicKeyToken=null'.
System.TypeLoadException: Could not load type 'Command' from assembly 'ModuleManager.2.6.18, Version=2.6.18.0, Culture=neutral, PublicKeyToken=null'.
@swavkulinski
swavkulinski / A1.craft
Last active April 3, 2016 09:50
Stage fuel indicator bug KSP 1.1
ship = A1
version = 1.1.0
description =
type = VAB
size = 8.479259,64.68391,8.479258
PART
{
part = KW2mDecoupler_4294097888
partName = Part
pos = 0.2733724,48.80578,1.344893
@swavkulinski
swavkulinski / cupertino_navigation_bar_constructor.dart
Created February 27, 2018 19:10
CupertinoNavigationBar constructor
CupertinoNavigationBar ({
this.leading,
this.middle,
})
@swavkulinski
swavkulinski / app_bar_constructor.dart
Created February 27, 2018 19:12
AppBar constructor
AppBar ({
this.leading,
this.title
})
@swavkulinski
swavkulinski / platform_widget.dart
Created February 27, 2018 19:14
PlatformWidget
import 'package:flutter/material.dart';
import 'dart:io' show Platform;
abstract class PlatformWidget<I extends Widget, A extends Widget> extends StatelessWidget {
@override
Widget build(BuildContext context) {
if(Platform.isAndroid) {
return createAndroidWidget(context);
} else if (Platform.isIOS) {
@swavkulinski
swavkulinski / platform_app_bar.dart
Last active February 27, 2018 19:17
PlatformAppBar
class PlatformAppBar extends PlatformWidget<CupertinoNavigationBar, AppBar> {
final Widget leading;
final Widget title;
PlatformWidget({
this.leading,
this.title,
});
@swavkulinski
swavkulinski / other_platform_widget.dart
Created February 28, 2018 07:56
Scaffold and Button widgets
class PlatformScaffoldWidget extends PlatformWidget<CupertinoPageScaffold,Scaffold> {
...
}
class PlatformButton extends PlatformWidget<CupertinoButton,FlatButton> {
...
}
@swavkulinski
swavkulinski / used_platform_scaffold.dart
Created February 28, 2018 07:58
Platform aware scaffold
Widget build(BuildContext context) =>
new PlatformScaffoldWidget(
appBar : new PlatformAppBarWidget(
leading: new PlatformButton (
child: new Icon(Icons.ic_arrow_back),
onClick: () => _handleBack()
),
title: new Text ("I love my Platform"),
),
content: ...