mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-13 16:05:18 +00:00
14 lines
283 B
Dart
14 lines
283 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_hooks/flutter_hooks.dart';
|
|
|
|
T useBrightnessValue<T>(
|
|
T lightValue,
|
|
T darkValue,
|
|
) {
|
|
final context = useContext();
|
|
|
|
return Theme.of(context).brightness == Brightness.light
|
|
? lightValue
|
|
: darkValue;
|
|
}
|