mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 15:24:35 +01:00
12 lines
287 B
Dart
12 lines
287 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
extension ContextX on BuildContext {
|
|
void pop<T extends Object?>([T? result]) {
|
|
Navigator.of(this).pop<T>(result);
|
|
}
|
|
|
|
bool get canPop => Navigator.of(this).canPop();
|
|
|
|
bool get isDark => Theme.of(this).brightness == Brightness.dark;
|
|
}
|