This commit is contained in:
Vadim 2023-10-02 11:57:59 +02:00
parent 5a62326037
commit 161b90c662
3 changed files with 21 additions and 66 deletions

View file

@ -1,10 +1,24 @@
flutter drive \ flutter --version
fvm flutter build apk \
--dart-define="cameraPreviewAspectRatio=240/320" \ --dart-define="cameraPreviewAspectRatio=240/320" \
--dart-define="cameraStubImage=assets/camera_stub_image.jpg" \ --dart-define="cameraStubImage=assets/camera_stub_image.jpg" \
--driver=test_driver/performance_driver.dart \ --target=integration_test/generate_screenshots.dart \
--target=integration_test/metering_test.dart \ --profile \
--flavor=dev
for n in {1..5}; do
echo "============ Run number ${n} ============"
flutter drive \
--dart-define="cameraPreviewAspectRatio=240/320" \
--dart-define="cameraStubImage=assets/camera_stub_image.jpg" \
--driver=test_driver/screenshot_driver.dart \
--target=integration_test/generate_screenshots.dart \
--profile \ --profile \
--flavor=dev \ --flavor=dev \
--no-dds \ --no-dds \
--endless-trace-buffer \ --endless-trace-buffer \
--purge-persistent-cache --purge-persistent-cache \
--use-application-binary=build/app/outputs/flutter-apk/app-dev-profile.apk
done

View file

@ -46,61 +46,3 @@ class Application extends StatelessWidget {
); );
} }
} }
class AnimatedPickerTest extends StatefulWidget {
const AnimatedPickerTest({super.key});
@override
State<AnimatedPickerTest> createState() => _AnimatedPickerTestState();
}
class _AnimatedPickerTestState extends State<AnimatedPickerTest> {
Film _selectedFilm = Film.values.first;
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: _FilmPicker(
values: Film.values,
selectedValue: _selectedFilm,
onChanged: (value) {
setState(() {
_selectedFilm = value;
});
},
),
),
);
}
}
class _FilmPicker extends StatelessWidget {
final List<Film> values;
final Film selectedValue;
final ValueChanged<Film> onChanged;
const _FilmPicker({
required this.values,
required this.selectedValue,
required this.onChanged,
});
@override
Widget build(BuildContext context) {
return AnimatedDialogPicker<Film>(
icon: Icons.camera_roll,
title: "Film",
selectedValue: selectedValue,
values: values,
itemTitleBuilder: (_, value) => Text(value.name.isEmpty ? 'None' : value.name),
onChanged: onChanged,
closedChild: ReadingValueContainer.singleValue(
value: ReadingValue(
label: "Film",
value: selectedValue.name.isEmpty ? 'None' : selectedValue.name,
),
),
);
}
}

View file

@ -1,5 +1,4 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:lightmeter/application.dart'; import 'package:lightmeter/application.dart';
import 'package:lightmeter/application_wrapper.dart'; import 'package:lightmeter/application_wrapper.dart';
import 'package:lightmeter/environment.dart'; import 'package:lightmeter/environment.dart';