mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2025-08-18 02:56:42 +00:00

* open Pro screen on tap * removed Pro section from Settings screen * made Pro badge smaller * updated goldens * fixed offering padding * Update metering_screen.png * fixed pro features width * brought back enabled adapter * reworked `DialogSwitchListItem` * allow more free actions * typo * removed settings screen checks * macos-latest * typo * added test for guard Pro tap
14 lines
428 B
Dart
14 lines
428 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:lightmeter/navigation/routes.dart';
|
|
import 'package:lightmeter/utils/context_utils.dart';
|
|
|
|
Future<void> guardProTap(BuildContext context, VoidCallback callback) async {
|
|
if (context.isPro) {
|
|
callback();
|
|
} else {
|
|
final isPro = await Navigator.of(context).pushNamed(NavigationRoutes.proFeaturesScreen.name);
|
|
if (isPro == true) {
|
|
callback();
|
|
}
|
|
}
|
|
}
|