m3_lightmeter/lib/screens/film_edit/flow_film_edit.dart
Vadim c66381f813
ML-191 Add an ability to add a generic film, that will accept a formula (#195)
* sync with resources

* separated `ExpandableSectionList` as widget

* fixed generic type

* implemented `FilmsScreen` (wip)

* made `SliverScreen` title a widget

* [`FilmEditScreen`] wip

* [`FilmEditScreen`] added validation

* fixed title overflow for `SliverScreen`

* [`FilmEditScreen`] separated add and edit blocs

* [`FilmEditScreen`] split into separate components

* added bottom widget to `SliverScreen`

* implemented films list tabs fo `FilmsScreen`

* added films screen to navigation

* replaced explicit routes names with enum values

* implemented CRUD for custom films

* added placeholder for empty custom films list

* added `FilmsStorageService`

* fixed unit tests

* fixed integration tests

* lint

* fixed golden tests

* added iap stub methods

* added custom films to features list

* use 2.0.0 resouces

* fixed film picket tests

* migrated to iap 1.0.1

* autofocus film name field

* wait for the film to edited

* migrated to iap 1.1.0

* typo

* wait for storage initialization

* migrated to iap 1.1.1

* fixed films initialization

* added conditions to films model `updateShouldNotifyDependent`

* typo

* fixed select film discard notify

* covered films model `updateShouldNotifyDependent`
2024-11-03 20:16:01 +01:00

30 lines
860 B
Dart

import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:lightmeter/providers/films_provider.dart';
import 'package:lightmeter/screens/film_edit/bloc_film_edit.dart';
import 'package:lightmeter/screens/film_edit/screen_film_edit.dart';
import 'package:m3_lightmeter_resources/m3_lightmeter_resources.dart';
class FilmEditArgs {
final FilmExponential? film;
const FilmEditArgs({this.film});
}
class FilmEditFlow extends StatelessWidget {
final FilmEditArgs args;
const FilmEditFlow({required this.args, super.key});
@override
Widget build(BuildContext context) {
return BlocProvider(
create: (_) => FilmEditBloc(
FilmsProvider.of(context),
film: args.film,
isEdit: args.film != null,
),
child: FilmEditScreen(isEdit: args.film != null),
);
}
}