First create a hello.dart
file with the following content.
void main(List<String> args) {
print('Hello, World!');
}
Next we precompile this file using PRODUCT
AOT compiler (equivalent of running flutter build aot --release
).
+------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | |
| Library | Method | Diff (Bytes) | | |
+------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ |
+------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | |
| Library | Method | Diff (Bytes) | | |
+------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ |
diff --git a/lib/recase.dart b/lib/recase.dart | |
index da14cec..42a1251 100644 | |
--- a/lib/recase.dart | |
+++ b/lib/recase.dart | |
@@ -1,44 +1,94 @@ | |
+import 'dart:typed_data'; | |
+ | |
/// An instance of text to be re-cased. | |
class ReCase { | |
- final RegExp _upperAlphaRegex = new RegExp(r'[A-Z]'); |
First create a hello.dart
file with the following content.
void main(List<String> args) {
print('Hello, World!');
}
Next we precompile this file using PRODUCT
AOT compiler (equivalent of running flutter build aot --release
).
// Copyright (c) 2020, the Dart project authors. | |
// | |
// Redistribution and use in source and binary forms, with or without | |
// modification, are permitted provided that the following conditions are | |
// met: | |
// * Redistributions of source code must retain the above copyright | |
// notice, this list of conditions and the following disclaimer. | |
// * Redistributions in binary form must reproduce the above | |
// copyright notice, this list of conditions and the following | |
// disclaimer in the documentation and/or other materials provided |
void sayHello() => print('Hello, World!'); |
diff --git a/SuperPi_flutter/lib/pi_calculator.dart b/SuperPi_flutter/lib/pi_calculator.dart | |
index 39faf59..b519f6a 100644 | |
--- a/SuperPi_flutter/lib/pi_calculator.dart | |
+++ b/SuperPi_flutter/lib/pi_calculator.dart | |
@@ -30,7 +30,7 @@ class PiCalculator { | |
double yk1 ; | |
for (int i = 0; i < k; i++) { | |
yk1 = (1 - math.pow((1 - yk * yk * yk * yk),(0.25)))/(1 + math.pow((1 - yk * yk * yk * yk),(0.25))); | |
- ak1 = ak * math.pow((1 + yk1), 4) - math.pow(2, 2 * i + 3) * yk1 * (1 + yk1 + yk1 * yk1); | |
+ ak1 = ak * math.pow((1 + yk1), 4.0) - math.pow(2.0, (2 * i + 3) + 0.0) * yk1 * (1 + yk1 + yk1 * yk1); |
#include <stdio.h> // for fprintf() | |
#include <fcntl.h> | |
#include <unistd.h> // for close(), read() | |
#include <sys/epoll.h> // for epoll_create1(), epoll_ctl(), struct epoll_event | |
#include <string.h> // for strncmp | |
#include <errno.h> | |
const int kMaxEvents = 5; | |
const int kReadSize = 5; |
$flt
points to that folder.$flt/flutter
get flutter
by
$ cd $flt
$ git clone https://github.com/flutter/flutter
$flt/flutter/bin
to your path, run flutter doctor
and fix issues if any are reported.$flt/engine
get engine
checkout following these instructions. Make sure to run dependency installation scripts as described there.$flt/engine/src/third_party/dart
switch to master
and pull upto HEAD
Future<void> f() async { | |
print("f invoked"); | |
await Future.value(10); | |
print("f continued"); | |
} | |
Future<void> g() async { | |
print("g invoked"); | |
await Future.value(10); | |
print("g continued"); |