This file contains 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
RichPathView colorPickerRichPathView = findViewById(R.id.color_picker); | |
final RichPath bluePath = colorPickerRichPathView.findRichPathByName("bluePath"); | |
final RichPath redPath = colorPickerRichPathView.findRichPathByName("redPath"); | |
final RichPath greenPath = colorPickerRichPathView.findRichPathByName("greenPath"); | |
final RichPath purplePath = colorPickerRichPathView.findRichPathByName("purplePath"); | |
colorPickerRichPathView.setOnPathClickListener(new RichPath.OnPathClickListener() { | |
@Override | |
public void onClick(RichPath richPath) { | |
bluePath.setStrokeAlpha(0f); |
This file contains 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
<com.richpath.RichPathView | |
android:id="@+id/color_picker" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
app:vector="@drawable/color_picker" /> |
This file contains 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
RichPathView colorPickerRichPathView = findViewById(R.id.color_picker); | |
final RichPath bluePath = colorPickerRichPathView.findRichPathByName("bluePath"); | |
final RichPath redPath = colorPickerRichPathView.findRichPathByName("redPath"); | |
final RichPath greenPath = colorPickerRichPathView.findRichPathByName("greenPath"); | |
final RichPath purplePath = colorPickerRichPathView.findRichPathByName("purplePath"); | |
colorPickerRichPathView.setOnPathClickListener(new RichPath.OnPathClickListener() { | |
@Override | |
public void onClick(RichPath richPath) { | |
// reset all strokes |
This file contains 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
@Entity(tableName = "matches", | |
foreignKeys = [ | |
ForeignKey(entity = UserEntry::class, | |
parentColumns = arrayOf("id"), | |
childColumns = arrayOf("id")) | |
]) | |
data class UserEntry( | |
@PrimaryKey @ColumnInfo(name = "id") var id: Long? = null, | |
@ColumnInfo(name = "name") var name: String? = null, |
This file contains 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
@Entity(tableName = "eyes") | |
data class EyeEntry( | |
@PrimaryKey @ColumnInfo(name = "id") var id: Long? = null, | |
@ColumnInfo(name = "color") var color: String? = null | |
) |
This file contains 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:flare_flutter/flare_actor.dart"; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: 'The Boring Star', |
This file contains 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 io.github.tarek360.rules.core.Issue | |
import io.github.tarek360.rules.core.Level | |
import io.github.tarek360.rules.core.Report | |
import io.github.tarek360.rules.core.Rule | |
class NoJpgRule : Rule() { | |
override fun run(): Report? { | |
val report = Report(msgTitle = "No more JPG files, Use WebP.") |
This file contains 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 HeartsPainter extends CustomPainter { | |
final Paint hearPaint = Paint() | |
..style = PaintingStyle.stroke; | |
@override | |
void paint(Canvas canvas, Size size) { | |
print('Hearts Painting..'); | |
const int count = 700; | |
for (int i = 0; i < count; i++) { |
This file contains 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 Flip extends StatelessWidget { | |
final Widget child; | |
final double _scaleX; | |
final double _scaleY; | |
Flip.vertically({@required this.child}) | |
: _scaleX = 1.0, | |
_scaleY = -1.0; | |
Flip.horizontally({@required this.child}) |
This file contains 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:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( |