This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import "package:flutter/material.dart"; | |
import 'package:flutter/services.dart'; | |
import 'dart:math'; | |
const CURVE_HEIGHT = 160.0; | |
const AVATAR_RADIUS = CURVE_HEIGHT * 0.28; | |
const AVATAR_DIAMETER = AVATAR_RADIUS * 2; | |
void main() => runApp(new MyApp()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright 2018 Google Inc. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file | |
* except in compliance with the License. You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software distributed under the | |
* License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:async'; | |
import 'package:cloud_firestore/cloud_firestore.dart'; | |
import 'package:date_format/date_format.dart'; | |
import 'package:firebase_analytics/firebase_analytics.dart'; | |
import 'package:firebase_analytics/observer.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:native_widgets/native_widgets.dart'; | |
import 'package:songlist_pro/util/globals.dart' as globals; | |
import 'package:tonic/tonic.dart'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OpenJDK 1.8 | |
1. Follow the instructions from https://github.com/AdoptOpenJDK/homebrew-openjdk to tap and install jdk8. | |
2. Run the following command to create the necessary directories | |
sudo mkdir /Library/Java/JavaVirtualMachines/openjdk-1.8.0_172.jdk | |
sudo mkdir /Library/Java/JavaVirtualMachines/openjdk-1.8.0_172.jdk/Contents | |
sudo mkdir /Library/Java/JavaVirtualMachines/openjdk-1.8.0_172.jdk/Contents/MacOS | |
3. Run the following commands to link to the existing homebrew-openjdk install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyApp extends StatelessWidget { | |
Stream<int> _countUp() async* { | |
for (int i = 1; i <= 10; i++) { | |
yield await Future.delayed(Duration(seconds: 1), () => i); | |
} | |
} | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.squareup.moshi.Json | |
data class DbSchema(@field:Json(name = "formatVersion") val formatVersion: Int? = 0, @field:Json( | |
name = "database") val database: Database? = Database()) | |
data class Database(@field:Json(name = "version") val version: Int = 0, @field:Json(name = "identityHash") val identityHash: String? = "", @field:Json( | |
name = "entities") val entities: List<Entity?>? = listOf(), @field:Json(name = "setupQueries") val setupQueries: List<String?>? = listOf()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abstract class PlanetVisitor { | |
void visit({Planet planet}); | |
} | |
abstract class Planet { | |
void accept({PlanetVisitor visitor}); | |
} | |
class MoonJedah extends Planet { | |
@override |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.app.Activity | |
import android.graphics.Rect | |
import android.os.Build | |
import android.view.View | |
import android.view.ViewTreeObserver | |
import android.view.inputmethod.InputMethodManager | |
/** | |
* Created by mikepenz on 14.03.15. | |
* This class implements a hack to change the layout padding on bottom if the keyboard is shown |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
class Bubble extends StatelessWidget { | |
Bubble({this.message, this.time, this.delivered, this.isMe}); | |
final String message, time; | |
final delivered, isMe; | |
@override | |
Widget build(BuildContext context) { |