mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-13 16:05:18 +00:00
11 lines
353 B
Dart
11 lines
353 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_hooks/flutter_hooks.dart';
|
|
import 'package:platform_ui/platform_ui.dart';
|
|
|
|
T usePlatformProperty<T>(
|
|
PlatformProperty<T> Function(BuildContext context) getProperties) {
|
|
final context = useContext();
|
|
|
|
return getProperties(context).resolve(platform ?? Theme.of(context).platform);
|
|
}
|