Skip to content

Instantly share code, notes, and snippets.

View nkraev's full-sized avatar

Nikita Kraev nkraev

View GitHub Profile
@nkraev
nkraev / main.dart
Created March 15, 2018 22:44
Flutter column not expanding :(
import 'package:flutter/material.dart';
class DemoApp extends StatelessWidget {
Widget build(BuildContext context) => new Scaffold(body: DashboardWidget(() {
return [
Tab(
text: "Goodbye!",
)
];
}));
@nkraev
nkraev / template.dart
Created March 14, 2018 18:25
This gist shows the GestureDetector usage on latest dart 2 preview version
import 'package:flutter/material.dart';
class SignaturePainter extends CustomPainter {
SignaturePainter(this.points);
final List<Offset> points;
void paint(Canvas canvas, Size size) {
Paint paint = new Paint()
..color = Colors.black
@nkraev
nkraev / build.gradle
Created December 25, 2017 14:15
Variant-aware gradle configuration for replacing manifest placeholders and resources
android.applicationVariants.all { variant ->
String propsName = "../local/${variant.baseName}.properties"
Properties props = new Properties()
props.load(new FileInputStream(file(propsName)))
println "Building \"${variant.baseName}\" tag..."
props.stringPropertyNames().forEach {
variant.resValue("string", it, props[it])
}