m3_lightmeter/lib/screens/shared/sliver_screen/screen_sliver.dart
Vadim 4bb080a144
Implemented IAP & Equipment profiles (#89)
* added equipment profiles to layout config

* calculate layout height based on `MeteringScreenLayoutFeature`

* Update cd_dev.yml

* Fixed equipment profile tile padding

* import

* `webfactory/ssh-agent`

* Update pubspec.yaml

* fixed `MeteringScreenLayoutConfigJson` tests

* fixed `UserPreferencesService` tests

* reset selected equipment profile when layout feature is disabled

* `IAPProductType.equipment` -> `IAPProductType.paidFeatures`

* updated packages versions

* Update shared_prefs_service.dart

* Fixed & tested exposure pairs list builder

* typo

* typo

* added iap repo stub

* Renamed `EquipmentProfileData` ->`EquipmentProfile`

* Moved `EquipmentProfileProvider` to iap repo

* Update README.md

* Fixed `EquipmentProfileListener`

* Improved `EquipmentProfilesListTile` statuses visualization

* Update README.md

* Update ci.yml

* Post-merge fixes

* typo

* Added workflow checks

* more sophisticated iap icons

* Include IAP by default

* added loader for `IAPProductStatus.pending`

* typo

* Added equipment profiles list placeholder

* typo

* separated `IconPlaceholder`

* improved `buildExposureValues` testing

* cleanup
2023-09-02 10:32:08 +02:00

47 lines
1.2 KiB
Dart

import 'package:flutter/material.dart';
import 'package:lightmeter/res/dimens.dart';
class SliverScreen extends StatelessWidget {
final String title;
final List<Widget> appBarActions;
final List<Widget> slivers;
const SliverScreen({
required this.title,
required this.appBarActions,
required this.slivers,
super.key,
});
@override
Widget build(BuildContext context) {
return Scaffold(
body: SafeArea(
top: false,
bottom: false,
child: CustomScrollView(
slivers: <Widget>[
SliverAppBar(
pinned: true,
automaticallyImplyLeading: false,
expandedHeight: Dimens.sliverAppBarExpandedHeight,
flexibleSpace: FlexibleSpaceBar(
centerTitle: false,
titlePadding: const EdgeInsets.all(Dimens.paddingM),
title: Text(
title,
style: TextStyle(
color: Theme.of(context).colorScheme.onSurface,
fontSize: Dimens.grid24,
),
),
),
actions: appBarActions,
),
...slivers,
],
),
),
);
}
}