mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2025-08-17 18:46:47 +00:00
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();
|
|
}
|
|
}
|
|
}
|