Skip to content

Instantly share code, notes, and snippets.

View enzoftware's full-sized avatar
:shipit:
Probably sleeping

Enzo Lizama Paredes enzoftware

:shipit:
Probably sleeping
View GitHub Profile
// Follow this setup guide to integrate the Deno language server with your editor:
// https://deno.land/manual/getting_started/setup_your_environment
// This enables autocomplete, go to definition, etc.
// Setup type definitions for built-in Supabase Runtime APIs
import "jsr:@supabase/functions-js/edge-runtime.d.ts";
Deno.serve(async (req)=>{
const productAndroidYearly = 'wordia_pro_1:yearly-autorenew';
const productAndroidMonthly = 'wordia_pro_1:monthly-autorenew';
const productIosYearly = 'wordia_3599_1y_7dtrial';
const productIosMonthly = 'wordia_499_1m';
// 1
return MergeSemantics(
child: ListTileTheme.merge(
selectedColor: activeColor ?? Theme.of(context).accentColor,
// 2
child: ListTile(
leading: leading,
// 3
title: title,
subtitle: subtitle,
return Semantics(
label: 'Transaction $type of $amount on $date',
// 1
child: ExcludeSemantics(
// 2
child: ListTile(
leading: TransactionIndicator(transactionType: transaction.type),
title: Text(transaction.description),
subtitle: Text(transaction.date),
trailing: Text(transaction.amount.toString()),
const ExcludeSemantics(
child: Text(
'This month',
style: TextStyle(fontSize: 16, color: Colors.grey),
),
),
Widget build(BuildContext context) {
// 1
final type = transaction.type.value();
final amount = transaction.amount;
final date = transaction.date;
// 2
return Semantics(
// 3
label: 'Transaction $type of $amount on $date',
Text(
amount.toString(),
semanticsLabel: 'The balance for this month is ${amount} dollars',
style: const TextStyle(fontSize: 48),
),
//1
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import 'package:flutter_transaction_tracker/main.dart';
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
// 2
testWidgets('bySemanticsLabel test', (WidgetTester tester) async {
// 3
// Android
startActivity(
FlutterActivity
.withCachedEngine("my_engine_id")
.build(this))
val mc = BasicMessageChannel(flutterEngine.dartExecutor.binaryMessenger, CHANNEL, StringCodec.INSTANCE)
mc.send(Gson().toJson(quote))
@enzoftware
enzoftware / QuickSort.kt
Created October 6, 2018 20:37
PR of quicksort implementation for al-go-rithms
fun divideArr(array : ArrayList<Int>,low : Int, top : Int) : Int{
val pivot = array[top]
var i = (low - 1)
for (j in low .. top){
if(array[j] <= pivot){
i++
val t = array[i]
array[i] = array[j]
array[j] = t
@enzoftware
enzoftware / request.txt
Created September 7, 2018 05:09
Github GraphQL API Request to get my pinned repositories
{
repositoryOwner(login: "enzoftware") {
... on User {
pinnedRepositories(first: 6) {
edges {
node {
name
description
primaryLanguage {
name