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
// 1 | |
return MergeSemantics( | |
child: ListTileTheme.merge( | |
selectedColor: activeColor ?? Theme.of(context).accentColor, | |
// 2 | |
child: ListTile( | |
leading: leading, | |
// 3 | |
title: title, | |
subtitle: subtitle, |
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
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()), |
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
const ExcludeSemantics( | |
child: Text( | |
'This month', | |
style: TextStyle(fontSize: 16, color: Colors.grey), | |
), | |
), |
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
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', |
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
Text( | |
amount.toString(), | |
semanticsLabel: 'The balance for this month is ${amount} dollars', | |
style: const TextStyle(fontSize: 48), | |
), |
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
//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 |
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
// Android | |
startActivity( | |
FlutterActivity | |
.withCachedEngine("my_engine_id") | |
.build(this)) | |
val mc = BasicMessageChannel(flutterEngine.dartExecutor.binaryMessenger, CHANNEL, StringCodec.INSTANCE) | |
mc.send(Gson().toJson(quote)) | |
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
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 |
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
{ | |
repositoryOwner(login: "enzoftware") { | |
... on User { | |
pinnedRepositories(first: 6) { | |
edges { | |
node { | |
name | |
description | |
primaryLanguage { | |
name |
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
package com.dupla.dupla.db | |
import android.content.Context | |
import android.database.sqlite.SQLiteDatabase | |
import android.database.sqlite.SQLiteOpenHelper | |
import android.util.Log | |
/** | |
* Created by enzoftware on 4/20/18. |
NewerOlder