Skip to content

Instantly share code, notes, and snippets.

Avatar

Sebas LG sebaslogen

  • Q42
  • Amsterdam
View GitHub Profile
View RobotTestExample.kt
@Before
@Throws(Exception::class)
fun setUp() {
ShadowLog.stream = System.out // Redirect Logcat to console
}
View RobolectricTest.kt
@RunWith(RobolectricTestRunner::class)
class MyTests {
@get:Rule val composeTestRule = createComposeRule()
@Test fun `when I test, then it works`() {
// Some test code here
}
}
@sebaslogen
sebaslogen / main.dart
Created Jan 12, 2020
Flutter Neumorphism
View main.dart
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
@sebaslogen
sebaslogen / main.dart
Created Jan 10, 2020
Flutter colored slider experiment
View main.dart
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
debugShowCheckedModeBanner: false,
View keybase.md

Keybase proof

I hereby claim:

  • I am sebaslogen on github.
  • I am sebaslogen (https://keybase.io/sebaslogen) on keybase.
  • I have a public key ASC32nccv5aNWfjyCGsuI4fwejoCRfoApEyoxnwE5TwRjgo

To claim this, I am signing this object:

@sebaslogen
sebaslogen / create-playlist-button.json
Last active Jan 27, 2020
Create playlist button from Server Driven UI JSON example for post
View create-playlist-button.json
"button": {
"title": "Create your first playlist",
"action": {
"type": "command",
"url": "/command/endpoint?path=%2Fcommand%2Fcreate-playlist",
"prompt": {
"type": "textInput",
"message": "Give your playlist a name.",
"placeholder": "My first playlist",
"confirmButtonTitle": "Create"
@sebaslogen
sebaslogen / sdui-data-classes.kt
Last active Aug 9, 2019
Server Driven UI post: Kotlin data classes
View sdui-data-classes.kt
data class ComponentScreen(val title: String?, val sections: List<Section> = emptyList())
sealed class Section
data class AlbumListSection(val title: String?, val items: List<AlbumListItem>) : Section()
data class ShelfSection(val shelfStyle: ShelfItemStyle, val items: List<ShelfItem>) : Section()
data class TrackListSection(val items: List<TrackListItem>) : Section()
data class AlbumListItem(val title: String, val image: String, val action: Action)
@sebaslogen
sebaslogen / item-server-driven-ui.json
Last active Sep 12, 2019
Item from Server Driven UI JSON example for post
View item-server-driven-ui.json
{
"title": "Dance - Smith Quartet",
"image": "https://demo.com/624.jpg",
"action": {
"type": "ComponentScreen",
"url": "/query/view/album/635212023624"
}
}
@sebaslogen
sebaslogen / server-driven-ui.json
Last active Aug 8, 2019
Server Driven UI simple JSON example for post
View server-driven-ui.json
{
"type": "componentScreen",
"title": "Home",
"sections": [
{
"title": "New Releases",
"type": "album",
"items": [
{
"title": "Dance - Smith Quartet",
@sebaslogen
sebaslogen / old-style.json
Last active Aug 8, 2019
Old style json for Server Driven UI post
View old-style.json
[
{
"id": 0362403,
"title": "Dance - Smith Quartet",
"image": "https://demo.com/03624.jpg"
},
{
"id": 06083706,
"title": "Sixteen Contemporary Love Songs for Piano",
"image": "https://demo.com/060837.jpg"