This commit is contained in:
Vadim 2023-09-16 19:17:02 +02:00
parent cc9f162933
commit db86b001aa
5 changed files with 84 additions and 1 deletions

View file

@ -92,5 +92,9 @@
"type": "String"
}
}
}
},
"lightmeterPro": "Lightmeter PRO",
"buyLightmeterPro": "Buy Lightmeter PRO",
"lightmeterProDescription": "TBD",
"buy": "Buy"
}

View file

@ -0,0 +1,41 @@
import 'package:flutter/material.dart';
import 'package:lightmeter/generated/l10n.dart';
import 'package:lightmeter/screens/shared/sliver_screen/screen_sliver.dart';
class BuyProScreen extends StatelessWidget {
const BuyProScreen({super.key});
@override
Widget build(BuildContext context) {
return SliverScreen(
title: S.of(context).lightmeterPro,
appBarActions: [
IconButton(
onPressed: Navigator.of(context).pop,
icon: const Icon(Icons.close),
),
],
slivers: [
SliverList(
delegate: SliverChildListDelegate(
[
Text(S.of(context).lightmeterProDescription),
Row(
children: [
ElevatedButton(
onPressed: () {
Navigator.of(context).pop(true);
},
child: Text(S.of(context).buy),
),
],
)
],
),
),
SliverToBoxAdapter(child: SizedBox(height: MediaQuery.paddingOf(context).bottom)),
],
);
}
}

View file

@ -0,0 +1,20 @@
import 'package:flutter/material.dart';
import 'package:lightmeter/generated/l10n.dart';
import 'package:lightmeter/screens/settings/components/buy_pro/components/equipment_profiles/components/equipment_profile_screen/screen_buy_pro.dart';
class BuyProListTile extends StatelessWidget {
const BuyProListTile({super.key});
@override
Widget build(BuildContext context) {
return ListTile(
leading: const Icon(Icons.camera),
title: Text(S.of(context).buyLightmeterPro),
onTap: () {
Navigator.of(context).push<bool>(
MaterialPageRoute(builder: (_) => const BuyProScreen()),
);
},
);
}
}

View file

@ -0,0 +1,16 @@
import 'package:flutter/material.dart';
import 'package:lightmeter/generated/l10n.dart';
import 'package:lightmeter/screens/settings/components/buy_pro/components/equipment_profiles/widget_list_tile_buy_pro.dart';
import 'package:lightmeter/screens/settings/components/shared/settings_section/widget_settings_section.dart';
class BuyProSettingsSection extends StatelessWidget {
const BuyProSettingsSection({super.key});
@override
Widget build(BuildContext context) {
return SettingsSection(
title: S.of(context).lightmeterPro,
children: const [BuyProListTile()],
);
}
}

View file

@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:lightmeter/generated/l10n.dart';
import 'package:lightmeter/screens/settings/components/about/widget_settings_section_about.dart';
import 'package:lightmeter/screens/settings/components/buy_pro/widget_settings_section_pro.dart';
import 'package:lightmeter/screens/settings/components/equipment/widget_settings_section_equipment.dart';
import 'package:lightmeter/screens/settings/components/general/widget_settings_section_general.dart';
import 'package:lightmeter/screens/settings/components/metering/widget_settings_section_metering.dart';
@ -43,6 +44,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
SliverList(
delegate: SliverChildListDelegate(
<Widget>[
const BuyProSettingsSection(),
const MeteringSettingsSection(),
const EquipmentSettingsSection(),
const GeneralSettingsSection(),