Skip to content

Instantly share code, notes, and snippets.

View alfianyusufabdullah's full-sized avatar
📚
Sometimes playing with Code & Fish

Alfian Yusuf Abdullah alfianyusufabdullah

📚
Sometimes playing with Code & Fish
View GitHub Profile
fun main() {
println("Hello, world!!!")
}
open class Product {
fun setExpireDate(){
}
}
package com.dicoding.picodiploma.sejiwaproject.features.league.detail
import android.graphics.Color
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.bumptech.glide.Glide
import com.bumptech.glide.request.RequestOptions
import com.dicoding.picodiploma.sejiwaproject.R
import com.dicoding.picodiploma.sejiwaproject.commons.api.ApiRepository
import com.dicoding.picodiploma.sejiwaproject.features.match.next.NextMatchFragment
val inputLength = edtLength.text.toString().trim { it <= ' ' }
val inputWidth = edtWidth.text.toString().trim { it <= ' ' }
val inputHeight = edtHeight.text.toString().trim { it <= ' ' }
if (inputLength.isEmpty()) {
edtLength.error = "Field ini tidak boleh kosong"
return
}
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#008577</color>
<color name="colorPrimaryDark">#00574B</color>
<color name="colorAccent">#D81B60</color>
</resources>
Future<List<Meals>> loadMealsFromNetwork(String category) async {
var result = await httpRequest("$ENDPOINT_FILTER$category");
return generateMealList(result);
}
Future<Meals> loadMealsDetailFromNetwork(String id) async {
var result = await httpRequest("$ENDPOINT_LOCKUP$id");
return generateMeal(result);
}
import 'package:flutter_driver/flutter_driver.dart';
import 'package:test/test.dart';
import 'app_test_key.dart';
main() {
group("Application test", () {
FlutterDriver driver;
setUpAll(() async {
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillType="evenOdd"
android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
android:strokeWidth="1"
class MealsDetail extends StatefulWidget {
final String id;
final String category;
final String mealThumbs;
const MealsDetail({Key key, this.id, this.mealThumbs, this.category})
: super(key: key);
@override
_MealsDetailState createState() => _MealsDetailState();
class MainAdapter(private val teams: List<Team>)
: RecyclerView.Adapter<TeamViewHolder>() {
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): TeamViewHolder {
return TeamViewHolder(TeamUI().createView(AnkoContext.create(parent.context, parent)))
}
override fun onBindViewHolder(holder: TeamViewHolder, position: Int) {
holder.bindItem(teams[position])
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">