This file contains hidden or 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:html'; | |
import 'package:camera/camera.dart'; | |
import 'package:flutter/material.dart'; | |
Future<void> main() async { | |
runApp(CameraApp()); | |
} | |
class CameraApp extends StatefulWidget { |
This file contains hidden or 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
String prettyHex(List<int> bytes, int length) { | |
final buffer = StringBuffer(); | |
for (var i = 0; i < bytes.length; i += length) { | |
final list = bytes.sublist(i, min(i + length, bytes.length)); | |
final l1 = list.map((e) => e.toRadixString(16).padLeft(2, '0')).toList(); | |
final l2 = list.map((e) { | |
if (e > 0 && e < 128) { | |
return ascii.decode([e]); | |
} | |
return '.'; |
This file contains hidden or 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:benchmark_harness/benchmark_harness.dart'; | |
final list = List.generate(100000, (index) => index); | |
class CollectionForBenchmark extends BenchmarkBase { | |
const CollectionForBenchmark() : super('CollectionFor'); | |
static void main() { | |
CollectionForBenchmark().report(); | |
} |
OlderNewer