style: Use .isEven instead of '% 2 == 0'

This commit is contained in:
PapaTutuWawa 2022-08-03 16:33:22 +02:00
parent 37155d2a87
commit a95a1e3a8d

View File

@ -93,7 +93,7 @@ void main() {
for (var i = 0; i < 100; i++) {
final messageText = 'Hello, dear $i';
if (i % 2 == 0) {
if (i.isEven) {
// Alice encrypts a message
final aliceRatchetResult = await alicesRatchet.ratchetEncrypt(utf8.encode(messageText));
print('Alice sent the message');