update readme and add gif

This commit is contained in:
baldeau 2024-10-06 21:27:39 +02:00
parent 88bb28b10e
commit e0be5243b5
5 changed files with 38 additions and 40 deletions

View File

@ -1,3 +1,6 @@
# Ecosystem Simulation
A simple ecosystem simulation written in Flutter.
A simple ecosystem simulation fully written from scratch in Dart.
It uses the Flutter rendering engine with low level api calls.
![](./assets/app.gif)

BIN
assets/app.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 MiB

View File

@ -4,14 +4,11 @@ PODS:
- Flutter
- rust_lib_ecosim (0.0.1):
- Flutter
- url_launcher_ios (0.0.1):
- Flutter
DEPENDENCIES:
- Flutter (from `Flutter`)
- integration_test (from `.symlinks/plugins/integration_test/ios`)
- rust_lib_ecosim (from `.symlinks/plugins/rust_lib_ecosim/ios`)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
EXTERNAL SOURCES:
Flutter:
@ -20,14 +17,11 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/integration_test/ios"
rust_lib_ecosim:
:path: ".symlinks/plugins/rust_lib_ecosim/ios"
url_launcher_ios:
:path: ".symlinks/plugins/url_launcher_ios/ios"
SPEC CHECKSUMS:
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
integration_test: 252f60fa39af5e17c3aa9899d35d908a0721b573
rust_lib_ecosim: 6b07e4c7e148a236de802525682c23f78fbc4f79
url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe
PODFILE CHECKSUM: 819463e6a0290f5a72f145ba7cde16e8b6ef0796

View File

@ -18,7 +18,7 @@ class SimulationApp extends StatelessWidget {
card: Colors.black,
cardForeground: Colors.white,
popover: Colors.grey,
popoverForeground: Colors.grey,
popoverForeground: Color.fromARGB(255, 101, 54, 54),
primary: Colors.white,
primaryForeground: Colors.black,
secondary: Colors.yellow,

View File

@ -59,40 +59,41 @@ class MainScreen extends StatelessWidget {
ShadButton(
onPressed: () {
showShadDialog(
context: context,
builder: (context) {
final formKey = GlobalKey<ShadFormState>();
return ShadDialog(
title: const Text('Set Benchmark Boid Count'),
content: Column(
children: [
ShadForm(
key: formKey,
child: ShadInputFormField(
label: const Text('Boid Count'),
id: 'benchmark_boid_count',
initialValue: '500',
),
context: context,
builder: (context) {
final formKey = GlobalKey<ShadFormState>();
return ShadDialog(
title: const Text('Set Benchmark Boid Count'),
content: Column(
children: [
ShadForm(
key: formKey,
child: ShadInputFormField(
label: const Text('Boid Count'),
id: 'benchmark_boid_count',
initialValue: '500',
),
ShadButton(
text: const Text('Start Benchmark'),
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
BenchmarkSimulationScreen(
boids: int.parse(formKey.currentState!
.value['benchmark_boid_count']),
),
),
ShadButton(
text: const Text('Start Benchmark'),
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
BenchmarkSimulationScreen(
boids: int.parse(formKey.currentState!
.value['benchmark_boid_count']),
),
);
},
)
],
),
);
});
),
);
},
)
],
),
);
},
);
},
text: const Text("Benchmark"),
),